Java adapter classes provide the default implementation of listener interfaces. If you inherit the adapter class, you will not be forced to provide the implementation of all the methods of listener interfaces. So it saves code.
The adapter classes are found in java.awt.event, java.awt.dnd and javax.swing.event packages. The Adapter classes with their corresponding listener interfaces are given below.
WindowAdapter ---------- WindowListener
KeyAdapter ---------- KeyListener
MouseAdapter ---------- MouseListener
MouseMotionAdapter ---------- MouseMotionListener
FocusAdapter ---------- FocusListener
ComponentAdapter ---------- ComponentListener
ContainerAdapter ---------- ContainerListener
HierarchyBoundsAdapter ---------- HierarchyBoundsListener
Feel free to DM email : [email protected]