如何清空JTree的节点

root.removeAllChildren(); //根节点
tree.updateUI(); //更新树,记得要更新树,否则无效

  

posted @ 2021-04-29 10:25  信铁寒胜  阅读(200)  评论(0)    收藏  举报