Lecture #4
- Announce
- Labs Have Started;
- don't switch around without permission
- Keep Reading Chapter 2
- If space opens up, will let people in.
-
- e-mail me to let me know what sections will work
An Introduction to Programming: Coding Decision Trees
- Demonstrate Use of Buttons
- Clicking on buttons can cause things to happen
- Triggers action method
- Button Use Demo
TrafficLight.java
TrafficLight.html
- Important Pieces:
- actionPerformed method
- events, cause
- if statements
- return statements
- Reading Data Into Your Program: Input
- A String Variable
- The TextField Class
- the setText(string) method
- the getText() method
- Read In and Duplicate Demo
DupThree.java
DupThree.html
- Experiment! You can't break it