private void removeTreeNode(DefaultMutableTreeNode nodeToRemove){
  if (nodeToRemove != null) {
    DefaultMutableTreeNode parent=(DefaultMutableTreeNode)nodeToRemove.getParent();
    nodeMap.remove(nodeToRemove.getUserObject());
    if (treeModel != null) {
      if (parent != null) {
        treeModel.removeNodeFromParent(nodeToRemove);
        treeModel.nodeChanged(parent);
      }
    }
    if (symbolTree != null) {
      symbolTree.setSelectionPath(getPath(parent));
    }
  }
}

private void removeTreeNode ( DefaultMutableTreeNode nodeToRemove ) { if ( nodeToRemove != null ) { DefaultMutableTreeNode parent = ( DefaultMutableTreeNode ) nodeToRemove . getParent ( ) ; nodeMap . remove ( nodeToRemove . getUserObject ( ) ) ; if ( treeModel != null ) { if ( parent != null ) { treeModel . removeNodeFromParent ( nodeToRemove ) ; treeModel . nodeChanged ( parent ) ; } } if ( symbolTree != null ) { symbolTree . setSelectionPath ( getPath ( parent ) ) ; } } }
removes the tree node .
