void (DefaultMutableTreeNode node) { for (Enumeration<DefaultMutableTreeNode> e = node.children(); e.hasMoreElements(); ) { DefaultMutableTreeNode child = e.nextElement(); String name = (String) child.getUserObject(); System.out.println(name); } }