Component (JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { invalidate(); if (value instanceof CheckedTreeNode node) { State state = getNodeStatus(node); myCheckbox.setVisible(true); myCheckbox.setEnabled(node.isEnabled()); myCheckbox.setSelected(state != State.NOT_SELECTED); myCheckbox.setState(state); myCheckbox.setOpaque(false); myCheckbox.setBackground(null); setBackground(null); if (UIUtil.isUnderWin10LookAndFeel()) { Object hoverValue = getClientProperty(UIUtil.CHECKBOX_ROLLOVER_PROPERTY); myCheckbox.getModel().setRollover(hoverValue == value); Object pressedValue = getClientProperty(UIUtil.CHECKBOX_PRESSED_PROPERTY); myCheckbox.getModel().setPressed(pressedValue == value); } } else { myCheckbox.setVisible(false); } myTextRenderer.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus); customizeRenderer(tree, value, selected, expanded, leaf, row, hasFocus); revalidate(); return this; }