Component (JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { // reset custom colors and let DefaultTableCellRenderer to set ones setForeground(null); setBackground(null); Component c = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); MavenSearchIndex index = getIndexAt(row); if (index.getFailureMessage() != null) { if (isSelected) { setForeground(JBColor.PINK); } else { setBackground(JBColor.PINK); } } return c; }