Feb 08

By default the column widths of a JTable are automatically set for you. To fix the width of a specified column you need to use the TableColumn for the column (there’s one for each column).

    TableColumn column = table.getColumnModel().getColumn(columnIndex);
    column.setPreferredWidth(width);
    column.setMaxWidth(width);

written by objects \\ tags: , , , ,