On Mon, 20 Nov 2023 10:10:12 GMT, Tejesh R <t...@openjdk.org> wrote:

>> src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableUI.java line 
>> 2087:
>> 
>>> 2085:             for (int row = rMin; row <= rMax; row++) {
>>> 2086:                 cellRect = table.getCellRect(row, cMin, false);
>>> 2087:                 cellRect.x = getXPosition(cMin);
>> 
>> Why do we need to calculate cellRect.x separately? What is wrong in getting 
>> the value already there in `cellRect` ?
>
> The value we get from `table.getCellRect(row, cMin, false);` doesn't consider 
> x position offset, so we need to update with the offset value.

getCellRect spec says
`Returns a rectangle for the cell that lies at the intersection of row and 
column`

What's the x position offset we are talking here?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16374#discussion_r1398979460

Reply via email to