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

Jayathirth D V jayathirth.d.v at oracle.com
Thu Feb 22 12:56:27 UTC 2018


Hi Pankaj,

 

Please find my input:

 

We need to update Copyright year, add new bug id in jtreg comment & it's better to keep jtreg comments before code for program starts like import statements.

 

I think any one condition out of "(popup.getLocationOnScreen().y > ls.y"    &    "window.getHeight() < popup.getHeight() + south.getHeight()" would be enough to verify if popup.y exceeds window.y or not.

 

Also I remember we discussed on call that if possible we can keep the main window starting at y = 0, so that we have enough space below the window giving test more chance to execute properly.

 

Thanks,

Jay

 

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/14c6997a/attachment.html>


More information about the swing-dev mailing list