I am just overriding the following methods in the XMLTreeNode class:-
publicboolean equals(Object obj)
publicvoid setParent(javax.swing.tree.MutableTreeNode newParent)
public javax.swing.tree.TreeNode getParent()
publicvoid setUserObject(Object userObject)
public Object getUserObject()
public String toString()
In the equals() method i am comparing the content of the user object which is actually org.jdom.Element.
In the XMLTreeNode class i have private XMLTreeNode parent;, which i am using to set/getparent() methods.
In the set/getUserObject() methods i am setting the nodeElement (private org.jdom.Element nodeElement;)object in the XMLTreeNode class.
In the toString() methog i am returning nodeElement.getTextTrim();
I have tried you codes.
As you said, only root node is displayed after xml document loaded.
Do you work out the problem? And what jdom version are you using?
I am very insterested in XML tree.