Article View: borland.public.jbuilder.java.swing
Article #7808Re: Applet problem: Empty Combo Box, Drop Down is offset
From: Stephen L. De Rudder
Date: Sun, 31 Dec 2000 16:17
Date: Sun, 31 Dec 2000 16:17
33 lines
1898 bytes
1898 bytes
> (This is my second post on this topic.. I didn't think something this
> simple would go unanswered)
I think someone already answered you. They said you may have a ";" in the
wrong place...
> String [] appnames = { "Corel Clipart Locator", "Data Doctor", "Event
> Organizer", "HTML Developer Database", "Image Thumbnail Viewer",
> "iTaxSystem", "Odyssey Warranty Tracker", "SFS Database" };
>
> private void jbInit() throws Exception {
> ...
> fillAppNames();
> }
>
>
> public void fillAppNames() {
> int index;
> for (index = 0; index<appnames.length; index++); // LOOK HERE
> {
> cbAppNames.addItem(appnames[index]);
>
> }
>
> }
The ";" next to look here causes the for loop to do nothing except index++.
The code after the for loop is executed only once with
index=appnames.length. I think if you remove the ";" next to LOOK HERE you
will get the expected results.
SLDR
(Stephen L. De Rudder)
Technical Details
Message-ID:
<3a4f61d3$1_2@dnews>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!newsfeed.mesh.ad.jp!news.tele.dk!212.43.194.69!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!dnews!24.14.70.100References:
<3A4B6848.4090404@buzybee.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,7a74489420eb85 X-Google-Attributes: gid111d45,public X-Google-ArrivalTime: 2000-12-31 08:48:19 PST From: "Stephen L. De Rudder" <sldr@home.com> Newsgroups: borland.public.jbuilder.java.swing References: <3A4B6848.4090404@buzybee.com> Subject: Re: Applet problem: Empty Combo Box, Drop Down is offset Date: Sun, 31 Dec 2000 10:17:26 -0600 Lines: 35 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 NNTP-Posting-Host: 24.14.70.100 Message-ID: <3a4f61d3$1_2@dnews> X-Trace: 31 Dec 2000 08:41:55 -0800, 24.14.70.100 Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!newsfeed.mesh.ad.jp!news.tele.dk!212.43.194.69!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!dnews!24.14.70.100