Improve Swing thread safety