12.18.2 BorderLayout
The BorderLayout
layout manager (the default layout manager for a JFrame
) arranges components into five regions: NORTH
, SOUTH
, EAST
, WEST
and CENTER
. NORTH
corresponds to the top of the container. Class BorderLayout
extends Object
and implements interface LayoutManager2 (a subinterface of LayoutManager
that adds several methods for enhanced layout processing).
A BorderLayout
limits a Container
to containing at most five components—one in each region. The component placed in each region can be a container to which other components are attached. The components placed in the NORTH
and SOUTH
regions extend horizontally to the sides of the container and are as tall as the components placed in those regions. The EAST
and WEST ...
Get Java™ How To Program (Early Objects), Tenth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.