< prev index next >

test/jdk/javax/swing/JWindow/ShapedAndTranslucentWindows/PerPixelTranslucentSwing.java

Print this page

        

@@ -86,11 +86,11 @@
         Rectangle bounds = north.getBounds();
         Point loc = north.getLocationOnScreen();
 
         Color color = robot.getPixelColor(loc.x + bounds.width / 2, loc.y + bounds.height + 3);
         System.out.println(color);
-        if (FG_COLOR.getRGB() == color.getRGB())
+        if (BG_COLOR.getRGB() != color.getRGB())
             throw new RuntimeException("Background is not translucent (" + color + ")");
 
         EventQueue.invokeAndWait(this::dispose);
     }
 }
< prev index next >