Component (JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { if (table instanceof TreeTable) { table.setEnabled(true); DefaultMutableTreeNode valueNode = (DefaultMutableTreeNode)((TreeTable) table).getTree().getPathForRow(row).getLastPathComponent(); if (valueNode instanceof SettingsTreeNode settingsNode) { myLabel.setText(settingsNode.getValueString()); myCheckBox.setEnabled(true); myCheckBox.setSelected(settingsNode.accepted); } else { myLabel.setBackground(table.getBackground()); myCheckBox.setEnabled(false); } } return myPanel; }