if (layoutMgr != null) return layoutMgr.preferredLayoutSize (this);
synchronized(treeLock) { if(valid && prefSize != null) return new Dimension(prefSize); LayoutManager layout = getLayout(); if (layout != null) { Dimension layoutSize = layout.preferredLayoutSize(this); if(valid) prefSize = layoutSize; return new Dimension(layoutSize); }
  public Dimension preferredSize()  {    if (layoutMgr != null)      return layoutMgr.preferredLayoutSize (this);    else      return super.preferredSize ();  }