Why should we use event adapter class instead of event listener? Explain the following java terms- i) Event (ii) Listener (iii) Adapter iv) Action Listener
a. Event adapter classes are used to implement listener interfaces.
b. i) Event: An event is the changing state of an object. Such as click of a button.
ii) Listener : A Listener is a method called when a user does something.
iii) Adapter: is a structural design patter which allows objects that are incompatible to collaborate.
iv)Action Listener: is responsible for handling all action events.
Comments
Leave a comment