 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Manoj Jain Guest
|
Posted: Wed May 03, 2006 9:12 am Post subject: Printing Rows from JTable |
|
|
Hi,
How to print rows from JTable instance on printer. Please suggest the
URL or resources from which i can get information.
Thanks |
|
| Back to top |
|
 |
Thomas Weidenfeller Guest
|
|
| Back to top |
|
 |
Raja Guest
|
Posted: Tue May 09, 2006 9:07 pm Post subject: Re: Printing Rows from JTable |
|
|
Java 1.5 has a method for printing JTable. See JTable.print(). |
|
| Back to top |
|
 |
Liz Guest
|
Posted: Wed May 17, 2006 7:07 pm Post subject: Re: Printing Rows from JTable |
|
|
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 |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|