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

Prasanta Sadhukhan psadhukhan at openjdk.java.net
Wed Feb 16 10:36:07 UTC 2022


On Wed, 16 Feb 2022 09:13:18 GMT, Tejesh R <duke at openjdk.java.net> wrote:

>> The mentioned test computes 36 rows for frame height of 600 units. The 36th row is 18% visible in console and in printing its 100% visible. I have done the testing for the bug fix with an automated test case LastRowVisible.java and with the below test cases.
>> 1. jdk/test/java/awt/print/PageFormat/ImageableAreaTest.java
>> 2. jdk/test/javax/swing/JTable/LostTextTest.java
>> 3. test/jdk/javax/swing/JTable/TestClearSel.java
>> The maxRow computations are just fine for console and printable views, the only thing is visibility of the same when setSize of frame is not a multiple of rowHeight of a table......
>
> Tested for the below test cases:
> 1. jdk/test/javax/swing/JTable/PrintManualTest_FitWidthMultiple.java
> 2. jdk/test/javax/swing/JTable/JTableScrollTest.java
> 3. Also with SwingSet2 application for verification of JTable console paint and printing.

It seems logical that 36th row is not visible fully onscreen with 600 height whereas for A4 having 72dpi with 595x842 pixels, it is visible but I was thinking about WYSWYG (what you see what you get) logic for printing and it's not printing exactly what we see so not sure if it's an issue. Maybe @prrace can share his thoughts if it's an issue or not
Otherwise looks ok to me.

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

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



More information about the client-libs-dev mailing list