@Override public Component getTableCellRendererComponent( JTable table, Object value, boolean isSelected, boolean isFocused, int row, int col) { NLaboImportSummary summary = (NLaboImportSummary) tableModel.getObject(row); if (isSelected) { this.setBackground(table.getSelectionBackground()); this.setForeground(table.getSelectionForeground()); } else { if (summary != null && summary.getKarteId() == null) { this.setBackground(UNCONSTRAINED_COLOR); } else { if ((row & (1)) == 0) { this.setBackground(EVEN_COLOR); } else { this.setBackground(ODD_COLOR); } } this.setForeground(table.getForeground()); } if (value != null && value instanceof String) { this.setText((String) value); } else { this.setText(value == null ? "" : value.toString()); } return this; }