68 329
Assignments Done
Successfully Done
In November 2018

Answer to Question #63451 in Java | JSP | JSF for Ariel Martinez

Question #63451
What is the difference between ActionListener and ItemListener?

Just write the most important thing to answer that question in a small paragraph and shows examples in code.
Expert's answer
// we use anonymous ActionListener to doSomething() when someone click button
JButton b = new JButton();
b.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
// we use ItemListener to doSomething() when this checkbox selected or
Checkbox cb = new Checkbox();
cb.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions