Changing jTable cell color by value

According to all the examples I've looked at my code should work. Why isn't it working?

I am able to change the cell color in my table if i specify a row and column but it's not working if I specify a value.

Here is what I have:

//Custom renderer to color table cells red

//cellValue = 00:00:00 - a LocalTime in the table, so all cells with that value should be red.

public class MyTableCellRenderer extends DefaultTableCellRenderer {

public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {

Component c =...

Read More »

By: StackOverFlow - Sunday, 11 March

Related Posts