return new Dimension(width, height);
int width = axis == SwingConstants.HORIZONTAL ? primary : secondary; int height = axis == SwingConstants.VERTICAL ? secondary : primary;  Insets i = splitPane.getInsets(); dim.setSize(width + i.left + i.right, height + i.top + i.bottom);
    public Dimension preferredLayoutSize(Container target)    {      if (target instanceof JSplitPane)        {	  JSplitPane split = (JSplitPane) target;	  Insets insets = target.getInsets();	  int height = 0;	  int width = 0;	  for (int i = 0; i < components.length; i++)	    {	      if (components[i] == null)		continue;	      Dimension dims = components[i].getPreferredSize();	      if (dims != null)	        {		  width += dims.width;                  if (!(components[i] instanceof BasicSplitPaneDivider))		    height = Math.max(height, dims.height);	        }	    }	  return new Dimension(width, height);	        }      return null;    }