Dimension bup = buttonPanel.getMinimumSize(); Dimension fl = fileList.getMinimumSize(); return new Dimension((tp.width + bp.width + bup.width + fl.width), (tp.height + bp.height + bup.height + fl.height));
Dimension fl = fileListPanel.getMinimumSize(); return new Dimension(fl.width, tp.height + bp.height + fl.height);
  public Dimension getMinimumSize(JComponent c)  {    Dimension tp = topPanel.getMinimumSize();    Dimension bp = bottomPanel.getMinimumSize();    Dimension bup = buttonPanel.getMinimumSize();    Dimension fl = fileList.getMinimumSize();    return new Dimension((tp.width +        bp.width + bup.width + fl.width),         (tp.height + bp.height +         bup.height + fl.height));     }