A border layout lays out a container, arranging and resizing
its components to fit in five regions:
north, south, east, west, and center.
Each region may contain no more than one component, and
is identified by a corresponding constant:
NORTH, SOUTH, EAST,
WEST, and CENTER. When adding a
component to a container with a border layout, use one of these
five constants, for example:
Panel p = new Panel();
p.setLayout(new BorderLayout());
p.add(new Button("Okay"), BorderLayout.SOUTH);
As a convenience, BorderLayout interprets the
absence of a string specification the same as the constant
CENTER:
Panel p2 = new Panel();
p2.setLayout(new BorderLayout());
p2.add(new TextArea()); // Same as p.add(new TextArea(), BorderLayout.CENTER);
static public NORTH:Stringstatic public SOUTH:Stringstatic public EAST:Stringstatic public WEST:Stringstatic public CENTER:Stringstatic public BEFORE_FIRST_LINE:Stringstatic public AFTER_LAST_LINE:Stringstatic public BEFORE_LINE_BEGINS:Stringstatic public AFTER_LINE_ENDS:Stringstatic public PAGE_START:Stringstatic public PAGE_END:Stringstatic public LINE_START:Stringstatic public LINE_END:Stringpublic function addLayoutComponent(comp:Component, constraints:Object):VoidDescription copied from EmptyLayout
do nothing
addLayoutComponent() in org.aswing.LayoutManager
public function removeLayoutComponent(comp:Component):VoidDescription copied from EmptyLayout
do nothing
removeLayoutComponent() in org.aswing.LayoutManager
public function minimumLayoutSize(target:Container):DimensionDescription copied from EmptyLayout
new Dimension(0, 0);
minimumLayoutSize() in org.aswing.LayoutManager
public function preferredLayoutSize(target:Container):DimensionDescription copied from EmptyLayout
return target.getSize();
preferredLayoutSize() in org.aswing.LayoutManager
public function getLayoutAlignmentX(target:Container):NumberDescription copied from EmptyLayout
return 0
getLayoutAlignmentX() in org.aswing.LayoutManager
public function getLayoutAlignmentY(target:Container):NumberDescription copied from EmptyLayout
return 0
getLayoutAlignmentY() in org.aswing.LayoutManager
public function layoutContainer(target:Container):VoidLays out the container argument using this border layout.
This method actually reshapes the components in the specified
container in order to satisfy the constraints of this
BorderLayout object. The NORTH
and SOUTH components, if any, are placed at
the top and bottom of the container, respectively. The
WEST and EAST components are
then placed on the left and right, respectively. Finally,
the CENTER object is placed in any remaining
space in the middle.
Most applications do not call this method directly. This method
is called when a container calls its doLayout method.
target | the container in which to do the layout. |
layoutContainer() in org.aswing.LayoutManager
layoutContainer() in org.aswing.EmptyLayout