Article View: borland.public.jbuilder.java.swing
Article #7995Newbie Question with JTrees
From: ssmith2
Date: Sun, 05 Nov 2000 00:00
Date: Sun, 05 Nov 2000 00:00
40 lines
1586 bytes
1586 bytes
Hi all,
I'm working with a JTree and a Table. When I click on a node I want to find
it's primary Ancestor (Say I click Node1.1.1_Value) using the TreePath
[root, Node1, Node1.1, Node1.1.1, Value(Leaf)]. I extract the [root, Node1]
TreePath but do not know how to select "Node1" and traverse it to get all
the info and put it in a JTable. Can anyone help or show me some code that
would assist me in learning? I have added a basic look of the Jtree for
help.
Thanking in advance,
Steve
root
|
--Node1
|
Node1.1
|
--Node1.1.1
|
Value(Leaf)
--Node1.2
|
--Node1.2.1
|
Value(Leaf)
--Node2
|
Node2.1
|
--Node2.1.1
|
Value(Leaf)
--Node2.2
|
--Node2.2.1
|
Value(Leaf)
Technical Details
Message-ID:
<VFkN5.20338$%j.6552714@typhoon.southeast.rr.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,818dbb3684d5330c,start X-Google-Attributes: gid111d45,public From: <ssmith2@carolina.rr.com> Subject: Newbie Question with JTrees Date: 2000/11/05 Message-ID: <VFkN5.20338$%j.6552714@typhoon.southeast.rr.com> X-Deja-AN: 690049328 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Complaints-To: abuse@rr.com X-Trace: typhoon.southeast.rr.com 973461237 24.27.252.170 (Sun, 05 Nov 2000 16:53:57 EST) Organization: RoadRunner - Carolina NNTP-Posting-Date: Sun, 05 Nov 2000 16:53:57 EST Newsgroups: borland.public.jbuilder.java.swing