ScheduledThreadPoolExecutor only runs Swingworker once

ScheduledThreadPoolExecutor (which implements ScheduledExecutorService) seems to be only running the SwingWorker class once when using the ScheduleAtFixedRate method. The original code is kinda long, so I made a new code that produces the same results below.

While SwingWorker does implement the Runnable interface, per its API section on the doInBackground() method:

Note that this method is executed only once.

So while its inner run() method may repeatedly run, the doInBackground() will only run once. Not only that, but the run() method is marked final within SwingWorker, and so you can't override it to call doInBackground multiple times.

A better solution is not use a SwingWorker at all but rather a simpler Runnable-derived class.

Email codedump link for ScheduledThreadPoolExecutor only runs Swingworker once