The below code represents the problem. Since I have heights of the north and south panels set the rest of it goes to the center panel using GridLayout. I think that since it
How to make sure that when the GridLayout is not taking the whole space it is at least centered?
JPanel wrapper = new JPanel( new GridBagLayout() ); wrapper.add( centerP ); contentPane.add(wrapper, BorderLayout.CENTER); //contentPane.add(centerP, BorderLayout.CENTER);