🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: JTree question

#29
From: Richard Wilkman
Date: Mon, 03 Aug 1998 00:00
47 lines
2353 bytes
Steve:

There's a swing specific group here now -- that might provide a better
chance for an answer.

borland.public.jbuilder.java.swing

-Rich



Acid Steve wrote:
> 
> Hi,
> While using Swing1.0.3's JTree class, i ran into following problem:
> adding Objects(new leafs or nodes) to to existing ones in a tree. The
> catch is that Object must be added not to the selection, but to parent
> Object.
> To make a long story short, what i want to do is to add child to parent
> knowing only parent Object and child Object (i don't mean adding to
> DefaultMutableTreeNode). Parent of parent, etc. is also available. Since
> function DefaulTreeModel.insertNodeInto(MutableTreeNode newChild,
> MutableTreeNode parent, int index) needs MutableTreeNode, i haven't
> found any way of getting the object of this type through the Object the
> node was created. I doubt conversion (MutableTreeNode)parent, etc. can
> do any good. So the only way it might be done is hashing
> Object-MutableTreeNode pairs when any node is created. At least it's the
> way i see it.
> Hope there are some other ways, since this one is very expensive in
> resource usage sense.
> 
>                                       Vladimir Olenin

-- 

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Rich Wilkman
Senior Quality Assurance Engineer
Borland JBuilder Team

If you see something that looks like an opinion up there,
it's mine and mine alone.

Mail sent to me from the newsgroups won't bounce but will
be ignored.  If I have time, I'll respond, but you  have
a better chance if you confine your posts to the newsgroups
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Technical Details
Message-ID: <35C5DDE2.491C1D2B@inprise.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <35C4E52F.2FD3BF76@hempseed.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: ff01d,3e44efe44e28da2b
X-Google-Attributes: gidff01d,public
X-Google-Thread: f74b3,3e44efe44e28da2b
X-Google-Attributes: gidf74b3,public
From: Richard Wilkman <rwilkman@inprise.com>
Subject: Re: JTree question
Date: 1998/08/03
Message-ID: <35C5DDE2.491C1D2B@inprise.com>
X-Deja-AN: 377513992
Content-Transfer-Encoding: 7bit
References: <35C4E52F.2FD3BF76@hempseed.com>
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language,borland.public.jbuilder.applet-issues