• Post Reply Bookmark Topic Watch Topic
  • New Topic

make JTable scroll to a specified column  RSS feed

 
Mervin Chan
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a large JTable with 100 over columns.

I wish to allow the user to click on a button to make the JTable display scroll to a specified column.

ie, button "display column 20 onwards" will cause the Jtable to scroll to column 20.
 
Rob Spoor
Sheriff
Posts: 21050
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had the same problem once, so of course I wrote a solution
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


[edit]
for columns

[ September 26, 2007: Message edited by: Michael Dunn ]
 
Rob Spoor
Sheriff
Posts: 21050
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmmm, I must have missed those when writing my own method.

However, my method has one advantage: it doesn't scroll horizontally, only vertically. It doesn't force the first column (or any other) to be shown, it just keeps the current columns.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!