Question :Can a class be it’s own event handler? Explain how to implement this?
Answer :Sure. an example could be a class that extends Jbutton and implements ActionListener. In the actionPerformed method, put the code to perform when the button is pressed.
No comments:
Post a Comment