I'm writing an application for processing scientific data. The data is displayed in a jTable. I'm done with the data processing itself, now I want to do some conditional formatting to make interpretation easier for the end user.
- The last column of the table contains a threshold value, and if the data in a particular cell is below the threshold at the end of the row the fond needs to be changed to a different color.
- On top of that, if a value is below zero the background color of that cell needs to be changed. This rule applies to the entire table.
So basically for the first problem the conditional formatting has to be set in a different way for every row.
I know it will involve overriding the getTableCellRendererComponent, but from the examples I've studied I can't quite figure out how to this on a row per row basis, I'm totally new to jTable.
Any suggestions/advice/good examples to get me going?