JAVA TREE使用核心教程
//更新GUI中的树
void refreshTree() {
//这里应该列取指定路径下的文件夹
rootNode.removeAllChildren();
File dirFile = new File(getCurrentLocalProjectPath());
File[] files = dirFile.listFiles();
for(File file : files){
DefaultMutableTreeNode node = new DefaultMutableTreeNode(
file);
rootNode.add(node);
System.out.println(file.getAbsolutePath());
}
//tree.expandPath(new TreePath(rootNode));
tree.updateUI();
}