Results 1 to 2 of 2
Thread: AWT GUI Control positioning
- 10-22-2012, 07:09 PM #1
Member
- Join Date
- Sep 2012
- Posts
- 16
- Rep Power
- 0
AWT GUI Control positioning
Hi, I have been trying to go by the programming book and I am trying to position controls as shown in the Figure 5-50a. I have been going at this for more than 8 hours and I still don't get the results as in the picture. I have no idea how it's done, the book explains things way too poorly and is 7 years outdated.

I know how to make all the controls I just have no idea how to use any of the layout controls properly enough to make it look as above.
- 10-22-2012, 07:44 PM #2
Re: AWT GUI Control positioning
Use a Layout Manager. More specifically, use nested Layouts- one JPanel with one Layout that holds other JPanels with other Layouts that ultimately hold JButtons.
Break the displays into sections- can you make a single row of buttons? Then can you stack rows of buttons into columns?
Recommended reading: A Visual Guide to Layout Managers (The Java™ Tutorials > Creating a GUI With JFC/Swing > Laying Out Components Within a Container)How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
Similar Threads
-
Help in positioning and running to the web
By jairoh_ in forum Java AppletsReplies: 3Last Post: 10-10-2012, 07:36 PM -
Vertical box and positioning
By aborgeld in forum New To JavaReplies: 9Last Post: 04-01-2011, 07:33 PM -
Positioning using setBounds
By thayalan in forum AWT / SwingReplies: 4Last Post: 04-28-2009, 01:59 AM -
panel positioning
By shwein in forum New To JavaReplies: 4Last Post: 09-09-2008, 05:15 PM -
control app width based on certain control
By thebillybobjr in forum SWT / JFaceReplies: 0Last Post: 05-15-2008, 04:52 PM


2Likes
LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks