🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: How to receive JComboBox's KeyListener event?

#7517
From: Betty
Date: Tue, 16 Jan 2001 02:30
25 lines
1581 bytes
thanks, it work lar...
but when can we download the jdk1.4??


Johan Forsberg wrote:

> "Betty" <cutepang@net.polyu.edu.hk> skrev i meddelandet
> news:3A5D83FA.665F9A05@net.polyu.edu.hk...
> > Dear all,
> >
> > My ComboBox is not editable! So, I can't get the EditorCompoent and add
> > KeyListener to it.
> > How can I still receive JComboBox's KeyListener event (Not Editable
> > Box)?
> >
>
> This is a known bug in Swing. The combobox is a panel that contains a text
> field and a button.
> You have to add the keyListener to the field or the button instead of
> directly to the ComboBox.
> Example:
>
> myCombo.getComponent(0).addKeyListener(...);
>
> This is fixed in JDK 1.4.
Technical Details
Message-ID: <3A63B239.3BA2933A@net.polyu.edu.hk>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!bornews.borland.com!dnews!202.77.183.3
References: <3A5D83FA.665F9A05@net.polyu.edu.hk> <93muik$cki7@bornews.inprise.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,a8659c08c1f7aefa
X-Google-Attributes: gid111d45,public
X-Google-ArrivalTime: 2001-01-15 18:38:03 PST
Message-ID: <3A63B239.3BA2933A@net.polyu.edu.hk>
Date: Tue, 16 Jan 2001 10:30:17 +0800
From: Betty <cutepang@net.polyu.edu.hk>
X-Mailer: Mozilla 4.72 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing
Subject: Re: How to receive JComboBox's KeyListener event?
References: <3A5D83FA.665F9A05@net.polyu.edu.hk> <93muik$cki7@bornews.inprise.com>
Content-Type: text/plain; charset=big5
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 202.77.183.3
X-Trace: 15 Jan 2001 18:30:28 -0800, 202.77.183.3
Lines: 26
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!bornews.borland.com!dnews!202.77.183.3