Solved

Difference between ActionListener and ItemListener???

Posted on 2006-11-23
2
3,239 Views
Last Modified: 2008-01-09
anyone wanna take a shot at explaining that to me?
0
Comment
Question by:NadiaRashid
2 Comments
 
LVL 12

Expert Comment

by:enachemc
ID: 18006255
They are interface representing two types of events. For each type of event, you will have to receive with an object implementing one of the interfaces. Even if the two interfaces were completely equal in the functions declared, you would not be able to implement the second interface and register with this for the first type of event.
0
 
LVL 35

Accepted Solution

by:
girionis earned 50 total points
ID: 18006652
An ActionListener is used to listen for action events which are fired by subclasses fo AbstractButton and includes buttons checkboxes and menus (http://java.sun.com/developer/codesamples/examplets/java.awt.event/55.html)

An ItemListener is used to listen for item events which are fired by components that implement the ItemSelectable interface.These are components that maintain state -- generally on/off state for one or more items. The 1.1 AWT components that generate item events are checkboxes, checkbox menu items, choices, and lists (http://spectral.mscs.mu.edu/javadev/tutorials/TheJavaTutorial/post1.0/ui/itemlistener.html)
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now