Active Events

Prior to the 1.2 AWT, events posted to an event queue had to have either a Component or a MenuComponent specified as the source of the event in order for the event to be dispatched. When an event is dispatched by an event queue, either Component.dispatchEvent() or MenuComponent.dispatchEvent() is invoked for the source of the event, depending upon the type of the event source.

The 1.2 AWT introduces a new type of event—an active event. Active events are represented by the java.awt.ActiveEvent interface, which defines a lone method: void dispatch(). Active events are dispatched by invoking the event's dispatch method, instead of invoking a method provided by the event source. As a result, active events allow noncomponents to arrange ...

Get Graphic Java™ 1.2, Volume I: AWT, Third Edition 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.