🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

simple tree question..

#10637
From: EA.
Date: Mon, 23 Aug 1999 00:00
14 lines
955 bytes
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: <37C16994.A3B9926@magnus.uwaterloo.ca>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,f800dadaf3e3db41,start
X-Google-Attributes: gid111d45,public
From: "EA." <eaabouzo@magnus.uwaterloo.ca>
Subject: simple tree question..
Date: 1999/08/23
Message-ID: <37C16994.A3B9926@magnus.uwaterloo.ca>
X-Deja-AN: 516435203
Content-Transfer-Encoding: 7bit
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Organization: Ambiance
Mime-Version: 1.0
Reply-To: eaabouzo@magnus.uwaterloo.ca
Newsgroups: borland.public.jbuilder.java.swing