Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Moving child node's parent in JTree

807589Jul 12 2008 — edited Jul 13 2008
hi guys.

What i have is a Jtree dynamically generated, im trying to re-arrange the nodes inside.
each nodes and their parents have their own values and been built with DefaultMutableTreeNode.

So im thinking, to do so i first need to analyse which child node i want to move, then remove it from its current parent, then set the new parent to this node.

I been thinking of using the values and compare them to do the parent-node matching, however, i have been looking at the APIs without luck, for methods to possible retrieve the values of the childs/parents.

Or perhaps there is a simpler way,
Does anybody have a clue where i could find some answers to this problem?

Cheers, Eric.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 10 2008
Added on Jul 12 2008
3 comments
579 views