Article View: borland.public.jbuilder.java.swing
Article #12686Re: JTree update problems
From: Tom Kückelhahn Nilson
Date: Wed, 25 Nov 1998 00:00
Date: Wed, 25 Nov 1998 00:00
27 lines
1758 bytes
1758 bytes
Will Sargent wrote: > 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. > I have a problem with JTree that looks like the same: In a class I have a JTree that is constructed with it's TreeModel as parameter in the constructor. When this tree is constructed and displayed the TreeModel's data is changed (some more nodes are added). Simply having the JTree to repaint isn't enough. It is only painted correctly if the node with the updated branch hasn't been showing yet. Tom
Technical Details
Message-ID:
<365C1FCF.6DB148EF@krause.dk>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<6v24o7$3kh7@forums.borland.com> <01bdedfc$b93bfde0$2dd96fc2@pc12.gordion.com> <363F61A0.5BDB169D@hsr.ch> <365A0249.77931426@confluent.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,d70978371e769ca6 X-Google-Attributes: gid111d45,public From: Tom Kückelhahn Nilson <tom@krause.dk> Subject: Re: JTree update problems Date: 1998/11/25 Message-ID: <365C1FCF.6DB148EF@krause.dk> X-Deja-AN: 415576409 Content-Transfer-Encoding: 7bit References: <6v24o7$3kh7@forums.borland.com> <01bdedfc$b93bfde0$2dd96fc2@pc12.gordion.com> <363F61A0.5BDB169D@hsr.ch> <365A0249.77931426@confluent.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Trace: 25 Nov 1998 15:18:07 GMT, 195.184.43.74 MIME-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing