Name: rr100577 Date: 02/14/2002
When starting a Java GUI application that includes multiples threads, for example an application that dynamically streams in data to be displayed, there is a period of time when AWT events can not be handled correctly. This can cause problems in the application itself in recovering from lost or out of sequence events.
Allow the app to turn off the EventDispatchThread and dispatch
events under the control of the main thread. This eliminates
the extra thread and allows the app to process events when it is ready.
// Returns the state of the AutoDispatch mode of the EventDispatchThread,
// which is true by default.
public boolean getAutoDispatch();
// Sets the state of the AutoDispatch mode of the EventDispatchThread.
public setAutoDispatch(boolean mode);
* Dispatches an event. The manner in which the event is
* dispatched depends upon the type of the event and the
* type of the event's source object:
public void dispatchEvent(AWTEvent event);
// Convenience method for app to call for event delivery.
// In a loop it calls getNextEvent() and dispatchEvent() for each
// event on the EventQueue, until a shutdown event arrives.