how to center JPanel vertically
843805Sep 9 2006 — edited Sep 11 2006I`d like to align a JPanel to center. I`ve tried BorderLayout but I don`t want this JPanel to be forcefully extended - I want it to stay the way it is.
In this JPanel I have a few buttons that create a kind of menu and I want this menu to be in the center of the Frame. In the future I`ll probablt want to add some stuff at the bottom, top, left and right, so BorderLayout seems the perfect solution. The problem is that I don`t want the buttons to be resized to fill out the whole center area.
I`ve made a quick layout of what I mean here:
http://ilozen.republika.pl/stuff/layout.GIF