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);

written by objects \\ tags: , , , ,

Array ( ) One Response to “How to fix a JTable column width”

  1. Saxonio Says:

    Thank you! It’s so simple but I didn’t cross my mind. This is the best way to fix a column’s size that only contains a checkbox.

Leave a Reply

You must be logged in to post a comment.