class org.aswing.BorderLayout extends EmptyLayout

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:

   var p: JPanel = new JPanel();
   p.setLayout(new BorderLayout());
   p.append(new JButton("Ok"), BorderLayout.SOUTH);
For convenience, BorderLayout interprets the absence of a string specification the same as the constant CENTER:
   var p2: JPanel = new JPanel();
   p2.setLayout(new BorderLayout());
   p2.append(new TextArea());  // Same as p.add(new TextArea(), BorderLayout.CENTER);

The following image illustrate the way the borderLayout layout child component.

Authors paling, ngrebenshikov

Class Fields

static var CENTER:String

The center layout constraint (middle of container).

static var EAST:String

The east layout constraint (right side of container).

static var LINE_END:String

static var LINE_START:String

static var NORTH:String

The north layout constraint (top of container).

static var PAGE_END:String

static var PAGE_START:String

static var SOUTH:String

The south layout constraint (bottom of container).

static var WEST:String

The west layout constraint (left side of container).

Instance Fields

Show inherited public instance fieldsHide inherited public instance fields

Inherited from EmptyLayout

function addLayoutComponent(comp:Component, constraints:Dynamic):Void
function getLayoutAlignmentX(target:Container):Float
function getLayoutAlignmentY(target:Container):Float
function invalidateLayout(target:Container):Void
function layoutContainer(target:Container):Void
function maximumLayoutSize(target:Container):IntDimension
function minimumLayoutSize(target:Container):IntDimension
function preferredLayoutSize(target:Container):IntDimension
function removeLayoutComponent(comp:Component):Void

var hgap:Int

var vgap:Int

function new(?hgap:Int = 0, ?vgap:Int = 0): Void

Constructs a border layout with the specified gaps between components. The horizontal gap is specified by hgap and the vertical gap is specified by vgap.

hgap

the horizontal gap.

vgap

the vertical gap.

function setDefaultConstraints(constraints:Dynamic): Void

function toString(): String