Article View: borland.public.jbuilder.java.swing
Article #9636Re: URGENT: focusLost on JComboBox
From: John P. McGrath
Date: Thu, 24 Feb 2000 00:00
Date: Thu, 24 Feb 2000 00:00
28 lines
1618 bytes
1618 bytes
On Thu, 24 Feb 2000 10:45:29 +0800, tkkoh wrote:
> I really frustrated of using Swing components, especially the one I
> counted on it very much, (the post action after JComboBox selection).
> I don't want to use the "ActionListener" because it always be invoked
> while scrolling through the list, so I looked for the focusLost,
> unfortunely it does not work at all.
This is a known Swing bug. See:
http://developer.java.sun.com/developer/bugParade/bugs/4243641.html
The discussion for this bug does mention some work-arounds. Maybe one of
them will work for you.
You may need to join the Java Developer Connection to get to this URL.
It is free to join -- you just have to fill out a form.
The problem is related to the fact that a JComboBox is a compound
component. There are other components that make up the JComboBox, and
the JComboBox itself may not actually receive the focus. Instead, some
of its child components do. This is further complicated by the fact that
which subcomponents it has depend on which look-and-feel you are using.
--
John P. McGrath
<JPMcGrath@fast.net>
<jpm@nscs.fast.net>
Technical Details
Message-ID:
<MPG.131e8ae3416feda29897bb@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<38B49B49.5B05FF4F@hotmail.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,7861644ed5ec67d3 X-Google-Attributes: gid111d45,public From: John P. McGrath <JPMcGrath@fast.net> Subject: Re: URGENT: focusLost on JComboBox Date: 2000/02/24 Message-ID: <MPG.131e8ae3416feda29897bb@forums.borland.com> X-Deja-AN: 589163732 References: <38B49B49.5B05FF4F@hotmail.com> Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.swing