On Fri, 25 Feb 2022 22:27:57 GMT, Phil Race <p...@openjdk.org> wrote:

>> Tejesh R has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   8236907: JTable added to nested panels does not paint last
>
> src/java.desktop/share/classes/javax/swing/TablePrintable.java line 406:
> 
>> 404:         Point lowerRight = new Point(visibleBounds.x + 
>> visibleBounds.width - 1,
>> 405:                                      visibleBounds.y + 
>> visibleBounds.height - 1);
>> 406: 
> 
> What is the effect of the -1 ? Meaning what happens if you don't do it - how 
> did it contribute to the bug ?
> And if this is about height why the -1 on the width too ?

If not -1, then lowerRight would have been maxRow, as I Mentioned earlier 
minRow and maxRow in BasicTableUI is 0 and max-1, whereas in TablePrintable it 
was 1 to max. In order to match both computation for further calculation I made 
it similar to BasicTableUI class.

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

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

Reply via email to