JTree, iterieren über alle Knoten
javax.swing.JTree
DefaultMutableTreeNode rootNode = ... for (Enumeration e = rootNode.depthFirstEnumeration(); e.hasMoreElements();) { DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) e.nextElement(); System.out.println(treeNode); }
Stichworte:
TreeNode, iterieren, JTree