> Does anyone know the method to add another MutableTree Node to a tree
> after a DefaultMutableTreeNode has been added? Or how to add another
> node to the tree?
[...]
> JTree tree2 = new JTree(top2);
> tree2.add(top2a); // this line gave me the error
> // cannot resolve symbol add()
You try to add the node to the JTree, which simply doesn't have an add()
method. Add the node to the model. Since you don't have an explicit
model (not a good idea), you have to get the default one from the JTree.
If the model is implemented correctly (DefaultTreeModel is), then the
model informs the JTree about the changes (see also Q6.2.1 in the FAQ).
/Thomas

Signature
The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq