API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.awt. GridLayout View Source
Author(s)
Arthur van Hoff
Since
JDK1.0
Version
1.42, 11/17/05
Serial
Hierarchy
 Object
      GridLayout
Implements
 LayoutManager
 Serializable
Subclasses
Description
public class GridLayout
  The GridLayout class is a layout manager that lays out a container's components in a rectangular grid.
See also:   
Constructors
public GridLayout ()
  Creates a grid layout with a default of one column per component, in a single row.
public GridLayout (int rows, int cols)
  Creates a grid layout with the specified number of rows and columns.
public GridLayout (int rows, int cols, int hgap, int vgap)
  Creates a grid layout with the specified number of rows and columns.
Methods
Hide/Show inherited methods
public void addLayoutComponent (String name, Component comp) [Specified in LayoutManager]
  Adds the specified component with the specified name to the layout.
public int getColumns ()
  Gets the number of columns in this layout.
public int getHgap ()
  Gets the horizontal gap between components.
public int getRows ()
  Gets the number of rows in this layout.
public int getVgap ()
  Gets the vertical gap between components.
public void layoutContainer (Container parent) [Specified in LayoutManager]
  Lays out the specified container using this layout.
public Dimension minimumLayoutSize (Container parent) [Specified in LayoutManager]
  Determines the minimum size of the container argument using this grid layout.
public Dimension preferredLayoutSize (Container parent) [Specified in LayoutManager]
  Determines the preferred size of the container argument using this grid layout.
public void removeLayoutComponent (Component comp) [Specified in LayoutManager]
  Removes the specified component from the layout.
public void setColumns (int cols)
  Sets the number of columns in this layout to the specified value.
public void setHgap (int hgap)
  Sets the horizontal gap between components to the specified value.
public void setRows (int rows)
  Sets the number of rows in this layout to the specified value.
public void setVgap (int vgap)
  Sets the vertical gap between components to the specified value.
public String toString ()
  Returns the string representation of this grid layout's values.
Fields
Hide/Show inherited fields
pack-private int cols
  This is the number of columns specified for the grid.
pack-private int hgap
  This is the horizontal gap (in pixels) which specifies the space between columns.
pack-private int rows
  This is the number of rows specified for the grid.
pack-private int vgap
  This is the vertical gap (in pixels) which specifies the space between rows.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar