created: 07/01/99 (with AWT); revised: 01/11/02 (with Swing), 07/17/06; refurbished: 11/02/08
CHAPTER 61 — GUI Applications
This chapter develops two applications that are just on the fringe of being useful. Along the way, it discusses several additional topics in Swing programming.
Chapter Topics:
- Example: Temperature conversion application
- Obtaining numeric values from
JTextFields - The
Integer.parseInt()method - Writing results into
JTextFields ActionListenerfor aJTextField- Example: Calories from fat calculation
- Using a
JButtonwithJTextFieldinput - The
Double.parseDouble()method - Finding the right size for a frame
QUESTION 1:
At what temperature does water boil?