AWT Events

Paul Mclachlan pdm@acm.org
Wed May 30 10:36:00 GMT 2001


At 20:21 05 May 2001 -0700, Shane Nay wrote:

> I really need to know how events are propagated in java AWT normally, like 
> are they bubble down, or bubble up.  When I get events from Pgui heavyweights 
> they come attached to the particular widget, so that would logically lead to 
> sending the event right to the widget.  However, I don't think this is the 
> "normal AWTy" way of doing things..., I think maybe you give it to the top, 

I did a bit of AWT event hacking back in 1.02 & 1.1.  My memory (which is not
always reliable) tells me that events from peers are delivered directly to the
peer, and then (if not handled) are passed back up the chain.  There are some
events that arrive at parent components (with post), and are passed down the
chain (via post calls) to the object that is meant to handle them, then, if it
isn't handled, back up the chain (using handleEvent) to the parent again.

That probably isn't going to clear too much up.  I don't think the actual
component that receives all these events is well defined - certainly we handled
different events differently.  (We used to intercept & change certain AWT
events).

- Paul

-- 
Paul Mclachlan (paul.mclachlan@numega.com)
Software Engineer, Java Tools.  NuMega Lab, Compuware corp.



More information about the Java mailing list