If you want to provide your own code to terminate the program when the window is closed, or if you want the program to take a different action when the window closes, then you use the interface ____. WindowListener ActionListener CloseListener MouseListener

Answer :

Answer:

ACTION LISTENER

Explanation:

Action Listener is responsible in handling all action events such as when the user want to provide his or her own code to terminate the program when the window is closed, if he or she want the program to take a different action when the window closes, in this way the user use the interface.

It can also be use separately by creating a new class that implements its.

The listener interface is responsible for receiving action events. The class that is interested in processing an action event implements this interface, and the object created with that class is registered with a component, using the component's add ActionListener method. When the action event occurs, that object's action Performed method is invoked.

Other Questions