JXTableHeader extends JTableHeader implements TableColumnModelExtListener { @Override public Dimension getPreferredSize() { Dimension pref = super.getPreferredSize(); pref = getPreferredSize(pref); pref.height = getMinimumHeight(pref.height); return pref; } JXTableHeader();  JXTableHeader(TableColumnModel columnModel); @Override void setTable(JTable table); @Override void columnPropertyChange(PropertyChangeEvent event); @Override Point getPopupLocation(MouseEvent event); Point getPopupTriggerLocation(); @Override String getToolTipText(MouseEvent event); TableColumnExt getColumnExt(Point point); JXTable getXTable(); boolean getResortsOnDoubleClick(); void setResortsOnDoubleClick(boolean resortsOnDoubleClick); TableCellRenderer getCellRenderer(int columnIndex); @Override Dimension getPreferredSize(); @Override void setDraggedColumn(TableColumn column); @Override void setResizingColumn(TableColumn aColumn); @Override void setDraggedDistance(int distance); @Override TableColumn getDraggedColumn();  }
@Test public void testHeaderSizeEmptyStringHeaderValue() { final String[] alternate = { "", "", }; JXTable xTable = new JXTable(10, 2); xTable.getColumn(0).setHeaderValue(alternate[0]); xTable.getColumn(1).setHeaderValue(alternate[1]); assertTrue("header height must be > 0", xTable.getTableHeader().getPreferredSize().height > 0); }
@Test public void testHeaderSizeNullHeaderValue() { final String[] alternate = { null, null, }; JXTable xTable = new JXTable(10, 2); xTable.getColumn(0).setHeaderValue(alternate[0]); xTable.getColumn(1).setHeaderValue(alternate[1]); assertTrue("header height must be > 0", xTable.getTableHeader().getPreferredSize().height > 0); }