|
Tour page 3: GridBagLayout and constraints previous
next
| The GridBagConstraints is a set of parameters associated to components. They define the individuel layout of the component and the placement inside the container. GridBagConstraints may be only used in GridBagLayout. |
|
|
|
|
|
Components managed by GridBagLayout |
|
Each component managed by a GridBagLayout is associated with an instance of GridBagConstraints that specifies how the component is laid out within its display area. |
|
|
|
|
|
|
|
GridBagConstraints |
|
How a GridBagLayout object places a set of components depends on the GridBagConstraints object associated with each component, and on the minimum size and the preferred size of the components' containers.
See the predefined GridBagConstraints in Example.xml to understand the effects of different sets of variables. |
|
|
|
|
|
|
|