| Author |
difference between ItemStateChanged and ActionPerformed
|
Swela Jathar
Greenhorn
Joined: Aug 19, 2011
Posts: 22
|
|
Hi...
what is the actual difference between ItemStateChanged and ActionPerformed in case of combobox??
Should I ever use one instead of the other?
Thanks.....
|
 |
Darryl Burke
Bartender
Joined: May 03, 2008
Posts: 4164
|
|
Have you gone through the tutorial on How to Use Combo Boxes, linked from the API for JComboBox?
The best way to understand the difference is to write code that adds both listeners to a combo box which print the method name and details of the event parameter. Then play with the combo and observe what events are fired, and when.
Also, the methods are itemStateChanged and actionPerformed. Java is case sensitive.
|
luck, db
There are no new questions, but there may be new answers.
|
 |
 |
|
|
subject: difference between ItemStateChanged and ActionPerformed
|
|
|