for (Enumeration e = root.preorderEnumeration(); e.hasMoreElements() && theNode == null;) {
DefaultMutableTreeNode node = (DefaultMutableTreeNode) e.nextElement();
}
For that example above, how can you find out how deep you are in the tree branch? If you are iterating over siblings, how do you get it's index?