Article View: borland.public.jbuilder.java.swing
Article #7504Applet start() method doesn't appear to run
From: Jason Swett
Date: Thu, 25 Jan 2001 01:47
Date: Thu, 25 Jan 2001 01:47
34 lines
2311 bytes
2311 bytes
My applet contains nested tabbed panes, such as:
BASIC INFO / SCHEDULES / ATTENDANCE
Personal / Contacts / Attributes / Pictures
When the applet first appears, the subcomponents on the various tabs are
overlaid and ugly for some reason. I'd like it to show the BASIC INFO main
tab and the Personal sub-tab with its components shown clearly. (I don't
know why there is all the overlaid gibberish.)
I can get it to do this successfully when running the Applet from within
JBuilder by adding the following code to the applet start() method (which
simulates the user clicking the ATTENDANCE tab, followed by the BASIC INFO
tab, followed by the Personal sub-tab -- which cleans up the gibberish when
you do this manually):
MainTabbedPane.setSelectedIndex(2);
Graphics tempGraphic = MainTabbedPane.getGraphics();
MainTabbedPane.paintAll(tempGraphic);
MainTabbedPane.setSelectedIndex(0);
BasicInfoTabbedPane.setSelectedIndex(0);
However, this code doesn't appear to execute when the Applet is run from a
browser (IE or Netscape). If I temporarily copy this same code to a
button's action event and click the button after the applet has started
within the browser, it will re-display the screen as desired.
Questions:
1. Why is it all gibberish in the first place?
2. How come the code doesn't appear to run from the start() method?
Alternative techniques are also welcome. Thanks.
Technical Details
Message-ID:
<3a6f861d_2@dnews>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!isdnet!newsfeeds.belnet.be!news.belnet.be!news.tele.dk!194.213.69.151!news.algonet.se!algonet!newsfeed1.uni2.dk!newssuck.uni2.dk!bornews.borland.com!dnews!204.157.20.241Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,7a6ed2dc47471411,start X-Google-Attributes: gid111d45,public X-Google-ArrivalTime: 2001-01-24 17:52:35 PST From: "Jason Swett" <swettboy@ncats.net> Newsgroups: borland.public.jbuilder.java.swing Subject: Applet start() method doesn't appear to run Date: Wed, 24 Jan 2001 20:47:42 -0500 Lines: 37 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 NNTP-Posting-Host: 204.157.20.241 Message-ID: <3a6f861d_2@dnews> X-Trace: 24 Jan 2001 17:49:17 -0800, 204.157.20.241 Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!isdnet!newsfeeds.belnet.be!news.belnet.be!news.tele.dk!194.213.69.151!news.algonet.se!algonet!newsfeed1.uni2.dk!newssuck.uni2.dk!bornews.borland.com!dnews!204.157.20.241