void (FocusEvent e) { DefaultMutableTreeNode node = (DefaultMutableTreeNode)myTree.getLastSelectedPathComponent(); if (node instanceof RepositoryNode && myTree.isEditing()) { //need to force repaint foreground for non-focused editing node myTree.getCellEditor().getTreeCellEditorComponent(myTree, node, true, false, false, myTree.getRowForPath( TreeUtil.getPathFromRoot(node))); } }