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:38:51 UTC 2022


On Fri, 25 Feb 2022 22:35:04 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 416:
> 
>> 414:         }
>> 415:         int rowHeight = 0;
>> 416:         for(int visrow = rMin; visrow <= rMax; visrow++) {
> 
> So was the issue here that this is a 1 based index not a zero-based index  and we basically had an off-by-one bug ?
> 
> nit : for( -> "for ("

This issue is not related to the current bugfix though, it is related to the border rectangle drawn over the table at printing. Since I had corrected the maxRow computation in TablePrintable class, an existing issue where rectangle border drawing was getting affected, so in had to fix the issue. Since Rectangle border had to be drawn around the table rows the computations had to be from minRow till maxRow.

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

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



More information about the client-libs-dev mailing list