Описание тега border-layout
BorderLayout is a Java Swing/AWT layout manager that lays out a container, arranging and resizing its components to fit in five regions: north, south, east, west, and center.
BorderLayout 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
.
Here is an example of five buttons in an applet laid out using the BorderLayout
layout manager:
In addition, BorderLayout
supports the relative positioning constants, PAGE_START
, PAGE_END
, LINE_START
, and LINE_END
. In a container whose ComponentOrientation
is set to ComponentOrientation.LEFT_TO_RIGHT
, these constants map to NORTH
, SOUTH
, WEST
, and EAST
, respectively.
Relevant documentation and tutorials: