Skip to main content
CMP175
Unit 7 of 8
8 Hours

GUI Programming with Swing

3 topics3 videos4 assignments
7.1

Introduction to GUI Programming in Java

Lecture1 assignment

Assignment

Compare Console Apps and GUI Apps

Assignment BriefDue: Complete before Topic 7.2 (Using Swing Components)

Compare Console Apps and GUI Apps

Write short notes explaining the difference between console-based and GUI-based Java applications. Mention at least three advantages of GUI applications and identify common Swing use cases.

7.2

Using Swing Components

Lecture1 assignment

Assignment

Build a Basic Swing Form

Assignment BriefDue: Complete before Topic 7.3 (Event-Driven Programming and Event Handling)

Build a Basic Swing Form

Create a Swing form using JFrame with JLabel, JTextField, JPasswordField, JButton, and JCheckBox. Add labels and basic layout so the form is readable and user-friendly.

7.3&7.4

Event-Driven Programming, Event Handling, and Building Simple Interactive Applications

Lecture2 assignments

Assignment 1

Event Handling with ActionListener

Assignment BriefDue: Complete as part of Topic 7.3 & 7.4

Event Handling with ActionListener

Create a Swing app with at least two buttons (for example Submit and Clear). Use ActionListener to handle click events and show feedback using JLabel or JOptionPane.

Assignment 2

Mini Swing Application

Assignment BriefDue: Complete before Unit 8 (Generics)

Mini Swing Application

Develop a small interactive Swing application such as a calculator, login form, or student info form. Include input validation and at least one event-driven action.