public class GridLayout extends Layout
Constructor and Description |
---|
GridLayout(int rows,
int columns)
Creates a new instance of GridLayout with the given rows and columns
|
Modifier and Type | Method and Description |
---|---|
Dimension |
getPreferredSize(Container parent)
Returns the container preferred size
|
void |
layoutContainer(Container parent)
Layout the given parent container children
|
addLayoutComponent, getComponentConstraint, isOverlapSupported, removeLayoutComponent
public GridLayout(int rows, int columns)
rows
- - number of rows.columns
- - number of columns.IllegalArgumentException
- if rows < 1 or columns < 1public void layoutContainer(Container parent)
Layout
layoutContainer
in class Layout
parent
- the given parent containerpublic Dimension getPreferredSize(Container parent)
Layout
getPreferredSize
in class Layout
parent
- the parent container