changeset 5249:9b4e642a3053

7160653: test/javax/swing/plaf/synth/7158712/bug7158712.java failed on Ubuntu Reviewed-by: alexp
author rupashka
date Thu, 12 Apr 2012 12:48:31 +0300
parents 417ab141f5c0
children cccb19a3038e
files test/javax/swing/plaf/synth/7158712/bug7158712.java
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/test/javax/swing/plaf/synth/7158712/bug7158712.java	Wed Apr 11 18:44:33 2012 -0700
+++ b/test/javax/swing/plaf/synth/7158712/bug7158712.java	Thu Apr 12 12:48:31 2012 +0300
@@ -28,6 +28,8 @@
    @author Pavel Porvatov
 */
 
+import sun.awt.SunToolkit;
+
 import javax.swing.*;
 import javax.swing.plaf.basic.BasicComboPopup;
 import javax.swing.plaf.synth.SynthLookAndFeel;
@@ -65,7 +67,7 @@
 
         UIManager.setLookAndFeel(laf);
 
-        EventQueue.invokeLater(new Runnable() {
+        EventQueue.invokeAndWait(new Runnable() {
             public void run() {
                 comboBox = new JComboBox<>(
                         new String[]{"Very Looooooooooooooooooooong Text Item 1", "Item 2"});
@@ -80,6 +82,8 @@
             }
         });
 
+        ((SunToolkit) Toolkit.getDefaultToolkit()).realSync();
+
         Point comboBoxLocation = Util.invokeOnEDT(new Callable<Point>() {
             @Override
             public Point call() throws Exception {