<Swing Dev> RFR: 8160720: [TEST_BUG] javax/swing/SwingUtilities/TestBadBreak/TestBadBreak.java
Alexey Ivanov
aivanov at openjdk.java.net
Thu Feb 11 21:36:38 UTC 2021
On Thu, 11 Feb 2021 21:11:03 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
> For me on Windows with 200% scaling, in the first image ‘…’ is painted over the transparent background whereas in the second image ‘…’ is over the components opaque background.
>
> The test passes with `uiScale=1` but I see no ‘…’ at all. Both images are clipped at “.1”.
As you can see on the screenshots below, the strings are clipped differently. In the case where `uiScale=1`, the string is not clipped, it's displayed completely in the frame.


Shall the test be modified to do some text measurement to ensure the JLabel cannot fit the text completely? And then paint it to the image of the calculated size?
As for the clipping itself, I think the first frame, the bottom one, looks correctly: the text is clipped right to the edge of the client area whereas the second frame, the upper one, leaves some whitespace.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2502
More information about the swing-dev
mailing list