Article View: borland.public.jbuilder.java.swing
Article #10648Re: simple tree question..
From: Rich Wilkman
Date: Tue, 24 Aug 1999 00:00
Date: Tue, 24 Aug 1999 00:00
41 lines
1778 bytes
1778 bytes
EA: Why not set the model to null (or better, set it to a model with just a root). The view (tree) would then reflect the change. It helps to remember that almost none of the methds for tree nodes are recursive. They generally don't see past their own "level". -Rich "EA." wrote: > > How do you remove all nodes from a tree? i.e. clear it all! > > I tried different things but it they don't seem to work properly it > deletes one > node only and stops! I tried things like: > > 1- myRoot.removeAllChildren() > 2- ((DefaultTreeModel)(myTree.getModel())).removeNodeFromParent(myNode); > > where myNode is type DefaultMutableTreeNode > > it seems it doesn't "fireTreeNodesRemoved" or something! > > Thanks for help -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Rich Wilkman Quality Assurance Manager Borland JBuilder Team If you see something that looks like an opinion up there, it's mine and mine alone. Mail sent to me from the newsgroups won't bounce but will be ignored. If I have time, I'll respond, but you have a better chance if you confine your posts to the newsgroups =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Technical Details
Message-ID:
<37C2B67B.FA0C387D@inprise.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<37C16994.A3B9926@magnus.uwaterloo.ca>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,f800dadaf3e3db41 X-Google-Attributes: gid111d45,public From: Rich Wilkman <rwilkman@inprise.com> Subject: Re: simple tree question.. Date: 1999/08/24 Message-ID: <37C2B67B.FA0C387D@inprise.com> X-Deja-AN: 516609109 Content-Transfer-Encoding: 7bit References: <37C16994.A3B9926@magnus.uwaterloo.ca> 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