BorderLayout - how to fix size
I have some problem with my BorderLayout, to put it more precisely with a CENTER region.
I would like to make it fixed size.
I setPrefferedSize(new Dimention(50,50)) for my NORTH and SOUTH regions and I setMinimumSize and setMaximumSize for my CENTER. but my CENTER looks like ignore me. It get smaller when I reduce my frame and vice versa.
this is my code, just in case:
Container pane = getContentPane();
JButton button = new JButton("Button 1 (PAGE_START)");
button.setPreferredSize(new Dimension(0,100));
//button.setMaximumSize(new Dimension(60,60));
//button.setMinimumSize(new Dimension(400,400));
pane.add(button, BorderLayout.PAGE_START);
button = new JButton("Button 2 (CENTER)");
pane.add(button, BorderLayout.CENTER);
button.setMinimumSize(new Dimension(20,20));
button.setMaximumSize(new Dimension(60,60));
//button.setPreferredSize(new Dimension(50,50));
button = new JButton("Button 3 (LINE_START)");
pane.add(button, BorderLayout.LINE_START);
button = new JButton("Long-Named Button 4 (PAGE_END)");
//button.setPreferredSize(new Dimension(0,100));
button.setMinimumSize(new Dimension(20,20));
pane.add(button, BorderLayout.PAGE_END);
button = new JButton("5 (LINE_END)");
pane.add(button, BorderLayout.LINE_END);
is it possible to persuade CENTER to keep there size unchangeable.
Thank you.

