java.awt.GridLayout (JDK 1.0)
This class implements the LayoutManager interface to lay out Component objects in a Container. It divides the Container into a specified number of rows and columns and arranges the components in those rows and columns, left-to-right and top-to-bottom. If either the number of rows or the number of columns is set to zero, its value is computed from the other dimension and the total number of components. Do not confuse this class with the more flexible and complicated GridBagLayout.
Note that applications should never call the LayoutManager methods of this class directly; the Container for which the GridLayout is registered does this.
public classGridLayoutextends Object implements LayoutManager, Serializable { //Public Constructors1.1 publicGridLayout(); publicGridLayout(introws, intcols); publicGridLayout(introws, intcols, inthgap, intvgap); //Public Instance Methodspublic voidaddLayoutComponent(Stringname, Componentcomp); //From LayoutManager1.1 public intgetColumns(); 1.1 public intgetHgap(); 1.1 public intgetRows(); 1.1 public intgetVgap(); public voidlayoutContainer(Containerparent); //From LayoutManagerpublic DimensionminimumLayoutSize(Containerparent); //From LayoutManagerpublic DimensionpreferredLayoutSize(Containerparent); //From LayoutManagerpublic voidremoveLayoutComponent(Componentcomp); //From LayoutManager1.1 public voidsetColumns(intcols); 1.1 public voidsetHgap(inthgap); 1.1 public voidsetRows(introws); 1.1 public voidsetVgap(intvgap); public StringtoString(); //Overrides Object}