Article View: borland.public.jbuilder.java.swing
Article #7586Re: JTree Question. How to expand all the nodes and leafs of a Jtree at the beginnig of the tree is displayed?
From: Martin Andersson
Date: Sun, 21 Jan 2001 10:27
Date: Sun, 21 Jan 2001 10:27
31 lines
1801 bytes
1801 bytes
Try: jTree.makeVisible(new TreePath(leaf1_1.getPath())); jTree.makeVisible(new TreePath(leaf2_1.getPath())); jTree.makeVisible(new TreePath(leaf3_1.getPath())); /Martin "Alice Kang" <jkang5@learn.senecac.on.ca> wrote in message news:3a6a6cda_1@dnews... > Dear all: > I built a small tree using Jbuilder3.5. It looks like below after it was > fully expanded: > MyTree: > root > node1 > leaf1.1 > leaf1.2 > node2 > leaf2.1 > leaf2.2 > node3 > leaf3.1 > leaf3.2 > > The Question is: If I'd like the tree will be fully expanded automatically > as soon as it is diplayed , How can I do? > I tried to use (anObjectOfMyTree).expandRow( i ) in a <for loop>, but it > only expand the node1. > >
Technical Details
Message-ID:
<94edf3$spv2@bornews.inprise.com>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-04!supernews.com!xfer13.netnews.com!netnews.com!fr.clara.net!heighliner.fr.clara.net!news.imp.ch!news-zh.switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!bornews.borland.com!not-for-mailReferences:
<3a6a6cda_1@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,c71c666904982b96 X-Google-Attributes: gid111d45,public X-Google-ArrivalTime: 2001-01-21 02:30:35 PST Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-04!supernews.com!xfer13.netnews.com!netnews.com!fr.clara.net!heighliner.fr.clara.net!news.imp.ch!news-zh.switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!bornews.borland.com!not-for-mail From: "Martin Andersson" <b97maran@student.his.se> Newsgroups: borland.public.jbuilder.java.swing Subject: Re: JTree Question. How to expand all the nodes and leafs of a Jtree at the beginnig of the tree is displayed? Date: Sun, 21 Jan 2001 11:27:58 +0100 Organization: Another Netscape Collabra Server User Lines: 33 Message-ID: <94edf3$spv2@bornews.inprise.com> References: <3a6a6cda_1@dnews> NNTP-Posting-Host: 193.10.185.3 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200