February 2014
Beginner
1248 pages
62h 25m
English
The MouseTracker application (Figs. 12.28–12.29) demonstrates the MouseListener and MouseMotionListener interface methods. The event-handler class (lines 36–97 of Fig. 12.28) implements both interfaces. You must declare all seven methods from these two interfaces when your class implements them both. Each mouse event in this example displays a String in the JLabel called statusBar that is attached to the bottom of the window.
Read now
Unlock full access