if (maxTotalColumnWidth == 0 || table.getRowCount() == 0) return null; return new Dimension(maxTotalColumnWidth, table.getRowCount()* (table.getRowHeight()+table.getRowMargin()));
return new Dimension(maxTotalColumnWidth, getHeight());
  public Dimension getMaximumSize(JComponent 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()+table.getRowMargin()));  }