prev next

Computer Science for Transfers
Lab 8 - Event-Driven Programming

Overview

In last week's lab you learned how to use Swing to build simple graphical user interfaces.  Although the GUIs you built were neat, they did nothing.  In this week's lab you will learn how to connect events to GUI Components so that the GUIs you build will be able to do something useful.

Pre-lab

  1. Review your class notes on Java Swing.
  2. Read through the Java tutorial trail on How to Use Actions.

Objectives

  1. To learn how to write a Java program that responds to events
  2. Gain experience writing event-driven programs
  3. Learn how to use basic Swing events
  4. Gain additional experience working with basic Swing components

Activities

  1. Handling the Window Closing Event.
  2. Working with JButtons and ActionEvents.
  3. Activate the Scramble Pad.

Grading

In-lab participation 3 points
Activity 1 6 points
Activity 2 9 points
Activity 3 12 points
Total 30 points

prev next
Last modified July 24, 2003 by tmh. All rights reserved.