Swing Application stuck following Apple Java update 1.6.0_51

后端 未结 5 412
情书的邮戳
情书的邮戳 2021-01-14 02:41

We have a Java Swing client application. It\'s installed as a Java Web Start applet and as a install4j installer.
Since Apple released the latest Java 6 upgrade our appl

5条回答
  •  执念已碎
    2021-01-14 03:31

    I answered this at https://stackoverflow.com/a/17226346/2507292 The short form is that you have to wrap your call to UIManager.setLookAndFeel so it is run in the Swing thread. All Swing methods that are not labeled "thread-safe" in their JavaDoc must be run in that thread. Previous versions of Java did not seem to break if you did not do that, and it is easy not to think about it when setting the look and feel once at the start of your program. There may be other methods that are more strict about it too, but this is the one that bit us.

提交回复
热议问题