• Post Reply Bookmark Topic Watch Topic
  • New Topic

building a JTree  RSS feed

 
kristof vanhaeren
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a DOM in-memory tree of an xml file, and now I want to create a JTree from this data.
Problem is that I need to use a recursive method to keep the right parent-child relationships in the JTree, but my logic seems flawed.

Does anyone have an example of such a method?

tx!
 
kristof vanhaeren
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Never mind, I found a very useful class for just this purpose:
org.w3c.dom.traversal.TreeWalker
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!