O'Reilly logo

Graphic Java™ 1.2, Volume I: AWT, Third Edition by David M. Geary

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Firing Custom Events from Custom Components

Firing standard AWT events from custom components is relatively straightforward, as we've seen above. However, implementing custom events and firing them from a custom component is a little trickier. We'll outline the steps involved and then, for the sake of illustration, develop a custom component that fires custom events for the sake of illustration.

A Not-So-Contrived Scenario

Let's say that you've been tasked with developing a tree control similar to what you'd find in the Windows 95 Explorer application. For those of you unfamiliar with the Explorer, take a look at Figure 9-16. (A future version of the AWT will provide such a component.)

Figure 9-16. The Windows 95 Explorer Tree Control.

Being ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required