Only 48 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Making Table scroll to current selection  RSS feed

 
Aaron Roberts
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have selected a cell in a JTable and want the table to automatically scroll to the selected point. Is there a simple way to do this?
I would like it to either center the selection or at least place it on the first row of the table.
Regards,
Aaron R>
 
Tim Troy
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Get the row & column of the cell & use the code below.
 
Aaron Roberts
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perfect! That was exactly what I needed!
Best regards,
Aaron R>
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!