I would like to select an ancestor DefaultMutableTreeNode and get all descendant DefaultMutableTreeNode of this ancestor in the JTree.
I am using TreeSelectionListener to catch selection event on the current JTree.
Basically, what I would like to be able to do is, select an ancestor node, and be able to copy it’s descendant tree into another ancestor.
You should be able to walk the subtree recursively through the children() of the DMTN.
FWIW:
Maybe this will help a little, but ExampleDepot is a good site for Java example code, and they have a lot of Swing examples.
Here is a link to their set of JTree examples. I hope you find what you need.
http://www.exampledepot.com/egs/javax.swing.tree/pkg.html