public DefaultMutableTreeNode findNodeForObject(Object nodeObject) {
Enumeration e = rootNode.breadthFirstEnumeration();
while (e.hasMoreElements()) {
DefaultMutableTreeNode element = (DefaultMutableTreeNode) e.nextElement();
if (element.getUserObject().equals(nodeObject))
return element;
}
return null;
}