I'm looking for the best approach to print some information from a database with a heading and some tabular information. I've been trying to print from and HTML formated page, a JFrame and PDF. I can format all these methods properly but printing them to paper via a physical printer has been a major problem. I've really found no way to do it with HTML/PDF. Yes, I've tried iText, which makes the pdf file.
This problem has been the last thing stopping me from finishing my project. Can someone help me with a better printing strategy? Basically I've written a program that keeps track of a teachers schedule, class info and how many minutes etc. to mimic a paper form we currently use (and that I'd like to replace). The data is stored in a little Derby DB and is displayed in a JTable. I'd like to print it to paper, and nothing is clipped or cutoff (the problem I had with printing from the JFrame).
What happens if you print from the JTable and not the JFrame? JTable has a print() method for quick and dirty printing, and if this isn't enough, you can extract a Printable object form the JTable through its getPrintable(...) method. have a look at its API for details.