Derived from the code in java.awt.EventDispatchThread. Used to implement
modal dialogs. It prevents InputEvents from reaching anything that is not
a child (at some level) of the Container passed into the constructor or is
not an instance of Window that becomes visible after this dispatcher starts
running.