GridLayout
places components in a grid of equally sized cells. Like
FlowLayout, components are added to the grid from left to right and top to
bottom.
Use GridLayout's general properties to set the number of rows or columns and the vertical and horizontal gap in pixels between the cells.
Either the number of rows or the number of columns must be nonzero. The other value is determined by the number of components. If both rows and columns are set to nonzero values, the number of rows is used and the number of columns is determined by the number of components.
See Also | |
---|---|
Setting the Layout Manager
Setting Layout Properties FlowLayout GridBagLayout |