Abstract Interface ItemListener in java

ItemListener interface defines the method that an object must implement to “listen” for item events on AWT components. When an ItemEvent occurs, an AWT component notifies its registered ItemListener objects by invoking their itemStateChanged() methods.

Objects that implement the ItemListener interface can receive ItemEvent objects. Listeners must first register themselves with objects that produce events. When events occur, they are then automatically propagated to all registered listeners.

public abstract interface java.awt.event.ItemListener extends java.util.EventListener{
// Public Instance Methods
public abstract void itemStateChanged (ItemEvent e);
}

The details of the class structure are given as follows:

public abstract void itemStateChanged (ItemEvent e);

public abstract void itemStateChanged (ItemEvent e) method notifies the ItemListener that an event occurred.

Parameter
e – The item event that occurred.

Don't miss out!
Subscribe To Newsletter

Receive top technical news, lesson ideas, travel tips and more!

Invalid email address
Give it a try. You can unsubscribe at any time.

I am the founder and owner of the blog - TechTravelHub.com, always love to share knowledge on test automation,tools,techniques and tips.I am a passionate coder of Java and VBScript.I also publish articles on Travel ideas and great honeymoon destinations.Apart from these, I am a gear-head,love to drive across India. I have shared lots of articles here on How to travel several parts of India.Customization of cars aka car modification is my another hobby.Get in touch with me on [email protected]

Write A Comment