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
Java MouseListener Interface. The Java MouseListener is notified whenever you change the state of mouse. It is notified against MouseEvent. The MouseListener interface is found in java.awt.event package. It has five methods. Methods of MouseListener inter
The class which processes the MouseEvent should implement this interface.The object of that class must be registered with a component. The object can be registered using the addMouseListener() method. package com.tutorialspoint.gui; import java.awt.*; imp
Post a Comment:
Showing 0 Comments: