<Swing Dev> [12] RFR JDK-8210807:Printing a JTable with a JScrollPane prints table without rows populated

Prasanta Sadhukhan prasanta.sadhukhan at oracle.com
Mon Nov 12 11:36:02 UTC 2018


Hi All,

Please review a fix for an issue where it is seen that a simple JTable 
doesn't print correctly if the table is contained in a JScrollPane.
This is a regression of the fixJDK-8164032: 
<https://bugs.openjdk.java.net/browse/JDK-8164032>JViewport backing 
store image is not scaled on HiDPI display
where JViewport's backing store image is scaled in the fix.
It seems this scaling of backing store image is not needed for printing 
as the original backing store image or base image was printed correctly 
before this fix.
Proposed fix is to check if the graphics object is been used for 
printing ie PeekGraphics/pathGraphics then skip this backing store image 
scaling.

Bug: https://bugs.openjdk.java.net/browse/JDK-8210807
webrev: http://cr.openjdk.java.net/~psadhukhan/8210807/webrev.0/

8164032's manual regression testcase behaves in the same way before and 
after this fix.

Regards
Prasanta
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/swing-dev/attachments/20181112/f2d49d2a/attachment-0001.html>


More information about the swing-dev mailing list