On Thu, 5 May 2022 18:00:16 GMT, Alisen Chung <ach...@openjdk.org> wrote:
>> Changed the drawing area to be increased by 0.5 on the left side to prevent >> clipping > > Alisen Chung has updated the pull request incrementally with one additional > commit since the last revision: > > saved translation values in EtchedBorder, updated test src/java.desktop/share/classes/javax/swing/border/EtchedBorder.java line 137: > 135: > 136: g.drawLine((3*stkWidth/2)-1, h-(stkWidth-stkWidth/2), > 137: w-(stkWidth-stkWidth/2), h-(stkWidth-stkWidth/2)); // > bottom line Suggestion: g.drawLine(stkWidth/2, h-(stkWidth-stkWidth/2), w-(stkWidth-stkWidth/2), h-(stkWidth-stkWidth/2)); // bottom line If you change the initial `x` to be `stkWidth/2`, it always aligns with the rectangle drawn in `paintBorderRect`. Thus the issue where the bottom highlight line is short of a few pixels gets resolved. ------------- PR: https://git.openjdk.java.net/jdk/pull/7449