🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #10643

Re: simple tree question..

#10643
From: Gavin Campbell
Date: Tue, 24 Aug 1999 00:00
22 lines
1345 bytes
why not just reinstantiate it against a tree model which uses the current
root node

??

EA. <eaabouzo@magnus.uwaterloo.ca> wrote in message
news:37C16994.A3B9926@magnus.uwaterloo.ca...
> 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
>
Technical Details
Message-ID: <935482751.17362.0.nnrp-06.c1c3e175@news.demon.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <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: "Gavin Campbell" <gavinc@demon.net>
Subject: Re: simple tree question..
Date: 1999/08/24
Message-ID: <935482751.17362.0.nnrp-06.c1c3e175@news.demon.co.uk>
X-Deja-AN: 516498977
X-NNTP-Posting-Host: gavinc.eng.demon.net:193.195.225.117
References: <37C16994.A3B9926@magnus.uwaterloo.ca>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
X-Complaints-To: abuse@demon.net
X-Trace: news.demon.co.uk 935482751 nnrp-06:17362 NO-IDENT gavinc.eng.demon.net:193.195.225.117
X-MSMail-Priority: Normal
Newsgroups: borland.public.jbuilder.java.swing