void (JComponent component, boolean selected) { if (selected) { component.setForeground(UIUtil.getTableSelectionForeground()); component.setBackground(UIUtil.getTableSelectionBackground(true)); } else { component.setForeground(UIUtil.getTableForeground()); component.setBackground(UIUtil.getTableBackground()); } }