Fix bug #1665. Add a swingUtilities invokeLater to avoid thread conflicts with swing.

Change-Id: Ic031f90dc7e608a71832608c1c406f64b3608946