java - Concerns with asynchronous opening of JDialog with owner frame -


i have read of java swing not thread safe.

i loading data remote site asynchronously , displaying in dialog once has loaded. concern if swing not thread-safe claims, i'm afraid cause issue when set dialog's owner frame, in different thread.

if correct in concern, can open dialog synchronously , avoid issues?

swing component must created , updated on event dispatch thread (edt).

when load data using separate thread can use swingutilities.invokelater(...) create dialog , components.

or option use swingworker. when background processing of worker finished code can automatically executed on edt.

read section swing tutorial on concurrency more information , working examples.


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -