void mouseMove( ) { ... } void mouseMove( int x, int y) { ... } void mouseMove( int fromX, int fromY, int toX, int toY) { ... }
The "mouseMove" method is invoked automatically each time the user moves the mouse within the region of the screen controlled by the applet without depressing the mouse button . Three versions of this event handling method's parameterization are possible. If four parameters are expected the browser will provide the x and y coordinates of the point from which the mouse was moved followed by the x and y coordinates of the point to which the mouse was moved. Note that these points are unlikely to be adjacent. The computer checks the position of the mouse frequently and periodically but not continuously. If the mouse is moved reasonably quickly, the positions reported by "mouseMove" will typically be separated by many pixels.
If only two parameters are expected, the browser simply provides the x and y coordinates of the position to which the mouse was moved. Finally, if no coordinates are expected, the browser simply invokes the method to notify the applet of the user's activity.