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 thread start?
What is the difference between sop and work instruction?
Is heap stored in ram?
What is class forname used for?
What is an object in java?
What is application system?
What are synchronized methods ?
Does java have a compiler?
What ide should I use for java?
Will the jvm load the package twice at runtime?
What are the features of java?
Which package has light weight components?
What is re-factoring in software?
What do you know about the garbage collector?
What are "methods" and "fields"?