CHAPTER 61 — GUI Applications

Classic programmed-learning exercises, refreshed for modern Java and presented in the current MrStyner.com portfolio style.

Modern Java noteThis archive has been refreshed for Java 25 LTS. Core language concepts remain useful, while outdated setup instructions and browser-era Java are labeled or replaced. Java 26 is the current feature release; Java 25 is used here as the stable teaching baseline.
go to home page   go to next page

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
  • ActionListener for a JTextField
  • Example: Calories from fat calculation
  • Using a JButton with JTextField input
  • The Double.parseDouble() method
  • Finding the right size for a frame

QUESTION 1:

At what temperature does water boil?