🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

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

#7689
From: Reid
Date: Thu, 28 Dec 2000 21:20
44 lines
1921 bytes
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: <3A4BAE85.6010902@buzybee.com>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!isdnet!news-ge.switch.ch!news-zh.switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!bornews.borland.com!dnews!209.86.212.185

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,67e3718c633b6313,start
X-Google-Attributes: gid111d45,public
X-Google-ArrivalTime: 2000-12-28 13:15:23 PST
Message-ID: <3A4BAE85.6010902@buzybee.com>
Date: Thu, 28 Dec 2000 13:20:05 -0800
From: Reid <reidr@buzybee.com>
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; m18) Gecko/20001108 Netscape6/6.0
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing
Subject: What is wrong with this code:  Combo box displays incorrectly?
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 209.86.212.185
X-Trace: 28 Dec 2000 13:11:38 -0800, 209.86.212.185
Lines: 45
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!isdnet!news-ge.switch.ch!news-zh.switch.ch!newsfeed-zh.ip-plus.net!news.ip-plus.net!bornews.borland.com!dnews!209.86.212.185