if (node.isLeaf() && node.getUserObject().equals(userObject))
if (node.getUserObject().equals(userObject))
  private DefaultMutableTreeNode findNode(Object userObject) {    Enumeration nodes = root.depthFirstEnumeration();    while (nodes.hasMoreElements()) {      DefaultMutableTreeNode node = 	(DefaultMutableTreeNode)nodes.nextElement();      if (node.isLeaf() &&	  node.getUserObject().equals(userObject))	return node;    }    return null;  }