Event from a Choice box?

Is it possible to have events fire when you change the selection in a choice drop down box. I tried adding it to the action listener and setting up the code in the action listener the same way as I would for a button with no luck.Any assistance would be great!Thanks
[287 byte] By [JasonMcAuleya] at [2007-11-27 0:50:54]
# 1
Are you using a JComboBox? If so...[url] http://java.sun.com/javase/6/docs/api/javax/swing/JComboBox.html#addItemListener(java.awt.event.ItemListener)[/url]~
yawmarka at 2007-7-11 23:21:26 > top of Java-index,Java Essentials,New To Java...
# 2
The code I am using is productChoice = new Choice();So I'm not sure if a "Choice" works the same as a Combo box. As I said, I added productChoice to the action listener and nothing happens when I change it's values.
JasonMcAuleya at 2007-7-11 23:21:26 > top of Java-index,Java Essentials,New To Java...
# 3
> So I'm not sure if a "Choice" works the same as a Combo box. Have a look, and focus on the commonality with reply #1:[url] http://java.sun.com/javase/6/docs/api/java/awt/Choice.html[/url]~
yawmarka at 2007-7-11 23:21:26 > top of Java-index,Java Essentials,New To Java...
# 4
Well, I realized Choice is just the AWT equivalent of JComboBox basically, and that was my problem. The JComboBox solved the problem.Thanks guys.
JasonMcAuleya at 2007-7-11 23:21:26 > top of Java-index,Java Essentials,New To Java...