Chapter 13. The java.awt Package: Event Handling

OBJECTIVES

This chapter helps you prepare for the exam by covering the following Sun testing objectives from the unit “The Java.awt Package”:

Write code to implement listener classes and methods, and in listener methods, extract information from the event to determine the affected component, mouse position, nature, and time of the event.

  • Graphical user interfaces (GUIs) in Java interact with a program by means of event objects that are generated by components and communicated to event listeners. This objective requires you to know how to write methods that receive these events and act on them.

State the event classname for any specified event listener interface in the java.awt.event package.

Get Sun Certification Training Guide (310-025, 310-027): Java™ 2 Programmer and Developer Exams now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.