Avoid calling JOptionPane from background threads

Doesn't seem to make any difference, but I did it while troubleshooting
an issue that turned out to have a different cause, so might as well do
the "right" thing.

git-svn-id: https://valelab.ucsf.edu/svn/micromanager2/trunk@14432 d0ab736e-dc22-4aeb-8dc9-08def0aa14fd