JViewport vp = (JViewport)parent; Component view = vp.getView(); if (view != null) return view.getMinimumSize(); else return new Dimension();
return new Dimension(4, 4);
  public Dimension minimumLayoutSize(Container parent)   {    JViewport vp = (JViewport)parent;    Component view = vp.getView();    if (view != null)      return view.getMinimumSize();    else      return new Dimension();  }