🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #7585

Re: JTree: updating the data

#7585
From: Torsten Welches
Date: Tue, 12 Jun 2001 06:19
22 lines
1574 bytes
Mark,

assuming your TreeModel is a DefaultTreeModel you can try
model.reload();

Torsten

"MarkW" <xx@yy.com> wrote:
>Hi people,
>i�m using a descendant of JTree to display customer-info. Works fine except
>when I try to update the data. I tried just setting the model of the tree
>with a new treemodel and also as another attempt using
>root.removeAllChildren() and then appending the new nodes.
>As a result I just get the "empty" nodes without a title. When I doubleclick
>on the nodes the title is then shown. I�ve tried repainting, updating the
>tree, the panel on which the tree resides but without success!
>
>Anybody got an idea how to do this??
>Mark
>
>
Technical Details
Message-ID: <3b25b46d$1_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!newsfeed1.uni2.dk!newssuck.uni2.dk!dnews
References: <3b20c4b1_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f74b3,f502df7c4b0a5f8a
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-06-11 23:42:19 PST
From: "Torsten Welches" <torsten.welches@who.cares.netcologne.de>
Sender: "Torsten Welches" <torsten.welches@who.cares.netcologne.de>
Reply-To: "Torsten Welches" <torsten.welches@who.cares.netcologne.de>
Subject: Re: JTree: updating the data
Newsgroups: borland.public.jbuilder.java.language
X-User-Info: 193.158.55.74 193.158.55.74    
References:  <3b20c4b1_1@dnews> 
NNTP-Posting-Host: 207.105.83.65
Message-ID: <3b25b46d$1_2@dnews>
Date: 11 Jun 2001 23:19:25 -0700
X-Trace: dnews 992326765 207.105.83.65 (11 Jun 2001 23:19:25 -0700)
Lines: 23
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!newsfeed1.uni2.dk!newssuck.uni2.dk!dnews