«^»
2.3. A simple example of a GUI

Suppose we want a Java program that creates a window that has a button and a textfield (an area for storing a line of text), and each time the button is clicked the textfield is updated to show the current date and time.

Rather than just present the program that accomplishes this task, the program will be developed in stages, each stage conquering some of the problems that occur.