ScrollPane border paint problem at large scalings
I've seen the four sides of a ScrollPane border painted with different thicknesses at large scalings: 125% ~ 175%. Any idea that we can work around this?
I've seen the four sides of a ScrollPane border painted with different thicknesses at large scalings: 125% ~ 175%.
This is because Swing scales the 1px border either to one or to two screen pixels.
Any idea that we can work around this?
Not really...
I use a special Border implementation that avoids this problem (e.g. on 150% scaling on Windows). Feel very free to adopt it into FlatLAF; the source code is already in the NetBeans IDE repo under the Apache license:
https://github.com/apache/netbeans/blob/master/platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/DPISafeBorder.java
Fixed in latest 3.5-SNAPSHOT: https://github.com/JFormDesigner/
The scrollpane border now has same thickness on all 4 sides.