Article View: borland.public.jbuilder.java.swing
Article #12261JTree problem - adding nodes after root is displayed
From: Tom Ranz
Date: Mon, 08 Feb 1999 00:00
Date: Mon, 08 Feb 1999 00:00
23 lines
1196 bytes
1196 bytes
Hi,
I have noticed when trying to add child nodes to an existing and
displayed root node multiple times that the new child nodes are added to
the root node but I cannot get them to display.
Below is sample code:
{
DefaultMutableTreeNode dmtn;
rootNode.add(dmtn = new DefaultMutableTreeNode(newName, true));
myTree.expandPath(new TreePath(rootNode.getPath()));
}
The first time the above executes it works, after that it doesn't. The
new nodes *are* added to the root as children but I cannot get them to
display, even with the mouse when clicking on the tree when running.
Any help appretiated!
Tom
Technical Details
Message-ID:
<36BF42DD.6CAA7C6A@mindspring.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,b6c9cb4d911d55be,start X-Google-Attributes: gid111d45,public From: Tom Ranz <teranz@mindspring.com> Subject: JTree problem - adding nodes after root is displayed Date: 1999/02/08 Message-ID: <36BF42DD.6CAA7C6A@mindspring.com> X-Deja-AN: 442104216 Content-Transfer-Encoding: 7bit X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing