Article View: borland.public.jbuilder.java.swing
Article #7560JTree in JScrollPane
From: Thomas G�lden (p)
Date: Thu, 18 Jan 2001 23:12
Date: Thu, 18 Jan 2001 23:12
32 lines
1707 bytes
1707 bytes
I have problems realizing that when opening a node in a tree, which is placed in a JScrollPane, the scrollpane scrolls so that all child nodes are visible. I use basically the following code: JTree tree = new JTree; ... JScrollPane pane; in JbInit(): pane = new JScrollPane(tree); ... tree.setScrollOnExpand(true); ... This code does not lead to automatic scrolling when a node is expanded and the child are out of view (ath the bottom). Strangely also that in the Designer component tree in the JBuilder IDE, tree is no a child of pane. So I do not know what is wrong with my code. I would be glad if somebody could provide some working sample code for this particular problem. Thanks in advance and kind regards. Thomas G�lden Thomas.Guelden@t-online.de
Technical Details
Message-ID:
<947t22$55b7@bornews.inprise.com>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!sienna.impulse.net!newsfeed.online.be!news.algonet.se!algonet!newsfeed1.uni2.dk!newssuck.uni2.dk!bornews.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 111d45,d328df32c92f513a,start X-Google-Attributes: gid111d45,public X-Google-ArrivalTime: 2001-01-18 15:12:39 PST Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!sienna.impulse.net!newsfeed.online.be!news.algonet.se!algonet!newsfeed1.uni2.dk!newssuck.uni2.dk!bornews.borland.com!not-for-mail From: "Thomas G�lden \(p\)" <Thomas.Guelden@t-online.de> Newsgroups: borland.public.jbuilder.java.swing Subject: JTree in JScrollPane Date: Fri, 19 Jan 2001 00:12:33 +0100 Organization: Bayerisches Geologisches Landesamt Lines: 36 Message-ID: <947t22$55b7@bornews.inprise.com> Reply-To: "Thomas G�lden \(p\)" <Thomas.Guelden@t-online.de> NNTP-Posting-Host: p3E991511.dip.t-dialin.net X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400