What is the relationship between an event-listener interface and an event-adapter class?

What is the relationship between an event-listener interface and an event-adapter class?

When you declare to implement an event listener, then you should write the definitions of all the methods that have been declared in the interface. This causes inconvenience to the programmers. They need to implement the methods that would never be used. One way to do away with this inconvenience is to use adapter classes. An event adapter class has empty implementations by default.
Difference between the paint() and repaint() methods
paint() and repaint() methods - The paint() method is called when some action is performed on the window...
What is the purpose of the enableEvents() method?
Purpose of the enableEvents() method - When you register a listener, enableEvents() is called. So you don’t have to do this separately...
Difference between a Scrollbar and a ScrollPane
Scrollbar and a ScrollPane - A Scrollbar is a Component. Scrollpane is a Container...
Post your comment