API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.awt. BorderLayout View Source
Author(s)
Arthur van Hoff
Since
JDK1.0
Version
1.60, 04/07/06
Serial
Hierarchy
 Object
      BorderLayout
Implements
 LayoutManager2
 Serializable
Subclasses
Description
public class BorderLayout
  A border layout lays out a container, arranging and resizing its components to fit in five regions: north, south, east, west, and center.
Constructors
public BorderLayout ()
Constructs a new border layout with no gaps between components.
public BorderLayout (int hgap, int vgap)
  Constructs a border layout with the specified gaps between components.
Methods
Hide/Show inherited methods
public void addLayoutComponent (Component comp, Object constraints) [Specified in LayoutManager2]
  Adds the specified component to the layout, using the specified constraint object.
@Deprecated
public void addLayoutComponent (String name, Component comp)
public Object getConstraints (Component comp)
  Gets the constraints for the specified component
public int getHgap ()
  Returns the horizontal gap between components.
public float getLayoutAlignmentX (Container parent) [Specified in LayoutManager2]
  Returns the alignment along the x axis.
public float getLayoutAlignmentY (Container parent) [Specified in LayoutManager2]
  Returns the alignment along the y axis.
public Component getLayoutComponent (Container target, Object constraints)
  Returns the component that corresponds to the given constraint location based on the target Container's component orientation.
public Component getLayoutComponent (Object constraints)
  Gets the component that was added using the given constraint
public int getVgap ()
  Returns the vertical gap between components.
public void invalidateLayout (Container target) [Specified in LayoutManager2]
Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.
public void layoutContainer (Container target)
  Lays out the container argument using this border layout.
public Dimension maximumLayoutSize (Container target) [Specified in LayoutManager2]
  Returns the maximum dimensions for this layout given the components in the specified target container.
public Dimension minimumLayoutSize (Container target)
  Determines the minimum size of the target container using this layout manager.
public Dimension preferredLayoutSize (Container target)
  Determines the preferred size of the target container using this layout manager, based on the components in the container.
public void removeLayoutComponent (Component comp)
  Removes the specified component from this border layout.
public void setHgap (int hgap)
  Sets the horizontal gap between components.
public void setVgap (int vgap)
  Sets the vertical gap between components.
public String toString ()
  Returns a string representation of the state of this border layout.
Fields
Hide/Show inherited fields
publicfinalstatic String AFTER_LAST_LINE = "Last"
  Synonym for PAGE_END.
publicfinalstatic String AFTER_LINE_ENDS = "After"
  Synonym for LINE_END.
publicfinalstatic String BEFORE_FIRST_LINE = "First"
  Synonym for PAGE_START.
publicfinalstatic String BEFORE_LINE_BEGINS = "Before"
  Synonym for LINE_START.
pack-private Component center
  Constant to specify components location to be the center portion of the border layout.
publicfinalstatic String CENTER = "Center"
The center layout constraint (middle of container).
pack-private Component east
  Constant to specify components location to be the east portion of the border layout.
publicfinalstatic String EAST = "East"
The east layout constraint (right side of container).
pack-private Component firstItem
  A relative positioning constant, that can be used instead of north, south, east, west or center.
pack-private Component firstLine
  A relative positioning constant, that can be used instead of north, south, east, west or center.
pack-private int hgap
  Constructs a border layout with the horizontal gaps between components.
pack-private Component lastItem
  A relative positioning constant, that can be used instead of north, south, east, west or center.
pack-private Component lastLine
  A relative positioning constant, that can be used instead of north, south, east, west or center.
publicfinalstatic String LINE_END = "After"
  The component goes at the end of the line direction for the layout.
publicfinalstatic String LINE_START = "Before"
  The component goes at the beginning of the line direction for the layout.
pack-private Component north
  Constant to specify components location to be the north portion of the border layout.
publicfinalstatic String NORTH = "North"
The north layout constraint (top of container).
publicfinalstatic String PAGE_END = "Last"
  The component comes after the last line of the layout's content.
publicfinalstatic String PAGE_START = "First"
  The component comes before the first line of the layout's content.
pack-private Component south
  Constant to specify components location to be the south portion of the border layout.
publicfinalstatic String SOUTH = "South"
The south layout constraint (bottom of container).
pack-private int vgap
  Constructs a border layout with the vertical gaps between components.
pack-private Component west
  Constant to specify components location to be the west portion of the border layout.
publicfinalstatic String WEST = "West"
The west layout constraint (left side of container).
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar