RFR: JDK-8016524: [macosx] Bottom line is not visible for JTableHeader [v4]

Sergey Bylokhov serb at openjdk.java.net
Wed Feb 2 23:51:12 UTC 2022


On Wed, 2 Feb 2022 18:38:21 GMT, Harshitha Onkar <duke at openjdk.java.net> wrote:

>> src/java.desktop/macosx/classes/com/apple/laf/AquaTableHeaderBorder.java line 108:
>> 
>>> 106:         final int newHeight = height;
>>> 107: 
>>> 108:         painter.paint(g, c, newX - 1, newY - 1, newWidth + 1, newHeight + 1);
>> 
>> I would like to clarify the change here, what is the coordinates/size passed here is it a size of the component+border, or just a size of the component? So if decrease the newX/Y will we draw in the component area, or accidentally draw outside?
>
> @mrserb   It is the size of component + border. The component being painted here is `DefaultTableCellHeaderRenderer`.
> 
> Tested under two cases
> 1. Decreasing x & y, keeping width & height same as above - Border gets drawn inside the component area making header look smaller.
> 2. Decreasing width & height, keeping x & y same - Border is not visible

If it is a size of the component+border then how we can draw outside of it by decreasing the x/y?

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

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



More information about the client-libs-dev mailing list