Component (JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row) { final ErrorTreeElement element = getElement(value); if (element instanceof EditableMessageElement editableMessageElement) { final CustomizeColoredTreeCellRenderer leftSelfRenderer = editableMessageElement.getLeftSelfRenderer(); final TreeCellEditor rightSelfEditor = editableMessageElement.getRightSelfEditor(); myColoredTreeCellRenderer.setCurrentCallback(leftSelfRenderer); myRightCellRenderer.setCurrentCallback(rightSelfEditor); return myWrapperEditor.getTreeCellEditorComponent(tree, value, selected, expanded, leaf, row); } return myTree.getCellRenderer().getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, true); }