Guice creates Swing components outside of UI thread problem?

Posted by Boris Pavlovic on Stack Overflow See other posts from Stack Overflow or by Boris Pavlovic
Published on 2010-04-28T09:13:13Z Indexed on 2010/05/03 5:58 UTC
Read the original article Hit count: 354

Filed under:
|
|
|
|

I'm working on Java Swing application with Google Guice as an IOC container. Things are working pretty well. There are some UI problems. When a standard L&F is replaced with Pushing pixels Substance L&F application is not running due to Guice's Swing components creation outside of UI thread.

Is there a way to tell Guice to create Swing components in the UI thread?

Maybe I should create custom providers which will return Swing components after SwingUtilities.invokeAndWait(Runnable) creates them.

I don't like the idea of running the whole application in UI thread, but maybe it's just a perfect solution.

© Stack Overflow or respective owner

Related posts about java

Related posts about swing