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. Java Events
- An event is simply the denotation that some particular thing has occurred.... like a button being pressed.
- Event Handling is the process of responding to events as they happen.
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.
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.
Do not use ... provided ONLY for historical purposes
Java 1.1.*
Examples
Responding to Buttons - ActionListner