Re: ENENT HANDELLING IN JAVA
Posted By:
nikolas_pontikos
Posted On:
Wednesday, December 22, 2004 11:44 AM
Hi,
event handling in java is dealt with a single thread the
java.awt.event.EventDispatcher thread. However you
can't access it directly as its scope is limited to the
scope of the event package. However you can call
EventQueue.invokeLater(some runnable object) and
EventQueue.invokeAndWait(some runnable object) to be sure
that your threads are run from the EventDispatcher
thread. Also there exists a isEventDispatcher() method
to know which current thread is executing. I don't
know the apis by heart so you should check the java.awt
documentation.
Thanks,
Nikolas.