return getPreferredSize(comp);
int maxTotalColumnWidth = 0; for (int i = 0; i < table.getColumnCount(); i++) maxTotalColumnWidth += table.getColumnModel().getColumn(i).getMaxWidth(); if (maxTotalColumnWidth == 0 || table.getRowCount() == 0) return null; return new Dimension(maxTotalColumnWidth, table.getRowCount()*table.getRowHeight());
  public Dimension getMaximumSize(JComponent comp)             {    return getPreferredSize(comp);  }