Basic HTML version of Foils prepared July 6 99

Foil 45 Layout Managers

From Use of Java Language in Computational Science DoD Modernization Users Group Conference Monterey -- June 7 99. by Nancy McCracken, Geoffrey C. Fox


1 The various panels in a container are laid out separately in terms of their subcomponents
2 The arrangement is controlled by general strategies which are embodied in 5 LayoutMangers
3 To create a layout, such as FlowLayout, in your panel:
  • setLayout(new FlowLayout());
  • This particular Layout is the default and flows in the components in the order that the add method is called.
4 Other Layout Managers:
  • GridLayout - a regular rectangular grid (table)
  • BorderLayout - 5 areas as in diagram
  • GridBagLayout - general arrangement of space
  • CardLayout - card panels replace each other in the same space.

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Tue Jul 6 1999