|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.GridLayout
A layout manager for a container that lays out grids.
Constructor Summary | |
GridLayout(int rows,
int cols)
Creates a grid layout with the specified rows and columns. |
|
GridLayout(int rows,
int cols,
int hgap,
int vgap)
Creates a grid layout with the specified rows, columns, horizontal gap, and vertical gap. |
Method Summary | |
void |
addLayoutComponent(String name,
Component comp)
Adds the specified component with the specified name to the layout. |
void |
layoutContainer(Container parent)
Lays out the container in the specified panel. |
Dimension |
minimumLayoutSize(Container parent)
Returns the minimum dimensions needed to layout the components contained in the specified panel. |
Dimension |
preferredLayoutSize(Container parent)
Returns the preferred dimensions for this layout given the components int the specified panel. |
void |
removeLayoutComponent(Component comp)
Removes the specified component from the layout. |
String |
toString()
Returns the String representation of this GridLayout's values. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public GridLayout(int rows, int cols)
rows
- the rowscols
- the columnspublic GridLayout(int rows, int cols, int hgap, int vgap)
rows
- the rows; zero means 'any number.'cols
- the columns; zero means 'any number.' Only one of 'rows'
and 'cols' can be zero, not both.hgap
- the horizontal gap variablevgap
- the vertical gap variable
IllegalArgumentException
- If the rows and columns are invalid.Method Detail |
public void addLayoutComponent(String name, Component comp)
addLayoutComponent
in interface LayoutManager
name
- the name of the componentcomp
- the component to be addedpublic void removeLayoutComponent(Component comp)
removeLayoutComponent
in interface LayoutManager
comp
- the component to be removedpublic Dimension preferredLayoutSize(Container parent)
preferredLayoutSize
in interface LayoutManager
parent
- the component which needs to be laid outminimumLayoutSize(java.awt.Container)
public Dimension minimumLayoutSize(Container parent)
minimumLayoutSize
in interface LayoutManager
parent
- the component which needs to be laid outpreferredLayoutSize(java.awt.Container)
public void layoutContainer(Container parent)
layoutContainer
in interface LayoutManager
parent
- the specified component being laid outContainer
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |