RFR: 8279614: The left line of the TitledBorder is not painted on 150 scale factor [v3]

Alexey Ivanov aivanov at openjdk.java.net
Mon Mar 14 23:07:47 UTC 2022


On Mon, 14 Mar 2022 22:37:35 GMT, Phil Race <prr at openjdk.org> wrote:

>> src/java.desktop/share/classes/javax/swing/border/EtchedBorder.java line 154:
>> 
>>> 152: 
>>> 153:         // 8279614: The dark line was being overdrawn by the light line. The fix was to
>>> 154:         // make sure that the dark line is always drawn second.
>> 
>> Suggestion:
>> 
>>         // 8279614: The dark line was overdrawn by the light line.
>>         // The fix makes sure that the dark line is always drawn second.
>> 
>> 
>> Does the opposite never happen? That the shadow overdraws the highlight.
>
> This is a comment on the actual comment rather than whether the intent is correct.
> I'm not in favour of putting bug ids into the comments. Our code will end up utterly cluttered with them
> Also it is phrased to describe a fix.
> So IF it were to stand as is, I would have phrased it as "what we are doing now and why", ie
> // Make sure the shadow line always is drawn second because it needs to over draw the border.

I should've posted my question separately rather than as a comment to the comment.

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

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



More information about the client-libs-dev mailing list