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
What is a singleton class in Java?
Can we inherit inner class?
What is java full form?
Explain restrictions for using anonymous inner classes?
Write an algorithm program in java for the following question.. 1) S is a set of integers.X is an integer obtained by sum of two digits in S. Write logic for whether or not the X is from the S. The time of algorithm should not exceed o(n logn).
Is null an object java?
What is tochararray in java?
What is a static class in java?
What are design patterns and please explain?
How does java pattern compile work?
What is java jit compilers?
Why do you canvas?
What is an infinite loop?
Does substring create a new object?
What is bubble sorting in java?