I have many threads (SwingWorker, Timer, Thread..) in different parts of the application. I need to call one method which pause all these threads. What is the best approach to do this?
Thanks
Additional Info
I have a notepad in the app and it can paste images, draw arrow, lines, type text, you can write with stylus etc.. At the same time in the background this app does different things: check login time, check messages, updates something, works with database.
So when you try to write with stylus and app does all these things in the background, writing with stylus becomes a little bit slow. So I decided to pause all these threads in the background. I think this should help and I wonder what is the best way to pause these threads. They should continue to work after I finish to write with stylus.