Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Show Row Index?  RSS feed

 
Stephanie Challand
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do you show the row index of a JTable after sorting. I keep getting the original row #. I need where it is currently in the table. I am showing the top X scores and I want the placement number as the first column.

This should be simple, but for some reason it is perplexing me this evening Thanks for the help!
 
Rob Camick
Ranch Hand
Posts: 2756
12
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want the placement number as the first column.


You can use something like the Row Number Table to display row numbers in the first column.

The row number is not part of the data in the table.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!