Force Swing related code to be executed in event dispatch thread.