Java GUI Programming Overview
This page gives a high-level overview of Java GUI programming paths. For your course work and lab exams, you will primarily focus on classic Swing & AWT programs, and later you can explore modern JavaFX-based GUIs.
Two Main GUI Paths in Java
Java offers more than one way to build graphical user interfaces. In this documentation we start with Swing and AWTbecause they are commonly used in university labs and exam questions, and we also introduce the idea of JavaFX for more modern UI design.
Swing & AWT GUI
- Classic desktop GUI toolkit included with Java.
- Covers components like JFrame, JPanel, buttons, lists, and text fields.
- Uses layout managers such as FlowLayout, GridLayout, BorderLayout, and GridBagLayout.
- This is the main focus for your current syllabus and lab programs.
JavaFX GUI (Coming Later)
- Modern GUI framework for richer, styled UIs.
- Uses FXML, CSS-like styling, and scene graphs.
- Well-suited for modern desktop apps, dashboards, and visual applications.
- We will add step-by-step JavaFX content after finishing the Swing & AWT section.
Where Should You Start?
For exams and lab-work, you should first master Swing and AWTprograms. The dedicated Swing & AWT section below contains complete programs, line-by-line explanations, and screenshots for output.
Start with Swing & AWT GUI→
Recommended order: Setup → Components → Layouts → Questions.