swing - Java: How to select all descendants of a given ancestor on the Jtree? -



swing - Java: How to select all descendants of a given ancestor on the Jtree? -

i select ancestor defaultmutabletreenode , descendant defaultmutabletreenode of ancestor in jtree.

i using treeselectionlistener grab selection event on current jtree.

basically, able is, select ancestor node, , able re-create it's descendant tree ancestor.

you should able walk subtree recursively through children() of dmtn.

fwiw:

maybe help little, exampledepot site java illustration code, , have lot of swing examples.

here link set of jtree examples. hope find need.

http://www.exampledepot.com/egs/javax.swing.tree/pkg.html

java swing jtree

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -