🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: JTree update problems

#12682
From: Will Sargent
Date: Mon, 23 Nov 1998 00:00
54 lines
2467 bytes
This is a multi-part message in MIME format.
--------------7884AA756F785E8E8E43D8FC
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit



Martin Steger wrote:

> Hi there
>
> I've a big Problem with updating my JTree from the swing Package. I've
> created my own Treemodel and with this Treemodel I've createt my JTree.
> My big Problem is, to make the changes in the model visible in the
> JTree. I tried a view methods from JTree, but nothing works. When a
> change is made in the model, I'm fireing a Event to a AbstractTreeModel
> and this one passes this to a TreeModelListener. This one try to update
> the tree, but with no result. I tried to do that since two days.
>
> Has anybody a good example, or the solution for this problem.

If it's going to the tree model listener, but not updating the graphical
representation of the tree, then it sounds like you're inserting directly
into a node.  Are you using the model's insertNodeInto and
removeNodeFromParent methods?

If you are, then check to see that you've created the tree with the model.
i.e. new JTree(myCustomModel).  Finally, if that doesn't work, make sure
the tree is in a container which repaints itself -- putting it into the
content pane of a frame should work.  If that doesn't work... check the
Java bug list.

Will.

--------------7884AA756F785E8E8E43D8FC
Content-Type: text/x-vcard; charset=us-ascii;
 name="wsargent.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Will Sargent
Content-Disposition: attachment;
 filename="wsargent.vcf"

begin:vcard 
n:Sargent;Will
x-mozilla-html:FALSE
org:Confluent;
adr:;;;;;;
version:2.1
email;internet:wsargent@confluent.com
title:Software Engineer
fn:Will Sargent
end:vcard

--------------7884AA756F785E8E8E43D8FC--
Technical Details
Message-ID: <365A0249.77931426@confluent.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <6v24o7$3kh7@forums.borland.com> <01bdedfc$b93bfde0$2dd96fc2@pc12.gordion.com> <363F61A0.5BDB169D@hsr.ch>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,d70978371e769ca6
X-Google-Attributes: gid111d45,public
From: Will Sargent <wsargent@confluent.com>
Subject: Re: JTree update problems
Date: 1998/11/23
Message-ID: <365A0249.77931426@confluent.com>
X-Deja-AN: 414994727
References: <6v24o7$3kh7@forums.borland.com> <01bdedfc$b93bfde0$2dd96fc2@pc12.gordion.com> <363F61A0.5BDB169D@hsr.ch>
X-Accept-Language: en
Content-Type: multipart/mixed; boundary="------------7884AA756F785E8E8E43D8FC"
Organization: Confluent
Mime-Version: 1.0
Reply-To: wsargent@confluent.com
Newsgroups: borland.public.jbuilder.java.swing