Update JLabel repeatedly with results of long running task
Use a Swing Timer for repeating tasks & a SwingWorker for long running tasks. E.G. of both below – it uses a Timer to repeatedly perform a ‘long running’ task (a ping) in a SwingWorker. See Concurrency in Swing for more details on the Event Dispatch Thread and doing long running or repeating tasks in … Read more