AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Printing Rows from JTable

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java GUI Toolkits
View previous topic :: View next topic  
Author Message
Manoj Jain
Guest





PostPosted: Wed May 03, 2006 9:12 am    Post subject: Printing Rows from JTable Reply with quote



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





PostPosted: Wed May 03, 2006 9:12 am    Post subject: Re: Printing Rows from JTable Reply with quote



Manoj Jain wrote:
Quote:
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).

--
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/
Back to top
Raja
Guest





PostPosted: Tue May 09, 2006 9:07 pm    Post subject: Re: Printing Rows from JTable Reply with quote



Java 1.5 has a method for printing JTable. See JTable.print().
Back to top
Liz
Guest





PostPosted: Wed May 17, 2006 7:07 pm    Post subject: Re: Printing Rows from JTable Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java GUI Toolkits All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.