Java Swing - Adding a row # column 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 19:34 UTC
Read the original article Hit count: 175

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 "column 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