On Thu, 24 Mar 2022 03:07:28 GMT, Phil Race <p...@openjdk.org> wrote:

> I also think there's at least some analogy with OpenJFX's snap-to-pixel idea 
> that it is sometimes better to pick a pixel and stick with it rather than 
> span pixels and be fuzzy. Not an expert on the details of that by any means 
> @kevinrushforth might be able to point to something if it is relevant.

I wonder how it's handled in OpenJFX. There should be the same problem with 
borders at fractional scales.

> If we figure this out properly it might be useful to apply to other cases 
> rather than applying inconsistent hacks.

Yes, all the borders are affected. If you replace titled border with line 
border:

childPanel.setBorder(BorderFactory.createLineBorder(Color.RED, 1));

Some sides are painted with 1-pixel line, some are with 2-pixel line at 125% 
and 150%.

So utility methods would be useful to paint all the borders consistently.

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

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

Reply via email to