I recommend using the NeoForce Controls Library for GUI-related tasks - it has buttons, among other useful GUI controls, including pop-ups, list views, combo boxes, etc.
If you are writing a button class for training ... well, try to learn more about it yourself through Google before asking for help.
ADDITION
This is the code I wrote for the buttons. Perhaps this may serve as a starting point. I use it in my 2D engine, so it has been debugged and tested.
source share