contains classes for implementing the input queue. The Swing documentation strongly recommends that lengthy processing happen somewhere other than the Swing dispatch thread. Furthermore, potential race conditions exist if the dispatcher is doing something at the same time as an event is received from the layout. Therefore, all events are funneled through a queue and the events are processed in an independent thread. This makes Swing processing quick and simple (the Swing events are converted to command objects and queued). It also eliminates the possibility of contention beause the queue serializes events. Since the queue is a classic producer/consumer problem, it is synchronized.

Package Specification

This package depends upon the Queue class.

Related Documentation

See the Swing documentation and the Command design pattern.