> How to print rows from JTable instance on printer. Please suggest the
> URL or resources from which i can get information.
Please check Sun's normal JDK documentation, which is always a good idea
for a start:
http://java.sun.com/j2se/1.5.0/docs/guide/jps/index.html
If that doesn't work, use Google. Which is also always a good idea.
If that doesn't work, search an archive of this group and the other java
groups. That can bring up old discussions on the subject (although,
there shouldn't be many about printing).

Signature
The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/
Java 1.5 has a method for printing JTable. See JTable.print().
Liz - 17 May 2006 19:10 GMT
Even though JDK 1.5 may have print features, it may not properly split
the pages when the size of the table exceeds the paper size. Also you
may want to add header & footer to the print page, which is not
possible there.
I would suggest to use the free QuickTable java component
(http://quicktable.org) which is an implementation on top of JTable,
which handles all the above issue. QuickTable has simplified printing
by one line methods.
For printing
quiktable.print()
For printpreview (screen shot:
http://quicktable.org/images/printpreview.jpg)
quiktable.printPreview()
To get the printable object
java.awt.print.Printable prn = quicktable.getPrintable(PrintProperties
prop)
If you want to print only few rows from the table, then you need to
first filter the rows and then call quicktable's print method.
Screenshots of other features can be found here.
http://quicktable.org/screenshots.htm