Board index » jbuilder » How to discriminate between JComboBox events?

How to discriminate between JComboBox events?


2003-07-01 01:10:02 PM
jbuilder0
This is one of those graphic things which are so easy
to show in a GUI, but harder to explain in words, so bear
with me...
When my app's JComboBoxes are clicked I can capture every
single change while the user is trying to decide with the
up arrow and down arrow keys. This allows some really neat
and dynamic things such as changing other components "live" or
in real time as the user navigates up and down. I make
extensive use of this Java event capture.
However, what I need additionally is to detect when the user has
made up her mind and the selecting process is finished. This
occurs for instance, when the <TAB>key is pressed and as a
result, the focus is transfered to the next component.
So, how can I detect _not_ the fine grain, up&down event,
but the higher level selection?
(Hopefully I was able to explain the question clearly).
TIA,
-Ramon F. Herrera
 
 

Re:How to discriminate between JComboBox events?

On 7/1/2003 at 1:10:02 AM, Ramon F Herrera wrote:
Quote
However, what I need additionally is to detect when the user has
made up her mind and the selecting process is finished. This
occurs for instance, when the <TAB>key is pressed and as a
result, the focus is transfered to the next component.
It sounds like you want to detect the loss of focus. Take a look at
FocusListener.
--
Regards,
John McGrath [TeamB]