Results 1 to 2 of 2
- 10-22-2012, 07:09 PM #1Member
- Join Date
- Sep 2012
- Rep Power
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)
- By jairoh_ in forum Java AppletsReplies: 3Last Post: 10-10-2012, 07:36 PM
- By aborgeld in forum New To JavaReplies: 9Last Post: 04-01-2011, 07:33 PM
- By thayalan in forum AWT / SwingReplies: 4Last Post: 04-28-2009, 01:59 AM
- By shwein in forum New To JavaReplies: 4Last Post: 09-09-2008, 05:15 PM
- By thebillybobjr in forum SWT / JFaceReplies: 0Last Post: 05-15-2008, 04:52 PM