On Wed, 18 Jun 2025 19:28:18 GMT, Damon Nguyen <dngu...@openjdk.org> wrote:

> Compilation error on windows with `WindowsButtonUI` used. Replaced it with 
> `BasicButtonUI` to maintain overriding the `paintText` method but this was 
> not the same as Windows L&F buttons. I attempted to import `WindowsButtonUI` 
> and extending it, but the class is `final`. Instead, I chose to add a 
> LineBorder in the same way as when a Rectangle was drawn to keep the same 
> test behavior. It seems the extra 1 pixel width is unnecessary now when 
> testing, so the changes only include removing `MyButtonUI` and adding a 
> LineBorder.
> 
> This updated test now compiles and runs as expected. The test has all of the 
> text within the blue button border. There does not seem to be any overlapping 
> or out of bounds text as originally described with the original test.

You could also take this opportunity to automate the test. I believe it should 
be possible to verify that the border is not distorted.

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

PR Comment: https://git.openjdk.org/jdk/pull/25883#issuecomment-2986139755

Reply via email to