1) basically you only needed to know if your code would be executed on EDT (all changes should be made on EDT),
2) if you have any doubts, you can test
if (EventQueue.isDispatchThread()) {
or (this also returns true if on EDT)
if (SwingUtilities.isEventDispatchThread()) {
further here or here
3) all output from background tasks should be enclosed in invokeLater() , the base material on Concurency in Swing
source share