🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #7690

Re: What is wrong with this code: Combo box displays incorrectly?

#7690
From: James A. Schulz
Date: Fri, 29 Dec 2000 13:44
51 lines
2197 bytes
Just a guess, but do you really want the semicolon after "...index++)"

James

"Reid" <reidr@buzybee.com> wrote in message
news:3A4BAE85.6010902@buzybee.com...
> Hello,
>
> I am new to applets and am having a bit of a problem.
>
> I have the following code to populate a combo box box with strings..
>
> 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++);
>   {
>    cbAppNames.addItem(appnames[index]);
>
>   }
>
>  }
>
> The code above compiles but when run it appears to fill the combo box
> with empty strings.
>
> When the box drops down it appears to have some volume but not the array
> contents.  It also shows the drop down an inch or two down and to the
> right of the actual combo box control?
>
> Can someone tell me what I am doing wrong?
>
>
> Any help would be greatly appreciated!
>
> Thanks
>
>
> Reid Roman
> BuzyBee Software
> http://www.buzybee.com
>
Technical Details
Message-ID: <92i49k$qai3@bornews.inprise.com>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!newsfeed.mesh.ad.jp!news.maxwell.syr.edu!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!bornews.borland.com!not-for-mail
References: <3A4BAE85.6010902@buzybee.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,67e3718c633b6313
X-Google-Attributes: gid111d45,public
X-Google-ArrivalTime: 2000-12-29 05:43:04 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!newsfeed.mesh.ad.jp!news.maxwell.syr.edu!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!bornews.borland.com!not-for-mail
From: "James A. Schulz" <jaschulz@wiseware.com>
Newsgroups: borland.public.jbuilder.java.swing
Subject: Re: What is wrong with this code:  Combo box displays incorrectly?
Date: Fri, 29 Dec 2000 07:44:03 -0600
Organization: Another Netscape Collabra Server User
Lines: 53
Message-ID: <92i49k$qai3@bornews.inprise.com>
References: <3A4BAE85.6010902@buzybee.com>
Reply-To: "James A. Schulz" <jaschulz@wiseware.com>
NNTP-Posting-Host: 165.121.198.13
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