if (headerRenderer == null) return; Component c = headerRenderer.getTableCellRendererComponent(null, getHeaderValue(), false, false, 0, 0); Dimension min = c.getMinimumSize(); Dimension max = c.getMaximumSize(); Dimension pref = c.getPreferredSize(); setMinWidth(min.width); setMaxWidth(max.width); setPreferredWidth(pref.width); setWidth(pref.width);
  public void sizeWidthToFit()  {    // TODO  }