Something in the fix to 4352983 has completely broken JTable printing. When printing a JTable, only the table grid is printed. This is not a bug in the new JTable printing code and happens regardless of which route you print a JTable.
To see the problem, compile the attached files and run Printing.java. Hit the "Print" button to print the table. The output will only have a grid and no cell data.
JTable does its cell printing through a CellRendererPane. My investigation began with CellRendererPane, and noticing that it calls g.create(int, int, int, int), I looked at the changes to the graphics "create" methods for 4352983. This led to sun.print.ProxyGraphics2D. The method "create(int, int, int, int)" was overridden as part of the fix to 4352983. The implementation follows:
public Graphics create(int x, int y, int width, int height) {
return new ProxyGraphics2D((Graphics2D) mGraphics.create(x, y, width, height), mPrinterJob);
}
If these three lines are removed from ProxyGraphics2D.java, the problem goes away.
Fixing this bug is extremely important - without it, JTable printing is useless.