In an Java BorderLayout
the NORTH
part is normally like this:
So what I want to have is, that the NORTH
and SOUTH
part have the same width as the CENTER
. But the EAST
and WEST
part should have the height of the CENTER
. This means the corners should be empty. I don't want to use a GridLayout
for this, because I don't want the NORTH
to have the same height as the CENTER
.
How do I get this layout?
Simply nest two BorderLayout using JPanels. In the inner one, add your north and south panels. Place the inner one in the outer one's BorderLayout.CENTER position. Done.