test/java/awt/Window/TranslucentJAppletTest/TranslucentJAppletTest.java

Print this page

        

*** 63,73 **** } public static void main(String[] args) throws Exception { - sun.awt.SunToolkit tk = (sun.awt.SunToolkit)Toolkit.getDefaultToolkit(); final GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); for (GraphicsDevice gd : ge.getScreenDevices()) { if (gd.isWindowTranslucencySupported( GraphicsDevice.WindowTranslucency.PERPIXEL_TRANSLUCENT)) --- 63,72 ----
*** 94,104 **** SwingUtilities.invokeAndWait(new Runnable() { public void run() { initAndShowGUI(); } }); ! tk.realSync(); if (!paintComponentCalled) { throw new RuntimeException("Test FAILED: panel's paintComponent() method is not called"); } --- 93,103 ---- SwingUtilities.invokeAndWait(new Runnable() { public void run() { initAndShowGUI(); } }); ! r.waitForIdle(); if (!paintComponentCalled) { throw new RuntimeException("Test FAILED: panel's paintComponent() method is not called"); }