![]() |
|
[Java] Align buttons ( objects ) - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [Java] Align buttons ( objects ) (/showthread.php?tid=3492697) |
Align buttons ( objects ) - ctxd - May 20, 2013 How do i set the position of a JButton? I've searched all over the internet, and i can't seem to find it, please help :) * - mctb - May 20, 2013 Obviously, you are a beginner at JAVA. So, I suggest starting integrating GUI applications using Netbeans IDE, because it also provides a layout for your form, so that you do not have to align everything by code, but just by your view. It is very easy to use and if you search youtube, you will find plenty of tutorials explaining in detail "how to". There is NO reason to waste your time thinking on how to arrange gui objects and test run each time the application to test if it fits you. Go for it, I'm sure you 'll make it. * - ctxd - May 20, 2013 Im sorry, but that is not what i asked for. I want an example on how i set the position on a button. Not a tutorial on how to use NetBeans, i see this as a much faster way to learn things. Thanks * - Assume - May 20, 2013 It depends on the layout you are using. http://docs.oracle.com/javase/tutorial/uiswing/layout/using.html * - Xerif - May 20, 2013 Yeah as Assume said above, it depends on the layout. My personal preference is to set the layout to null, and then use the setBound method to position everything. * - ctxd - May 20, 2013 (May 20, 2013 11:24 AM)Xerif Wrote: Yeah as Assume said above, it depends on the layout. I did not know that this was posible, thanks man :) * - Xerif - May 20, 2013 (May 20, 2013 12:33 PM)ctxd Wrote: I did not know that this was posible, thanks man :) No problem man :D PM me if you need anymore help. * - ctxd - May 20, 2013 (May 20, 2013 01:50 PM)Xerif Wrote: No problem man :D PM me if you need anymore help. Thanks, i will! Gave you some reputation for the help ;) |