Article View: borland.public.jbuilder.java.swing
Article #8049JTree question
From: Paolo Facciocchi
Date: Tue, 21 Nov 2000 00:00
Date: Tue, 21 Nov 2000 00:00
19 lines
1032 bytes
1032 bytes
I would like to programmatically select a particular node inside a JTree
where all nodes are DefaultMutableTreeNodes instances.
So I wrote:
JTree.setSelectionPath(new TreePath[] {new
DefaultMutableTreeNode("CaptionFirstNode"), new
DefaultMutableTreeNode("CaptionSecondNode"), ...})
But this seems not to work !
Am I doing something wrong ?
Do I need the same tree's DefaultMutableTreeNode instances to construct the
TreePath, instead of creating new ones?
My config is JBuilder 4 (JDK 1.3) on WinNT4.
Thank you in advance,
Paolo
Technical Details
Message-ID:
<3a1a60ae_1@dnews>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,5b58b2db5f1670eb,start X-Google-Attributes: gid111d45,public From: "Paolo Facciocchi" <pfacciocchi@decinf.it> Subject: JTree question Date: 2000/11/21 Message-ID: <3a1a60ae_1@dnews> X-Deja-AN: 696130143 X-Trace: 21 Nov 2000 03:46:54 -0800, 195.103.165.194 X-MSMail-Priority: Normal X-Priority: 3 Newsgroups: borland.public.jbuilder.java.swing X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300