CHAPTER 56 — JFrame

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: 3/24/99 (using AWT), major revision: 01/06/02 (using Swing), small edits: 02/03/04, 02/12/05, 07/17/06; refurbished: 11/01/08

CHAPTER 56 — JFrame

A JFrame represents the window of a GUI application program. It can hold the components and methods that your application needs. This chapter introduces these ideas.

Chapter Topics:

  • The JFrame class.
  • Methods:
    • The setSize() method.
    • The setBounds() method.
    • The setVisible() method.
    • The setDefaultCloseOperation() method.
  • Extending the JFrame class
  • The JLabel class.

It may be helpful at times to refer back to the class hierarchy diagrams of the previous chapter.

QUESTION 1:

(Review: ) Is JFrame part of Swing?