void (boolean isSelected, JTable table, boolean hasFocus, final int row, final int column) { if (isSelected) { setForeground(table.getSelectionForeground()); } else { setForeground(UIUtil.getTableForeground()); } if (hasFocus) { setForeground(UIUtil.getTableFocusCellForeground()); } }