Hi All,

Bug: https://bugs.openjdk.java.net/browse/JDK-8170349

webrev: http://cr.openjdk.java.net/~psadhukhan/8170349/webrev.00/

Please review a fix for a continuation/regression of JDK-8081491 <https://bugs.openjdk.java.net/browse/JDK-8081491> in which we made sure that we print only the JTable rows/columns that is visible on console.

This bug manifests itself as, despite marking JTable PrintMode to FIT_WIDTH, we are printing only those columns that are visible on console.

However, if JTable PrintMode is FIT_WIDTH, then as per spec
https://docs.oracle.com/javase/8/docs/api/javax/swing/JTable.PrintMode.html#FIT_WIDTH
we should print all columns on each page (apparently irrespective of what is visible)

The fix takes care of that by making sure the table bounds is adjusted to clipwidth [which is already adjusted to total column width here <http://hg.openjdk.java.net/jdk9/client/jdk/file/f7148ccb86bb/src/java.desktop/share/classes/javax/swing/TablePrintable.java#l504>] so that all columns are printed and also rectangle border is drawn encompassing all columns.

The 8081491 testcases passed with this fix as well.

Regards
Prasanta

Reply via email to