public Dimension getPreferredSize(JComponent c)
public Dimension getPreferredSize(JComponent ignored)
  public Dimension getPreferredSize(JComponent c)  {    TableColumnModel cmod = header.getColumnModel();    TableCellRenderer defaultRend = header.getDefaultRenderer();    int ncols = cmod.getColumnCount();        Dimension ret = new Dimension(0,0);    int spacing = 0;    if (header.getTable() != null         && header.getTable().getIntercellSpacing() != null)      spacing = header.getTable().getIntercellSpacing().width;        for (int i = 0; i < ncols; ++i)            {        TableColumn col = cmod.getColumn(i);        TableCellRenderer rend = col.getHeaderRenderer();        if (rend == null)          rend = defaultRend;        Object val = col.getHeaderValue();        Component comp = rend.getTableCellRendererComponent(header.getTable(),                                                            val,                                                            false, // isSelected                                                            false, // isFocused                                                            -1, i);        comp.setFont(header.getFont());        comp.setBackground(header.getBackground());        comp.setForeground(header.getForeground());        if (comp instanceof JComponent)          ((JComponent)comp).setBorder(cellBorder);        Dimension d = comp.getPreferredSize();        ret.width += spacing;        ret.height = Math.max(d.height, ret.height);              }    ret.width = cmod.getTotalColumnWidth();    return ret;  }