You want to use the techniques described in this topic:
(And follow the links in that topic to related discussions.)
Always keep in mind that the only safe thing to do with a Java Swing object in a background thread is to carry it around, to pass back to a short foreground function.