I am trying to implement a SwingWorker
class within my application. Is there a way to set a length of time that after which, the SwingWorker \"times out\"? I
The short answer is "it's hard", depending on what your requirements are. I highly recommend reading Java Concurrency In Practice.
The basic thing you could do would be to (a) make sure your SwingWorker's Runnable is interrupt-friendly, and (b) set a Timer (or use the blocking get() call Brian mentioned) to cancel your Future.