RFR: 8236907: JTable added to nested panels does not paint last visible row [v6]

Tejesh R duke at openjdk.java.net
Mon Feb 28 05:20:50 UTC 2022


On Fri, 25 Feb 2022 22:27:57 GMT, Phil Race <prr at 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



More information about the client-libs-dev mailing list