Java Events and the MVC Architecture

There was a major change in Java 1.0 and 1.1 regarding event handling. To understand the use of events with their corresponding listeners there are a number of sources. Java in a Nutshell, 2nd edition addresses the issue on pages 150- 157. Core Java, Volume 1 has Event Handling in Chapter 8 which uses this Delegation Event Model.

It is a good design tool to be familiar with the MVC pattern

which is the abstraction of this methodology. When using advanced Java tools one can use this idea extensively.

Following is some sample code that uses the model: This is taken from the Java AWT: Delegation Event Model page at java.sun.com

The main focus is to see