Java Events

Whenever you move your mouse over the Applet area or maybe click a button in your applet (you will learn about buttons later), you create what is called an event.
 


Currently, some browsers only support Java 1.0.*'s Event Handling scheme which is different that Java 1.1.*'s Event Handling scheme.    WE Will only be implementing Java 1.1.*'s scheme for Event Handling.   Info on the older Java 1.0.* method is provided for historical purposed and a link below is provided for additional reading if you are interested.
 
 
 
 
 
 
Event Handling for non-GUI components:  Mouse, Keys, etc.


Java 1.0.*

Do not use ... provided ONLY for historical purposes

Java 1.1.*

 
 

Examples

your browser may not support all of these examples

Drawing Lines with Mouse Input

Mouse Events the OLD Java 1.0.* way

Key Input

Key Input the OLD Java 1.0.* way

 

Event Handling for  GUI components:  Button, Checkbox, etc.
 

Java 1.0.*

Do not use ... provided ONLY for historical purposes

Java 1.1.*

 

Examples

 
 
 
 
Responding to Buttons - ActionListner