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