The JavaTM Tutorial

Trail: Creating a GUI with JFC/Swing
Lesson: Writing Event Listeners

Run MouseMotionEventDemo

Since you can't run the applet, here's a picture of it:

A snapshot of MouseMotionEventDemo, which demonstrates events that are fired when the user moves the mouse.


Note: If you don't see the applet running above, you need to install Java Plug-in, which happens automatically when you install the J2SE JRE or SDK. We strongly recommend that you install the latest version; at least 1.3.1 is required for all our applets. You can find more information in the Java Plug-in home page.

Copyright 1995-2003 Sun Microsystems, Inc. All rights reserved.