Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Advanced-java] JComboBox and ActionListener


  • From: Christian.Ribeaud@xxxxxxxxxxxx (Christian Ribeaud)
  • Subject: [Advanced-java] JComboBox and ActionListener
  • Date: Wed, 23 Jan 2002 15:16:31 +0100

Thanks for the help. I found out the problem. Sorry to disturb
you before having checked deeply my code. Thanks anyway for pointing out
the
difference between ActionListener and ItemListener.

christian

> The following is from the JDK 1.3 Spec :
> - Adds an ItemListener. aListener will receive an event when the selected
> item changes.
> - Adds an ActionListener. The listener will receive an action event the user
> finishes making a selection.
> 
> so the ItemEvent is fired only when the selected value changes, whereas the
> ActionEvent is also fired when you select the same Item again.
> 
> Maybe there`s some mistake in your code. I can't determine one within the
> snippets you sent.
> 
> Sybille