BorderLayoutNameBorderLayout
DescriptionBorderLayout is a LayoutManager that provides the means to lay out components along the edges of a container. It divides the container into five regions, named North, East, South, West, and Center. Normally you won't call the LayoutManager's methods yourself. When you add() a Component to a Container, the Container calls the addLayoutComponent() method of its LayoutManager. Class Definition
public class java.awt.BorderLayout extends java.lang.Object implements java.awt.LayoutManager2, java.io.Serializable { // Constants public final static String CENTER; public final static String EAST; public final static String NORTH; public final static String SOUTH; public final static String WEST; // Constructors public BorderLayout(); public BorderLayout (int hgap, int vgap); // Instance Methods public void addLayoutComponent (Component comp, Object constraints); public void addLayoutComponent (String name, Component component); public int getHgap(); public abstract float getLayoutAlignmentX(Container target); public abstract float getLayoutAlignmentY(Container target); public int getVgap(); public abstract void invalidateLayout(Container target); public void layoutContainer (Container target); public abstract Dimension maximumLayoutSize(Container target); public Dimension minimumLayoutSize (Container target); public Dimension preferredLayoutSize (Container target); public void removeLayoutComponent (Component component); public void setHgap (int hgap); public void setVgap (int vgap); public String toString(); } ConstantsCENTERpublic final static String CENTERA constant representing center orientation. EASTpublic final static String EASTA constant representing east orientation. NORTHpublic final static String NORTHA constant representing north orientation. SOUTHpublic final static String SOUTHA constant representing south orientation. WESTpublic final static String WESTA constant representing west orientation. ConstructorsBorderLayoutpublic BorderLayout()
public BorderLayout (int hgap, int vgap)
Instance MethodsaddLayoutComponentpublic void addLayoutComponent (Component comp, Object constraints)
addLayoutComponentpublic void addLayoutComponent (String name, Component component)
getHgappublic int getHgap()
getLayoutAlignmentXpublic abstract float getLayoutAlignmentX (Container target)
getLayoutAlignmentYpublic abstract float getLayoutAlignmentY (Container target)
getVgappublic int getVgap()
invalidateLayoutpublic abstract void invalidateLayout (Container target)
layoutContainerpublic void layoutContainer (Container target)
maximumLayoutSizepublic abstract Dimension maximumLayoutSize (Container target)
minimumLayoutSizepublic Dimension minimumLayoutSize (Container target)
preferredLayoutSizepublic Dimension preferredLayoutSize (Container target)
removeLayoutComponentpublic void removeLayoutComponent (Component component)
setHgappublic void setHgap (int hgap)
setVgappublic void setVgap (int vgap)
toStringpublic String toString()
See AlsoComponent, Container, Dimension, LayoutManager, LayoutManager2, Object, String |
|