In order to respond to the click of a button, an object must be capable of being notified when the button was clicked. This is achieved by the Button object requiring that any such ‘listener’ provide a method named actionPerformed which can then be called to notify the listening object. Define an interface, ActionListener, with a single void-returning method, actionPerformed that accepts a single parameter of type ActionEvent.
LANGUAGE: JAVA
CHALLENGE:
In order to respond to the click of a button, an object must be capable of being notified when the button was clicked. This is achieved by the Button object requiring that any such ‘listener’ provide a method named actionPerformed which can then be called to notify the listening object. Define an interface, ActionListener, with a single void-returning method, actionPerformed that accepts a single parameter of type ActionEvent.
SOLUTION:
The Bad News: The content you are trying to access is only available to members.
The Good News: You too can be a member, simply Click Here.
Already a member? Log In Here
Posted in Java, Learn To Code