Search code examples
javamultithreadingswingswingworkerconcurrency

multiple swing worker for an application with various button


supposing I have an application with various buttons.every button execute a different task.One opens a file, another prints some information and so on.I have to implement a different object that extends swingworker class for every button presents in my applation?


Solution

  • If each action requires a background thread, then yes, I'd use a different SwingWorker for each one. No big deal though. What is the issue that you're having?