delegation event model in Java

<pre><code>
import java.awt.*;
import java.awt.event.*;
class EventHandling extends Frame implements ActionListener
{
    TextField textField;
    EventHandling ()
    {
        textField = new TextField ();
        textField.setBounds (60, 50, 170, 20);
        Button button = new Button ("Show");
        button.setBounds (90, 140, 75, 40);
        button.addActionListener (this);
        add (button);
        add (textField);
        setSize (250, 250);
        setLayout (null);
        setVisible (true);
    }
    public void actionPerformed (ActionEvent e)
    {
        textField.setText ("Hello World");
    }
    public static void main (String args[])
    {
        new EventHandling ();
    }
}
</code></pre>
* Event Classes
The classes that represent events are at the core of Java’s event handling mechanism. At the root of the Java event class hierarchy is EventObject, which is in java.util. It is the superclass for all events.
* The ActionEvent Class
An ActionEvent is generated when a button is pressed, a list item is double-clicked, or a menu item is selected.