if (comp == null)
if (comp == null || !comp.isVisible())
calcCompSize(Component comp, int what){  if (comp == null)    return new Dimension(0, 0);  if (what == MIN)    return comp.getMinimumSize();  else if (what == MAX)    return comp.getMaximumSize();  return comp.getPreferredSize();}