Skip to content
Advertisement

Change Color of JTable Row Based on the Value of the Database

JavaScript

};

This is my New Codes im trying to get the value of column 4 and equal it to single if its true the background is change. but this is not working

Advertisement

Answer

Overriding the prepareRender(...) method of the JTable allows your to customize rendering for the entire row based on a value in one of the columns.

The basic logic would be something like:

JavaScript

Check out Table Row Rendering for more information and working examples.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement