Document Summary

User interaction problem users can spontaneously change the state of widgets buttons more slides etc how does program know when which widget uses manipulationof a widget in. 1 polling program observer continually polls thesubject to ask if an event has happened. 2 callbacks waits until subject calls observes observesindicates interest in events back to report an event. Setof interested observers when event invokes a for each observes occurs subject callback method. 1n global variables shared by all instance methods methodbodies local variables method headers formalparameters classes fields os instance variables. Examples resetbutton copybutton input text outputtext input output. Set up gul widgets text buttons this inputtextz new dtextareal width length this copybuttons new jbutton. A lay out gui widgets copy input new gridlayout button panel add this copybutton this add buttonpand. Panel default allows you to layout widgets without w coordinates. Set up the observers this copybutton addactionhistories this.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers