Expanding certain path to certain node in a JTree

Discussion in 'Java' started by arun.hallan, Jan 8, 2005.

  1. arun.hallan

    arun.hallan Guest

    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?
     
    arun.hallan, Jan 8, 2005
    #1
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.