January 30, 2001, 12:00 AM — Last week, we built a little program that monitored windows for clicks
and drags of the mouse. We created a Canvas object that implemented the
appropriate listener classes and inserted the "listening Canvas" into
the window we wanted to monitor. The listeners told us when and where
clicks and drags took place.
This week, let's use the same general approach to monitor all
detectible mouse events, including:
* Entry into the monitored area
* Exit from the monitored area
Basically, we will override all the event handlers in the MouseListener
and MouseMotionListener classes and call a method called showEvent().