Search code examples
javaswingswingworker

SwingWorkers stopped working


I'm having a very strange problem. I was working on an application using Swing, and of course I'm using SwingWorkers. They were working porperly until last night. I just ran the programm, but the workers stopped working from one run to the next. (I actually didn't change a single line of code). Was there some update or something else going on last night that could explain this strange behaviour?

I'm using JavaSE-1.6 on an OpenSuSE 11.1 box. I'm developing with Eclipse Galileo.


Solution

  • two things I have learnt about SwingWorkers is

    1. Java will run only one swing worker at a time (they get queued)
    2. Once swing workers complete execution, you cannot use them again. You will have to create a new instance of the swing worker if you want to run them again.