aboutsummaryrefslogtreecommitdiffstats
path: root/src/junit/com/jogamp/test/junit/jogl/awt/TestAWT02WindowClosing.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/junit/com/jogamp/test/junit/jogl/awt/TestAWT02WindowClosing.java')
-rw-r--r--src/junit/com/jogamp/test/junit/jogl/awt/TestAWT02WindowClosing.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/junit/com/jogamp/test/junit/jogl/awt/TestAWT02WindowClosing.java b/src/junit/com/jogamp/test/junit/jogl/awt/TestAWT02WindowClosing.java
index 9e8cb916a..6132f8232 100644
--- a/src/junit/com/jogamp/test/junit/jogl/awt/TestAWT02WindowClosing.java
+++ b/src/junit/com/jogamp/test/junit/jogl/awt/TestAWT02WindowClosing.java
@@ -56,7 +56,16 @@ public class TestAWT02WindowClosing extends UITestCase {
frame.setSize(500, 500);
ClosingWindowAdapter closingWindowAdapter = new ClosingWindowAdapter(frame);
frame.addWindowListener(closingWindowAdapter);
- frame.setVisible(true);
+ final Frame _frame = frame;
+ try {
+ javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
+ public void run() {
+ _frame.setVisible(true);
+ }});
+ } catch (Throwable t) {
+ t.printStackTrace();
+ Assume.assumeNoException(t);
+ }
Thread.sleep(durationPerTest);
if(!closingWindowAdapter.closingCalled) {