开发者

how to convert xml document parsed by org.dom4j.io.SAXReader into a visual Swing tree?

开发者 https://www.devze.com 2023-02-20 16:52 出处:网络
I have parsed an xml document using org.dom4j.io.SAXReader, is it possible to feed this into javax.swing.tree.TreeModel and generate a dynamica开发者_开发问答lly changing visual Swing JTree?

I have parsed an xml document using org.dom4j.io.SAXReader, is it possible to feed this into javax.swing.tree.TreeModel and generate a dynamica开发者_开发问答lly changing visual Swing JTree?

For example, when I programmaticaly add or delete nodes, I want the Swing JTree to reflect teh changes immediately.

How can I achieve this, and is there a better suggestion to using dom4j ?


Have you looked at BranchTreeNode. I think this should help.

0

精彩评论

暂无评论...
验证码 换一张
取 消