wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes Help suggest a proper layout manager for my form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Help suggest a proper layout manager for my form" Watch "Help suggest a proper layout manager for my form" New topic
Author

Help suggest a proper layout manager for my form

Kurt Harless
Greenhorn

Joined: Feb 25, 2009
Posts: 8
Greetings,

Ok I have experimented with BORDERLAYOUT, GRIDBAGLAYOUT, and BOXLAYOUT and can't get a mental grip on the proper layout or layouts to use to create a form with the following components;

See attached desired look.

Not looking for someone to code it, just get me started.

My Guess would be some outer layout manager that splits the frame in half vertically.
The upper half would then be a layout manager that splits the frame horizontally, approximately 2/3 and 1/3
The lower half would be a layout manager that again splits the frame vertically, but not the upper half is 90% and the lower half is 10%

Does that make sense?

Any suggested approaches?

Kurt


[Download LAYOUT1.bmp] Download

K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 2415
    
    7

Hi Kurt, it looks to me you have a heck of an app coming.

Anyway if I were you, I would use BorderLayout for the main window. 2 JPanels (top and bottom) and set them to BorderLayout.NORTH or CENTER and BorderLayout.SOUTH.

From there ... top JPanel layout to BorderLayout - table CENTER, radio EAST. Bottom JPanel BorderLayout CENTER and SOUTH.

You see BorderLayout can do it all HAHA. Now how the JPanels interact also have some impact on the layout. Hope this helps.


K. Tsang JavaRanch SCJP5 SCJD/OCM-JD OCPJP7 OCPWCD5
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
might be a lot easier using JSplitPanes.

you can remove the dividers, and set it up so that on any (frame) resize the proportions remain the same
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help suggest a proper layout manager for my form