How can I print the contents of a JTable as a report? - J2SE 5

John Zukowski



This was previously answered for earlier versions of the JDK at http://www.jguru.com/faq/view.jsp?EID=46732. Now, with J2SE 5, you can just call the print() method of JTable. There is an additional version of print() that accepts a MessageFormat for a header and footer.