I have a task running using javax.swing.Timer. It executes once every few minutes. The task takes a second or two, and it is freezing my GUI.
What can I do to fix this?
I have a task running using javax.swing.Timer. It executes once every few minutes. The task takes a second or two, and it is freezing my GUI.
What can I do to fix this?
The task may be taking more that 2 seconds.. Does the task require access to GUI? If not use separate thread. The specific part of the task which require GUI access, can use SwingWorker to update the GUI.