Javadoc
Rules enforced by this method:
(1) it is always OK to reach this method on the Event Dispatch Thread.
(2) it is generally not OK to reach this method outside the Event Dispatch Thread.
(3) (exception form rule 2) except when we get here from a repaint() call, because repaint() is thread-safe
(4) (exception from rule 3) it is not OK if swing code calls repaint() outside the EDT, because swing code should be called on the EDT.
(5) (exception from rule 4) using SwingWorker subclasses should not be considered swing code.