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 in java

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help
View previous topic :: View next topic  
Author Message
raam
Guest





PostPosted: Thu Apr 27, 2006 9:12 am    Post subject: Printing in java Reply with quote



hi,
I used an example program to print a page in java.The g.drawString
method is fine when i write simple text.If I try to print a JTable I
could not use this.If I try the print method of JTable it prints one
table per page.How to print more than one table per page.
Thanks for reading.
Back to top
Thomas Weidenfeller
Guest





PostPosted: Thu Apr 27, 2006 10:12 am    Post subject: Re: Printing in java Reply with quote



raam wrote:
Quote:
I used an example program to print a page in java.The g.drawString
method is fine when i write simple text.If I try to print a JTable I
could not use this.If I try the print method of JTable it prints one
table per page.How to print more than one table per page.

By scaling/translating the Graphics context appropriately before placing
the tables on the page.

/Thomas
--
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
Guest






PostPosted: Thu Apr 27, 2006 7:12 pm    Post subject: Re: Printing in java Reply with quote



It is really complex to write code for printing JTable. You need to
make sure to handle the cases when the page width & height is larger
than the page size. It is better to go with a custom javabean built
ofr this.

One grid ocntrol which I would suggest is QuickTable. This bean is
built on top of JTable, so you can replace JTable with QuickTable. You
can call the regular Jtable methods with QuickTable.

QuickTable provides printpreview and print methods. You can print
specific pages/subpages using the QuickTable. More information about
free QuickTable grid control can be found at http://quicktable.org

Liz

Thomas Weidenfeller wrote:
Quote:
raam wrote:
I used an example program to print a page in java.The g.drawString
method is fine when i write simple text.If I try to print a JTable I
could not use this.If I try the print method of JTable it prints one
table per page.How to print more than one table per page.

By scaling/translating the Graphics context appropriately before placing
the tables on the page.

/Thomas
--
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
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help 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.