... and controlled by the runtime system. A Java program handles events using what are known as listeners and callbacks. The section "Handling Swing Command Events" discusses events and ... being manipulated, and use menus, tool bars, and dialogs to provide interaction with the user. The user interacts with the program using a pointing device, usually a mouse, and the keyboard. ... application. This includes drawing menus and handling dialogs. For example, when a dialog is displayed, the system tracks mouse movements within the dialog, and handles redrawing the dialog for expose...