[英]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中,有一种方法可以限制用户使用鼠标来调整行的高度或列的宽度。
JTable table=new JTable();
table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
table.getTableHeader().setReorderingAllowed(false);
The table is inside a scroll panel. 该表位于滚动面板内。
。table.getTableHeader()setResizingAllowed(假);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.