我想得到指定节点的所有子节点treepath(路径),不是只要节点名称,我该怎么做呢?
------解决方案--------------------
- Java code
DefaultMtableTreeNode node = 指定的节点;int chlCount = node.getChildCount();List<TreePath[]> paths = new ArrayList<TreePath[]>();DefaultMtableTreeNode chlNode = null;for(int i = 0; i < chlCount; i++){ chlNode = node.getChildAt(i); paths.add(chl.getPath());}