Simple event handlers
In this demo program, the event handlers
- simply display messages on the screen, and
- in the case of the close button, terminate the program.
In a real world program, the behavior of the event handlers
- would likely be much more substantive,
- but the overall skeleton of the program
- need not be any different from that shown here.