On Tue, 4 Oct 2022 17:48:55 GMT, Harshitha Onkar <hon...@openjdk.org> wrote:

>> JInternalFrame background color seems to overflow into the border region. 
>> This issue is more prominently seen on Windows - Metal LAF (with fractional 
>> scaling, as shown below). The primary reason is border scaling issue as 
>> observed in - [JDK-8279614](https://bugs.openjdk.org/browse/JDK-8279614) 
>> 
>> The fix involves a similar approach as described here 
>> https://github.com/openjdk/jdk/pull/7449#issuecomment-1068218648. The test 
>> checks the midpoint and corners of borders to check if the internal frame's 
>> background color is located out of JInternalFrame.
>> 
>> ![image](https://user-images.githubusercontent.com/95945681/190233555-a7e00f2c-9003-4c11-84fb-207957838c2f.png)
>
> Harshitha Onkar has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   review changes, saving a scaled version of image

src/java.desktop/share/classes/javax/swing/plaf/metal/MetalBorders.java line 
320:

> 318:             // midpoint at which highlight & shadow lines
> 319:             // are positioned on the border
> 320:             int midPoint = loopCount / 2;

This variable is used only if the internal frame is resizable. It should be 
declared inside the corresponding `if` statement.

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

PR: https://git.openjdk.org/jdk/pull/10274

Reply via email to