AWT falls in infinite loop
Peter C. Mehlitz
peter at transvirtual.com
Thu Aug 13 09:33:00 PDT 1998
On Thu, 13 Aug 1998, (U wrote:
>
> EventDispatchThread.run
>-----> MouseEvent.dispatch
>| -> AWTEvent.transferMouse
>| -> DocContainer.processMouseEvent
>|
>| DocContainer is the component called 'to' (a 'transferMouse'
>| method parameter). It is a component of the ICE browser which
>| has a mouse listener. At this time, the 'DocContainer.processMouseEvent'
>| method calls 'Component.processMouseEvent' which itself calls
>| the component mouse listener (which does nothing). Then, the
>| 'Component.processEvent' method is called:
>|
>| -> Component.processEvent
>| -> MouseEvent.dispatch ----
>| |
>----------------------------------------
>
How is this supposed to work, if DocContainer.processMouseEvent() calls
Component.processEvent(), which should - according to the specs - call again
processMouseEvent() ? Why does it do so at all (since processEvent seems to be
the event type dispatcher in JDK)?
>Since all the events are managed through 'EventDispatchThread.run',
>I think we can simply remove the call to 'dispatch' in the
>'Component.processEvent' ! No ?
Since processEvent() is protected, it can be called from all derived classes
(outside of java.awt), for any event (i.e. not just for the ones obtained via
EventQueue.getNextEvent() / dispatched via EvenetDispatchThread()). According
to the specs, processEvent() has to call the process<EventType>Event() method.
Wait a second - isn't the ICE web-browser based on swing? This would explain a
lot..
-- Peter
More information about the kaffe
mailing list