TableCellRenderer (final ScopeSetting scopeSetting) { return new DefaultTableCellRenderer() { @Override public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { final Component rendererComponent = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); if (!isSelected) { final CopyrightProfile profile = myProfilesModel.getAllProfiles().get(scopeSetting.getProfileName()); setForeground(profile == null ? JBColor.RED : UIUtil.getTableForeground()); } setText(scopeSetting.getProfileName()); return rendererComponent; } }; }