RFR: 8139173: [macosx] JInternalFrame shadow is not properly drawn

Sergey Bylokhov serb at openjdk.java.net
Thu Jan 27 02:35:29 UTC 2022


On Wed, 26 Jan 2022 06:53:42 GMT, Toshio Nakamura <tnakamura at openjdk.org> wrote:

> JInternalFrame's bottom area is not properly drawn with Aqua LAF.
> This problem remained for long time, but we recognized it recently.
> 
> According to the bug report, it depends on MacOS's version. I don't have old ones (10.10 and 10.11 in the report), but the current MacOS can recreate the issue. I confirmed the following OS versions recreated this issue and this patch could solve it.
> 
> Mojave 10.14.6
> Catalina 10.15.7
> Big Sur 11.6.2
> Monterey 12.1
> 
> jtreg "javax/swing" and "java/awt" have no regression.

src/java.desktop/macosx/classes/com/apple/laf/AquaInternalFrameBorder.java line 383:

> 381:         int h = inH;
> 382: 
> 383:         h = metrics.titleBarHeight + inH;

Just a suggestion, after the current change it is possible to align the h and other x/y/w vars and make it final.

test/jdk/javax/swing/plaf/aqua/JInternalFrameBorderTest.java line 66:

> 64:         robot.delay(1000);
> 65: 
> 66:         Point p = internalFrame.getLocationOnScreen();

The internalFrame is a Swing component so we should call all its methods on EDT.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7228



More information about the client-libs-dev mailing list