else preferredSize = null;
  public void setPreferredSize(Dimension pref)  {    Dimension oldPreferredSize = preferredSize;    preferredSize = new Dimension(pref);    firePropertyChange("preferredSize", oldPreferredSize, preferredSize);  }