src/main/java/tuupertunut/hintahaku/gui/util/TableColumnAdjuster.java
/*
     * Adjust the widths of all the columns in the table
     */
Adjust the widths of all the columns in the table
Adjust the widths of all the columns in the table
public void adjustColumns() {
        TableColumnModel tcm = table.getColumnModel();
        /* Cancel all cell editing when columns are adjusting. This is to fix a
         * bug where clearing all rows from the table, while is it being edited,
         * causes IndexOutOfBoundsException. */
        if (table.isEditing()) {
            table.getCellEditor().cancelCellEditing();
        }
        for (int i = 0; i < tcm.getColumnCount(); i++) {
            adjustColumn(i);
        }
    }
public void adjustColumns ( ) { TableColumnModel tcm = table . getColumnModel ( ) ; /* Cancel all cell editing when columns are adjusting. This is to fix a
         * bug where clearing all rows from the table, while is it being edited,
         * causes IndexOutOfBoundsException. */ if ( table . isEditing ( ) ) { table . getCellEditor ( ) . cancelCellEditing ( ) ; } for ( int i = 0 ; i < tcm . getColumnCount ( ) ; i ++ ) { adjustColumn ( i ) ; } }
Adjust the widths of all the columns in the table
Adjust the widths of all the columns in the table