If you want to do what I think you're trying to do, you can use a SwingWorker. It has a publish method and process method. The publish method will send messages to the process method. The process method, unlike the rest of the SwingWorker, runs on the EDT.