else prefSize = c.getSize();  return prefSize;
return new Dimension(prefSize); }
    public Dimension preferredLayoutSize(Container c)    {      Dimension menuBarSize;      Dimension prefSize;      Dimension containerSize = c.getSize();      Dimension contentPaneSize = contentPane.getPreferredSize();      if (containerSize.width == 0 && containerSize.height == 0)        {          if (menuBar != null)            {              int maxWidth;              menuBarSize = menuBar.getPreferredSize();              maxWidth = Math.max(menuBarSize.width, contentPaneSize.width);              prefSize = new Dimension(maxWidth,                                       contentPaneSize.height                                       + menuBarSize.height);            }          else            prefSize = contentPaneSize;        }      else        prefSize = c.getSize();      return prefSize;    }