This is what happens:
getPreferredSize() , . , LayoutManager ( JPanel) , .setPreferredSize(...) JPanel, .- JPanel.
- , ( ), Layoutmanager ( contentpane's/RootPane/...) JPanel
getPreferredSize(). getPreferredSize() JPanel LayoutManager, , setPreferredSize().
BorderLayout , CENTER, EAST WEST. ( ).
BorderLayout.preferredLayoutSize ( 1.6.0_13 Sun), :
max( EAST.width + CENTER.width + WEST.width + h-gaps,
NORTH.width, SOUTH.width ) + insets
max( EAST.height, CENTER.height, WEST.height)
+ NORTH.height + SOUTH.height + v-gaps + insets
( width/height - preferredSize .)
- , / , .)
minimalLayoutSize, maximumLayoutSize Integer.MAX_VALUE.
, .
, , , , , : -)