So say that we have a JTable with 31 columns and 10 rows. And I want to change the color of the 2 Column 4 row to red. And after I do that change another cell color without
You need to set the cell renderer on the column that you want it on.
If you say that you want cell color of row 2 column 4 to be red, then you should set the renderer on the 4th column. You could even set the renderer on all columns.
Then all you have to do is do an if-check on the row. ie. if (row == 4). But I assume you would get your values from your TestHotel.v object instead.