Answer Posted / janet
An adapter class provides an empty implementation of all
methods in an event listener interface.Adapter classes are
useful when you want to receive and process only some of
the events that are handled by a particular event listener
interface.you can define a new class to act lisener by
extending one of the adapter classes and implementing onlu
those events in which you are interested.
For ex: the MouseMotionListenerAdapter class has two
methods,mouseDragged() and mouseMoved(). The signatures of
these empty are exactly as defined in the
MouseMotionListener interface. If you are interested in
onlu mouse drag events,that you could simply extend
MouseMotionAdapter and implement mouseDragged().
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
How do you compare values in java?
What are access specifiers available in java?
What is class variable java?
Is arraylist dynamic in java?
What does jenkins do?
How do you achieve polymorphism in java?
What are the two parts of a conditional statement?
What does compareto () do in java?
Is java a software?
What is binary search in java?
What is charat ()?
What are the advantages and disadvantages of object cloning?
What is nested loop? What is dangling else condition in it?
Explain about the select method with an example?
Explain about the security aspect of java?