Introduction to OOP | Chapter 22: The AWT and Swing : | next | previous | audio | real | text |
An adapter provides empty implementations, allowing the programmer to redefine only the events of interest.
public class MouseAdapter implements MouseListener { public void mouseClicked (MouseEvent e) { } public void mouseEntered (MouseEvent e) { } public void mouseExited (MouseEvent e) { } public void mousePressed (MouseEvent e) { } public void mouseReleased (MouseEvent e) { } }