Java Swing Tutorials - Herong's Tutorial Examples - v4.31, by Herong Yang
JFrame - Main Frame Class
This chapter provides tutorial notes and example codes on JFrame class. Topics include creating frames with sizes and locations; terminating program with its frame is closed; Listing AWT threads; displaying Chinese character on frames; drawing graphics on frames.
Creating Frames with Sizes and Locations
Closing Frame and Terminating Application
Listing and Interrupting AWT Threads
"AWT blocker activation interrupted" Error in JDK 1.6
JFrame Thread Behavior with JDK 8 to 12
Displaying Chinese Characters in Frame Title
Drawing Graphics - Using paint() on Frame
Drawing Graphics - Using paint() on Component
Conclusion:
Sample programs listed in this chapter have been tested with JDK 1.3.1 to JDK 17 on Windows and macOS computers.
Table of Contents
Introduction of Java Swing Package
Graphics Environment of the Local System
JCheckBox - Swing Check Box Class
JRadioButton - Swing Radio Button Class
JTextField - Swing Text Field Class
JComboBox - Swing Combo Box Class
Menu Bar, Menus, Menu Items and Listeners
Creating Internal Frames inside the Main Frame
Layout of Components in a Container
JEditorPane - The Editor Pane Class
SwingWorker - The Background Task Worker
AWT (Abstract Windows Toolkit)