Solved

Difference between ActionListener and ItemListener???

Posted on 2006-11-23
2
3,623 Views
Last Modified: 2008-01-09
anyone wanna take a shot at explaining that to me?
0
Comment
Question by:NadiaRashid
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Fast way to search item into Java Array (Rhino compatible) 2 47
Html split(text) 2 50
Java List 4 76
How to fix  socket closed error 11 64
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses

751 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