lab 10 3 2 1

background image

1 - 2

Fundamentals of Java Programming Lab 10.3.2.1

Copyright

 2003, Cisco Systems, Inc.

Lab 10.3.2.1 Identifying Event Handler Features in the TellerGUI Class


Estimated Time: 10 minutes

Learning Objective:

• In this lab activity, the student will implement interfaces that apply the Event delegation

model for handling user interactions with a GUI.

Description/Scenario:

• The student will learn event sources and components, and how to create an Event Handler.

• What are events and how are they handled?

An event is an action that is initiated by a user. Some common events are buttons clicked
and text changing. Events are objects that describe what has happened. Many different
types of event classes exist to describe different categories of user action. The Event
delegation model uses the following objects:

o A source of an event is an object that can generate an event object.

The Event is an Event object that encapsulates information about an Event.
The Handler is the object that can handle the Event that is performing some task.

o Each of the component classes can generate specific event objects. Button

objects generate Action events. TextComponents generate TextEvent objects.
The Frame object is a Window and generates a WindowEvent object.

File Management:

• Continue saving all work, as it will be used again in the next lab.


Tasks:

Step 1

a. Using the hard copy of the TellerGUI source code, identify the sources of the events

in this GUI.

b. Where are the event registrations?

c. What is the handler access path to the ATMGUI display (TextArea)?

Step 2 Review Questions

a. What are the events for the TellerGUI class?

b. Where and how are they registered?

c. How are they handled?

Step 3 Documentation

Write all needed javadoc comments and document elements for the lab. Then, using BlueJ, select
Tools and create the javadocs by selecting Project Documentation.



background image

2 - 2

Fundamentals of Java Programming Lab 10.3.2.1

Copyright

 2003, Cisco Systems, Inc.


Document Outline


Wyszukiwarka

Podobne podstrony:
CCNA2 lab 10 1 6 pl
lab 3 10 5
lab 3 10 1
Lab 8 9 10 ver2
lab 10 2 5
IE RS lab 10 solutions
lab 8 10 1
lab 10 2 4
LAB 10
2010 Lab 10 struktury drzewiaste
Podstawy Automatyki Lab 10 CW3 Układy sekwencyjne elektroniczne
Podstawy Automatyki Lab 10 CW1 Układy przełączające oparte na elementach stykowych
Lab 6, 10.2.2.8 Packet Tracer - DNS and DHCP Instructions
lab 5(1) 10
lab 10
CCNA1 lab 10 3 5c pl
lab 10 1 3
lab 2 10 2c
lab 10

więcej podobnych podstron