Expanding certain path to certain node in a JTree

A

arun.hallan

Hi,

My program involves adding a node to another node in a JTree. Because i
need to do other operations too, the program takes the whole jtree, and
builds up a new node structure including the node just added.

The before and after trees are exactly the same apart from the new node
just added.

What i need to do is note which node has been selected before the new
node has been added (i.e. the parent node of the node just added), and
then when the operation has been done, expand the tree to this node.

I've tried everything from these forums etc - i think im having
problems because the JTree after the operation is effectively a new
tree.

Can anyone help?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,983
Messages
2,570,187
Members
46,747
Latest member
jojoBizaroo

Latest Threads

Top