On Mon, 14 Feb 2022 16:45:09 GMT, Alisen Chung <ach...@openjdk.org> wrote:
>> src/java.desktop/share/classes/javax/swing/border/TitledBorder.java line 354: >> >>> 352: Graphics2D g2d = (Graphics2D) g2; >>> 353: Path2D path = new Path2D.Float(); >>> 354: path.append(new Rectangle2D.Float((float) >>> borderX, borderY, borderW, labelY - borderY), false); >> >> Why the current coordinates do not work, is it because we calculate them in >> the wrong way or probably the insets are wrong? > > I think there's a rounding error when doing x.5 scalings causing the drawing > area to be one pixel too small on the left side Can you please check how it will work for the undecorated frame, if it will be fine then the problem is somehow related to the size of the insets. ------------- PR: https://git.openjdk.java.net/jdk/pull/7449