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

Prasanta Sadhukhan psadhukhan at openjdk.java.net
Mon Feb 14 06:56:10 UTC 2022


On Thu, 10 Feb 2022 09:49:41 GMT, Tejesh R <duke at openjdk.java.net> wrote:

> Issue in painting last row of JTable due to decrement in `MaxRow `during computation. Differences in `MaxRow `computation between `TablePrintable` and `BasicTableUI `class. The Bug is fixed in both the classes. Test Case added to validate the same.

src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTableUI.java line 1903:

> 1901:     private void paintDropLines(Graphics g) {
> 1902:         JTable.DropLocation loc = table.getDropLocation();
> 1903:         if (loc == null) {

Deleting this seems to have regressed JDK-8081491 where 1 extra row is printed per page..
jdk/test/java/awt/print/PageFormat/ImageableAreaTest.java is supposed to print 35 rows which was visible in console but it prints 36 rows..

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

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



More information about the client-libs-dev mailing list