Article View: borland.public.jbuilder.java.language
Article #8507Re: Expanding a JTree...need example.
From: Torsten Welches
Date: Fri, 16 Mar 2001 06:44
Date: Fri, 16 Mar 2001 06:44
22 lines
1470 bytes
1470 bytes
Ken, tree.setSelectionPath(new TreePath(node.getPath())); Torsten Ken Warner <kwarner@cts.com> wrote: >Hi, > >Does anyone have a working example of how to expand a JTree >to show a particular node? > >For example: I have a three level tree and I want to show a leaf >node at the third level. I make the tree and it starts up just showing >the root. How do I programatically make the JTree expand to >show a particular leaf node? > >-- >Ken Warner > >
Technical Details
Message-ID:
<3ab1b649$1_2@dnews>Path:
arc1-ca.pugleaf.net!pubnews.netcom.net.uk!diablo.netcom.net.uk!netcom.net.uk!newsfeed.icl.net!newsfeed00.sul.t-online.de!t-online.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp1.njy.teleglobe.net!teleglobe.net!hub.org!hub.org!PeerFeed.KWeb.on.ca!dnews!207.105.83.65References:
<3AB14746.A376B862@cts.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,71f2045260b47788 X-Google-Attributes: gidf74b3,public X-Google-ArrivalTime: 2001-03-17 07:55:17 PST From: "Torsten Welches" <torsten.welches@who.cares.netcologne.de> Sender: "Torsten Welches" <torsten.welches@who.cares.netcologne.de> Reply-To: "Torsten Welches" <torsten.welches@who.cares.netcologne.de> Subject: Re: Expanding a JTree...need example. Newsgroups: borland.public.jbuilder.java.language X-User-Info: 193.158.55.74 193.158.55.74 References: <3AB14746.A376B862@cts.com> NNTP-Posting-Host: 207.105.83.65 Message-ID: <3ab1b649$1_2@dnews> Date: 15 Mar 2001 22:44:25 -0800 X-Trace: 15 Mar 2001 22:44:25 -0800, 207.105.83.65 Lines: 23 Path: arc1-ca.pugleaf.net!pubnews.netcom.net.uk!diablo.netcom.net.uk!netcom.net.uk!newsfeed.icl.net!newsfeed00.sul.t-online.de!t-online.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp1.njy.teleglobe.net!teleglobe.net!hub.org!hub.org!PeerFeed.KWeb.on.ca!dnews!207.105.83.65