• Post Reply Bookmark Topic Watch Topic
  • New Topic

ensureIndexVisible for JTable  RSS feed

 
Kevin Tysen
Ranch Hand
Posts: 255
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use the ensureIndexVisible() method for my JLists sometimes, but I want to find a similar method for a JTable. I looked at the API for JTable and didn't find ensureIndexVisible(). How can I make the program scroll up or down to a certain index in a JTable?
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
table.scrollRectToVisible(table.getCellRect(..));
 
Kevin Tysen
Ranch Hand
Posts: 255
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!