If a container's default layout manager doesn't suit your needs, you can easily replace it with another one. This section gives you an overview of some layout managers that the Java platform provides, gives you some general rules for using layout managers, and then tells you how to use each of the provided layout managers. It also points to examples of using each layout manager. How to Use BorderLayout BorderLayout is the default layout manager for every content pane.
All extra space is placed in the center area.
To run the applet, click the picture. The applet will appear in a new browser window. The BoxLayout class puts components in a single row or column. It respects the components' requested maximum sizes, and also lets you align components. To run the applet, click the picture.