Advanced Java Tutorial


Total available pages count: 55
Subject - Java Technologies

Border Layout

BorderLayout:

The BorderLayout is used to arrange components into 5 regions i.e. in east, west, north, south & center. Each regional area may contain one component. BorderLayout is the default layout of the window or frame. 

It provides 5 constant for each region:

Public Static final int EAST
Public Static final int WEST
Public Static final int NORTH
Public Static final int SOUTH
Public Static final int CENTER

 

BorderLayout()

It is used to create a border layout without gaps between the component.

JBorderLayout(int hgap, int vgap)

It is used to create a border layout with the vertical & horizontal gaps between the components.



Comments