Share via


GridLayout.preferredLayoutSize

Class Overview | Class Members | This Package | All Packages

Syntax

public Dimension preferredLayoutSize( Container parent )

Parameters
  • target
    the container in which to do the layout.
Returns

the preferred dimensions to lay out the subcomponents of the specified container.

Description

Determines the preferred size of the container argument using this grid layout.

The preferred width of a grid layout is the largest preferred width of any of the widths in the container times the number of columns, plus the horizontal padding times the number of columns plus one, plus the left and right insets of the target container.

The preferred height of a grid layout is the largest preferred height of any of the widths in the container times the number of rows, plus the vertical padding times the number of rows plus one, plus the top and left insets of the target container.

See Also

minimumLayoutSize, getPreferredSize