Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to show row number for each row in JTable?

843804Dec 6 2004 — edited Dec 7 2004
Hi all,
I need to show row nuber for each row in JTable.
The JTable rows can be added/removed at run time and the size of each row can be changed (The row size isn't fixed).

I've tried to do this using another JTable as a RowHeader but the problem is that when I update the orginal JTable row height I also need to update the RowHeader JTable row height.

Does any one know how to do this better?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 4 2005
Added on Dec 6 2004
9 comments
1,936 views