answersLogoWhite

0


Best Answer

A listener listens to what the other person is lamenting, narrating, describing graphical and telling. In Java, the action listener interface finds application in handling action events.

User Avatar

Wiki User

10y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How is Action-Listener interface implemented?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Which methods are there in ActionListener interface?

The ActionListener interface has a single method.void actionPerformed(ActionEvent e) For full Java documentation see Oracle JavaDoc URL in related links below.


How is interface instantiated in anonymous class for example new ActionListener?

They key word here is anonymous class. While ActionListener may be an interface, the anonymous class would be a subclass of ActionListener. It would be like creating a new class which implements ActionListener.JButton button = new JButton("Press Me!");button.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent ev) {System.out.println("PRESS");}});


What is an actionlistener?

An ActionListener is exactly what it sounds like. It's an interface used by other classes to listen for an action event. The simplest example of this is on a Button. Normally when you add a Button to a Component nothing will happen when you press it. You need to use a button.addActionListener(actionListener) call to make it listen for button clicks.


Can you instantiate an object of interface?

No. An interface can only be implemented.


What java interface must be implemented by all threads?

Runnable interface


Difference between interface and abstract class on uml?

In general, the differences are that interface has(1) no fields and(2) no implementation of methodsbut in UML interface may have features (fields), so the difference left is that interface in UML has no implemented methods while abstract class by definition is partially implemented class.


What is the difference betwen class and interface?

classes can be extended and interfaces can be implemented.


When an interface method is implemented in a class it must be declared as?

Abstract type


Interface method have by default method public?

Yes, Interface mehtods are public by default so that they could be implemented by every class implementing the interfaces.


What is similarities between Abstract Class and Interface?

If a class has one abstract method ,the class has to be an abstract class.Methods can be implemented in abstract class.Whereas a interface is like a abstract class...the only difference being that the methods are never implemented in Interface.


Which is a function that a COM object's base interface provides?

A means of discovering the interfaces implemented by other components


What are the modules was implemented in online shopping project?

The modules implemented in the online shopping project include the web framework and the I Shop Order interface. Also, the Sample ShoOrder Item module was used.