🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

RemoveAllItems in a combobox and adding new items

#10859
From: Chitra Amarnath
Date: Mon, 09 Aug 1999 00:00
15 lines
984 bytes
Hi 

I am trying to refresh a combobox in a frame whenever the user clicks a
button.
Basically I am trying to removeallitems and add the new items when
loading the frame containing the combo box. The code which I am using is 
jCombobox.removeAllItems(); 
jComboBox.addItem(newItem);

But for some reason I am getting an error in the console.

I would really appreciate any help.

Thanks in advance.
Chitra
Technical Details
Message-ID: <37AF39DF.C77AE936@enterpriseworks.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,cfb030f8a85e8b87,start
X-Google-Attributes: gid111d45,public
From: Chitra Amarnath <chitra.amarnath@enterpriseworks.com>
Subject: RemoveAllItems in a combobox and adding new items
Date: 1999/08/09
Message-ID: <37AF39DF.C77AE936@enterpriseworks.com>
X-Deja-AN: 510782034
Content-Transfer-Encoding: 7bit
Organization: Another Netscape Collabra Server User
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing