I'm in the process of designing a Java GUI driven application that runs a number of separate tasks, each within its own SwingWorker extended class. This is the normal design I use in order to run tasks on their own threads and still keep the EDT free to update the GUI. Each SwingWorker is started on its own thread using an Executors.newCachedThreadPool.
However, within one particular class, there is a task that requires quite a long time to process. The task contains a for loop that performs some calculations up to six times.
I've had the thought of implementing each of the six calculations within their own thread to speed up processing time, but I'm not sure of the best way of implementing this.
Is it possible to both extend SwingWorker and implement Runnable, and then use a void Run() method within the for loop, starting a new Thread each time, or using a cachedThreadPool.
Or am I better off just using standard Thread() implementation?
Any advice or suggestions would be appreciated.
Thanks in advance
Josh