<Swing Dev> [11] JDK-8190347: [TESTBUG] Test javax/swing/JWindow/ShapedAndTranslucentWindows/TranslucentJComboBox.java fails

Pankaj Bansal pankaj.b.bansal at oracle.com
Thu Feb 22 12:14:31 UTC 2018


<<One of the scenario to reproduce this is to run this test on a 1920X1080 screen with HiDPI value 2.0. The popup will be created above and it will fit within the Window of size <<500X500. The test fails.

Sorry, the window is of size 255X255 not 500X500.

 

Regards,

Pankaj

 

From: Pankaj Bansal 
Sent: Thursday, February 22, 2018 5:34 PM
To: swing-dev at openjdk.java.net; Sergey Bylokhov; Prasanta Sadhukhan
Subject: <Swing Dev> [11] JDK-8190347: [TESTBUG] Test javax/swing/JWindow/ShapedAndTranslucentWindows/TranslucentJComboBox.java fails

 

Hi All,

 

Please review the test only fix for JDK 11.

 

Bug:

https://bugs.openjdk.java.net/browse/JDK-8190347

 

webrev:

http://cr.openjdk.java.net/~pbansal/8190347/webrev.00/

 

Issue:

The test TranslucentJComboBox creates a Translucent JWindow and then adds a JComboBox at the bottom. Then a popup is created when clicked on JComboBox. The test always checks the popup for opaqueness whether it is created below or above the JComboBox. If it is created below the JComboBox, it will be opaque.  If it is created above the JComboBox and it does not fit within the JWindow containing JComboBox, it will be opaque. 

But in some scenarios, the Popup is created above the JComboBox and it can fit within the JWindow. In this case, it be translucent and the test will fail. The test needs to consider these scenarios. 

 

One of the scenario to reproduce this is to run this test on a 1920X1080 screen with HiDPI value 2.0. The popup will be created above and it will fit within the JWindow of size 500X500. The test fails.

 

Fix:

Made changes to check if the popup is created below or above the JComboBox when the color values don't pass the conditions. If it is created below or if it is created above and If it does not fit, through the exception else ignore.

 

Regards,

Pankaj Bansal

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/swing-dev/attachments/20180222/5c39f7fb/attachment.html>


More information about the swing-dev mailing list