Article View: borland.public.jbuilder.java.swing
Article #7948Re: JTree - expanding multiple levels
From: Michael Rachow
Date: Tue, 14 Nov 2000 00:00
Date: Tue, 14 Nov 2000 00:00
23 lines
1025 bytes
1025 bytes
A TreePath has a special syntax even if it's represented as String. What I have done: TreePath pathXP; DefaultMutableTreeNode child; DefaultMutableTreeNode leaf; While constructing the tree after adding the leaf child.add(leaf); myclass.pathXP = new TreePath(leaf.getPath()); Later: jTree.expandPath(pathXP); Solution surely not useful for big trees. Take a look at the string representation of TrrePath. Maybe you can build it by String concatenation. Greetings Michael
Technical Details
Message-ID:
<3a11168b_1@dnews>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3a1074ca$1_2@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,182e05e01b8f6cb3 X-Google-Attributes: gid111d45,public From: "Michael Rachow" <mrachow@BeraCom.de> Subject: Re: JTree - expanding multiple levels Date: 2000/11/14 Message-ID: <3a11168b_1@dnews> X-Deja-AN: 693427893 References: <3a1074ca$1_2@dnews> X-Trace: 14 Nov 2000 02:40:11 -0800, 62.158.177.193 X-MSMail-Priority: Normal X-Priority: 3 Newsgroups: borland.public.jbuilder.java.swing X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400