Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Expanding certain path to certain node in a JTree

Thread Tools

Expanding certain path to certain node in a JTree
Posts: n/a

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

Can anyone help?

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
JTree Selection lost when JTree looses focus jumpz Java 3 11-12-2007 03:55 PM
xsl variable $node/text() but $node can non-node-set help! Tjerk Wolterink XML 2 08-24-2006 03:28 AM
How to set the node indent property between the parent node and the leaf node ASP .Net 0 02-13-2006 07:11 PM
expanding a Jtree... 6e Java 2 10-07-2005 08:53 PM
Jtree - node from path question Tim Java 2 02-17-2004 08:30 AM