On Wed, 2 Feb 2022 23:48:11 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:

>> @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?

@mrserb Sorry, what I meant to convey is that the coordinate arguments sent to 
painter.paint() is including the component + border, and newX, newY, newHeight, 
newWidth are coordinates of component only. 
So when newX and newY are decreased by more than 1 in paint() method, border 
seems to be drawn **inside** the component area and not **outside** (in this 
case within the table header)

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

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

Reply via email to