Component (JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); TodoPattern pattern = myPatterns.get(row); if (isSelected) { setForeground(UIUtil.getTableSelectionForeground(true)); } else { setForeground(pattern.getPattern() != null ? UIUtil.getTableForeground() : JBColor.RED); } return this; }