private static Component setLabelColors(final Component label, final JTable table, final boolean isSelected) {
    if (label instanceof JComponent) {
      ((JComponent)label).setOpaque(true);
    }
    label.setForeground(isSelected ? table.getSelectionForeground() : table.getForeground());
    label.setBackground(isSelected ? table.getSelectionBackground() : table.getBackground());
    return label;
  }
private static Component setLabelColors(final Component label, final JTable table, final boolean isSelected)