Posted Wednesday, September 1, 2004 @ 22:56:06
This is a java limitation. If the component is not visible, you cannot print it.
There are some workaround
1) create the temporary frame outside screen coordiantes, so users cannot see this
JFrame frame = new JFrame();
frame.setBounds(-200, 0, 200, 200);
frame.getContentPane().add(newTable);
frame.setVisible(true);
2) try calling newTable.addNotify() (without adding to frame) & then call print. If this doesn't work then add newTable to frame , but without calling show() or setVisible(true); call newTable.addNotify() & then call print.
If this works, please share with us which solution worked.