Harish
Harish

Reputation: 3483

JTable adjusting column width or height

In my JTable is there a way to restrict the user in adjusting the height of the row or width of a column using the mouse.I am already using

JTable table=new JTable();
table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
table.getTableHeader().setReorderingAllowed(false);

The table is inside a scroll panel.

Upvotes: 2

Views: 1145

Answers (1)

Redlab
Redlab

Reputation: 3118

table.getTableHeader().setResizingAllowed(false);

Upvotes: 4

Related Questions