public interface MouseListener extends EventListener The listener interface for receiving "interesting" mouse events (press, release, click, enter, and exit) on a component. (To track mouse moves and mouse drags, use the MouseMotionListener .)
Alternatively, use the corresponding AWT MouseAdapter class, which implements the MouseListener, MouseMotionListener, and MouseWheelListener interfaces. The following example shows a mouse listener. At the top of the window is a blank area (implemented by
In Java, MouseListener is a class that gets notified when there is a change in the mouse state. Changes of the mouse can be pressing, clicking, and releasing it. It can also be entering or exiting the window area.
Post a Comment:
Showing 0 Comments: