GridBagConstraints.weightx

GridBagConstraints.weightx

Class Overview | Class Members | This Package | All Packages

Syntax
public double weightx
Description
Specifies how to distribute extra horizontal space.

The grid bag layout manager calculates the weight of a column to be the maximum weighty of all the components in a row. If the resulting layout is smaller horizontally than the area it needs to fill, the extra space is distributed to each column in proportion to its weight. A column that has a weight zero receives no extra space.

If all the weights are zero, all the extra space appears between the grids of the cell and the left and right edges.

The default value of this field is 0.

See Also
weighty