That constructor creates a new JTree with a DefaultTreeModel based upon the root node you supply. If you wish to modify the tree, you can either modify the contents of that tree model directly (by adding or removing nodes wherever you like) or you can construct a new TreeModel and set the JTree to use that model instead with JTree.setModel(javax.swing.tree.TreeModel) .
This tutorial on How to Use Trees might be helpful.
Ezzaral
Posting Genius
15,986 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847