Rich,

Here are a few rules of thumb regarding the use of layout managers and their
effects on contained components:

Flow- puts as many components as possible into the first row, remaining
components are placed on second etc. rows. All components are spaced evenly
and centered by default but you can change that to right or left as well. In
any case, the preferred size (note, not what you necc. set it) of a
component is ALWAYS honored.

Grid- Ignores the preferred size of a component. The panel (or whatever) is
simply divided into x number of rows and y number of columns. Each row and
col will be the same size. Every component added will be the same size and
they are added left to right, row by row.

Border- It sometimes honors the preferred size of a component. The panel (or
whatever) is divided into 5 regions: North, South, East, West and Center.
Each can contain only 1 component. The preferred height of a component is
honored in the North and South regions and the component expands
horizontally to fill the whole region. East and West are the opposite. The
preferred width of components are honored but height is not. Components
expand vertically. Center is whatever that is left over from the other
parts.

Card- Sort of like the old HyperCard stacks. Again, sort of. You add
components which resize to fill their container, then basically hide/show
various components.

Gridbag- The hardest but most powerful. You can lay components out pretty
much where you want them but it takes a lot of effort. The beauty is that it
still looks good when rendered on various systems.

Null- You can always set the layout to "null" and use absolute positioning
but this is a VERY bad idea as your GUI will not be very cross-platform
viewable.

-Dev

-- 
Dev Brown
Morrisville, NC
USA

"One death is a tragedy, a million is a statistic."
Humanitarian and poet, Joseph Stalin


_______________________________________________
Juglist mailing list
[EMAIL PROTECTED]
http://trijug.org/mailman/listinfo/juglist_trijug.org

Reply via email to