BP Forums
Button - Printable Version

+- BP Forums (https://bpforums.info)
+-- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=55)
+--- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=56)
+---- Forum: Java (https://bpforums.info/forumdisplay.php?fid=19)
+----- Forum: Programming Help (https://bpforums.info/forumdisplay.php?fid=30)
+----- Thread: Button (/showthread.php?tid=783)



Button - Aaron Rogers118 - 05-10-2013

I've got the window and the back buffer setup, but how do I make the buttons, where do I put it in the class which class do I put it in, and how do I set the location?


Re: Button - brandonio21 - 05-10-2013

Well it all depends what type of button you want to use. Do you want to make your own out of an image? Do you want to use a rectangle? Or do you want to actually use a Swing button?

Generally, you create the button as a private instance variable. Then, during the init() or constructor of your class, you have the button initialize itself. Then in the draw method you simply draw the button. I can provide you with more details as soon as you answer the question above.


Re: Button - Aaron Rogers118 - 05-11-2013

I want to use my own picture, and I was going to fix my other post. Sorry!


Re: Button - Aaron Rogers118 - 05-13-2013

I need help soon! I want my own customized button. Pleas help!