Java Swing - Adding a row # column (row header) to a JTable

Posted by llm on Stack Overflow See other posts from Stack Overflow or by llm
Published on 2010-05-10T19:27:58Z Indexed on 2010/05/10 20:04 UTC
Read the original article Hit count: 237

Filed under:
|
|

I have data from a database loaded into a JTable through a custom table model. I want to have a column (should be the first column) which simply shows the display row number (i.e. it is not tied to any data (or sorting) but is simply the row number on the screen starting at 1). These "row headers" should be grayed out like the row headers.

Any idea how to do this?

Thanks

© Stack Overflow or respective owner

Related posts about java

Related posts about swing