Site hosted by Angelfire.com: Build your free website today!
 

GridBagLayout Class

The GridBagLayout class is a flexible layout manager that aligns components vertically and horizontally, without requiring that the components be of the same size.

  • Each GridBagLayout object maintains a dynamic rectangular grid of cells, with each component occupying one or more cells, called its display area.

  • Each component managed by a grid bag layout is associated with an instance of GridBagConstraints that specifies how the component is laid out within its display area (each component is associated with a grid-bag constraint object)

How a GridBagLayout object places a component set depends on the GridBagConstraints object associated with each component, and on the minimum size and the preferred size of the components' containers.