void (boolean isSelected, JTable table, boolean hasFocus, final int row, final int column) { setForeground(isSelected ? UIUtil.getTableSelectionForeground() : UIUtil.getTableForeground()); setBackground(isSelected ? UIUtil.getTableSelectionBackground(true) : UIUtil.getTableBackground()); if (hasFocus) { if (table.isCellEditable(row, column)) { super.setForeground(UIUtil.getTableFocusCellForeground()); super.setBackground(UIUtil.getTableFocusCellBackground()); } } }