开发者

JTable adjusting column width or height

开发者 https://www.devze.com 2023-01-04 02:51 出处:网络
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

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(fals开发者_如何学运维e);

The table is inside a scroll panel.


table.getTableHeader().setResizingAllowed(false);

0

精彩评论

暂无评论...
验证码 换一张
取 消