Is it possible to tell JPanel to set its size to fit all components that it contains? Something like pack() for JFrame.
pack()
edit: The trick with preferredSize d
JSplitPanes are a bit fussy when it comes to its children's sizes, have a look at the Java tutorial. Are you using the GridBagLayout correctly? Looks like it's not setting the right JPanel's minimum size properly.