CS 342 - 09/07/17 Event-Driven Programming - the input is asynchronous Such code normally have some event handling environment. Code is divided in 3 scetions 1. Set-up Code 1a. Set up the widgets as instance varaibles 1b. Set up the JFrame 1c. Set up Widgets 1d. Set up connections between Widgets and Event Handling code 1e. Add Widgets to the JFrame 1y. Set the JFrame Size 1z. Make the JFrame Visable 2. Event Loop - This is (HOPEFULLY!) provided for us. - Execution started in code of JFrame constructor 3. Event Handler(s) - Code that reacts to a user event - Code is called from the Event Loop - Method Names, parameters, return types for the Event Handlers was determined by the author of the Event Loop - In Java, interfaces are used quite heavily for this.