Zmień kolor tła jednej komórki w JTable [duplikat]

Możliwy duplikat:
Zmiana kolorów komórki Swing JTable

Opracowałem aplikację swingową, która pokazuje JTable. Chcę, aby gdy użytkownik zmodyfikował wartość komórki, zmodyfikowana komórka zmienia kolor.

To jest kod, który uruchamiam, gdy użytkownik modyfikuje komórkę:

this.myTable.getColumnModel().getColumn(column).setCellRenderer(new StatusColumnCellRenderer()); 

A to jest kod mojej klasy Render:

public class StatusColumnCellRenderer extends DefaultTableCellRenderer {

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

        //Cells are by default rendered as a JLabel.
        JLabel l = (JLabel) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, col);

        //Get the status for the current row.
        TableModelLotti tableModel = (TableModelLotti) table.getModel();

        if(isSelected)
            l.setBackground(Color.GREEN);

        //Return the JLabel which renders the cell.
        return l;
    }
}

questionAnswers(1)

yourAnswerToTheQuestion