This interface defines the methods that an object must implement to "listen" for mouse events on AWT components. When a MouseEvent occurs, an AWT component notifies its registered MouseListener objects (or MouseMotionListener objects if the event involves mouse motion) by invoking one of their methods.
An easy way to implement this interface is by subclassing the MouseAdapter class.
public abstract interface MouseListener extends EventListener { // Public Instance Methods public abstract void mouseClicked(MouseEvent e); public abstract void mouseEntered(MouseEvent e); public abstract void mouseExited(MouseEvent e); public abstract void mousePressed(MouseEvent e); public abstract void mouseReleased(MouseEvent e); }
AWTEventMulticaster, MouseAdapter
AWTEventMulticaster.add(), AWTEventMulticaster.remove(), Component.addMouseListener(), Component.removeMouseListener()
AWTEventMulticaster.add(), AWTEventMulticaster.remove()