@Test
public void testTableCopeWithCreateNullColumn() {

    // factory returns null on create
    ColumnFactory factory = new ColumnFactory() {
        @Override
        public TableColumnExt createTableColumn(int modelIndex) {
            return modelIndex > 0 ? super.createTableColumn(modelIndex) : null;
        }
        
        
    };
    JXTable table = new JXTable();
    table.setColumnFactory(factory);
    TableModel model = new DefaultTableModel(0, 10);
    table.setModel(model);
    assertEquals("factory must have created one less than model columns", 
            model.getColumnCount() - 1, table.getColumnCount());
}