logo_michael-thomas.jpg (3143 bytes)

Chapter 7
Working with the User

Click here to go back to the courses home page.

Java Programs

Listing 7.1, v1.2, v1.2 API w/Adapter Class - Mouse Events & drawLine()

Listing 7.2, v1.2 - Mouse Events & fillRect()

Listing 7.3, v1.2 - Mouse & Freehand drawing.
Future Note: Add a v1.2 w/paint() & update() overide (pg551 Deitel).

Listing 7.4, v1.2 - Capturing keystrokes.

Listing 7.5, v1.2 - Key Events & moving images.

Note:  For Forte & Appletviewer to work correctly, I had to add requestFocus() to allow the applet to be the active component for Key Events.  IE & NS worked fine in the original code.

Listing 7.6, v1.2 - Modifier keys (shift, etc..)

Note:  Added requestFocus() also.