Dimension dims = new Dimension(0, 0); Insets insets = c.getInsets();
Dimension pref = verticalPrefSize;
  public Dimension getPreferredSize(JComponent c)  {    Dimension dims = new Dimension(0, 0);    Insets insets = c.getInsets();    if (c instanceof JSeparator)      {	JSeparator s = (JSeparator) c;	if (s.getOrientation() == JSeparator.HORIZONTAL)	{	  dims.height = 2;	  dims.width = 40;	}	else	{	  dims.width = 2;	  dims.height = 40;	}      }    dims.width += insets.left + insets.right;    dims.height += insets.top + insets.bottom;        return dims;  }