https://kodejava.org/how-do-i-use-swingworker-to-perform-background-tasks/
How do I use SwingWorker to perform background tasks?