Our implementation is driven by three user-initiated events:
The entry of text into the text box.
The clicking of the OK button signaling that entry is complete.
The clicking of the Quit button to terminate the application.
The methods we implement to respond to these events are referred to as callbacks or event handlers. There are two steps to implementing event handlers: Writing the code, of course, is the first step. The second step is registering the callback function with the control widget through which the event occurs. For our program, the three controls are the text box and the two buttons.
When we double-click on the control—for example, the text box—the designer generates the ...