简体   繁体   English

从第100列开始显示JTable-Java

[英]Displaying a jtable starting from column 100 - java

If I have a jTable ( inside a jScrollPane ) with 1000+ columns. 如果我有一个jTable(在jScrollPane内)有1000多个列。 Is it possible when creating this jtable that the first column to be displayed is the 100th column ? 创建此jtable时,可能要显示的第一列是第100列吗? all the previous columns could be seen by scrolling backwards. 向后滚动可以看到所有前面的列。 Thanks for any help. 谢谢你的帮助。

Try 尝试

int columnToScrollTo = 100;
table.scrollRectToVisible(table.getCellRect(0, columnToScrollTo, true)); 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM