How to change color of row in JTable
问题 I want to change color of whole row in my JTable. I defined the JTable: JTable table = new JTable(data, columnNames); where data, columnNames are the String tables. The most common way to do this is to write own class: 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 =