Article View: borland.public.jbuilder.java.swing
Article #9276Detecting new items in the JComboBox
From: James Cook
Date: Wed, 19 Apr 2000 00:00
Date: Wed, 19 Apr 2000 00:00
13 lines
975 bytes
975 bytes
I haven't had the opportunity to work with an editable combobox...until now. There doesn't seem to be a special event for this activity. I see two possibilities: 1. Since a combobox is a composite component, I could add a document listener to the underlying JTextField. Even so, I'm not sure if this would gain me anything. 2. Listen for actionPerformed events. If the current selectedItem() is not in the model, add it. any thoughts? jim
Technical Details
Message-ID:
<8dkb48$98b4@bornews.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,34aa599bebad14c9,start X-Google-Attributes: gid111d45,public From: "James Cook" <jimcook.remove.for.spam@iname.com> Subject: Detecting new items in the JComboBox Date: 2000/04/19 Message-ID: <8dkb48$98b4@bornews.borland.com> X-Deja-AN: 613124482 X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Organization: Another Netscape Collabra Server User X-MSMail-Priority: Normal Newsgroups: borland.public.jbuilder.java.swing