SwingWorker Usage? #562
-
|
Does Radiance support the use of the SwingWorker utility class to offload heavy tasks to a background thread while allowing updates to the UI? I don't have the specific details yet, but a coworker has indicated that they are having a problem with Radiance throwing Swing exceptions in conjunction with the use of SwingWorkers. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
|
The only thing that comes to mind is "Why are you breaking my application by enforcing the creation and modification of components on the Event Dispatch Thread (EDT)?" in https://github.com/kirill-grouchnikov/radiance/blob/sunshine/docs/faq.md I'd need to see those exception stack traces to comment further. |
Beta Was this translation helpful? Give feedback.
-
|
I'll need to see the exception stack traces to comment further. |
Beta Was this translation helpful? Give feedback.
-
|
if it is a |
Beta Was this translation helpful? Give feedback.
-
|
Delving into it a bit further, it appears there were cases of Swing components being created within the SwingWorker construct outside of the process() and done() methods. That means they were created off the EDT and thus the thrown exceptions are to be expected. If we come up against any issues with SwingWorker usage when Swing component creation/updates occur within process() or done(), I'll revisit it. For now, I assume this issue is resolved. |
Beta Was this translation helpful? Give feedback.
Delving into it a bit further, it appears there were cases of Swing components being created within the SwingWorker construct outside of the process() and done() methods. That means they were created off the EDT and thus the thrown exceptions are to be expected.
If we come up against any issues with SwingWorker usage when Swing component creation/updates occur within process() or done(), I'll revisit it. For now, I assume this issue is resolved.