A border layout is confusing, but it will soon make sense. With a
border layout, you can place your component in any one of five panels:
North: Only the component's preferred height is preserved.
Its width consumes the width of the JFrame or JPanel. North is at
the top. Often used for menu bars.
South: Same as North, only at the bottom. Often used for status
bars.
West: Only the components preferred width remains the same.
The heighth is the height of the entire JFrame or JPanel. West is
at the left side of the container.
East: Same as West, only it is at the right of the container.
Center: Neither height nor width is preserved. The size
of center depends on the size of the other components.
Note: You do not have to have something in each part of the BorderLayout.
An example:
I added a menu bar to the North section, which is actually three buttons
on a panel using a FlowLayout. I had to nest this panel inside the
main frame, because a BorderLayout can only have one component per area.
The South section has a JLabel with a status message.
The East section contains a scrolling bar.
The Center section contains a text area.
There is nothing in the West section. This is perfectly fine.