Component (JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { final Component component = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); final String macroValue = getMacroValueAt(row); component.setForeground(macroValue.length() == 0 ? JBColor.RED : isSelected ? table.getSelectionForeground() : table.getForeground()); return component; }