开发者

Displaying a jtable starting from column 100 - java

开发者 https://www.devze.com 2023-02-28 10:03 出处:网络
If I have a jTable ( inside a jScrollPane ) with 1000+ columns. Is it possible when creating this jtable that the firs开发者_JAVA百科t column to be displayed is the 100th column ? all the previous col

If I have a jTable ( inside a jScrollPane ) with 1000+ columns. Is it possible when creating this jtable that the firs开发者_JAVA百科t column to be displayed is the 100th column ? 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)); 
0

精彩评论

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