CS 106A Lecture Notes - Lecture 3: Bouncing Ball, Init
Document Summary
Five regions: north, south, east west, and center. Interactors allow users to interact with program (like built-in widgets) You can add an interactor to window by calling add(interactor, location); Locations are specified regions above: north, south, east, west, and center. Init is actually secretly called before the run method always. The init is usually hidden, but when a program contains an init method, the computer searches and runs the init method written by the programmer. Purpose of init is to set up the program. Setting up guis (interactors) and adding to the program. We want to adjust acceleration due to gravity and how much the ball bounced back up due to elasticity. The jslider control lets the user visually choose from a range of integer values. You can construct a new slider that ranges from min to max add(new jslider(0, 100, 50), south);