Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / December 2003

Tip: Looking for answers? Try searching our database.

multypage printing of JComponent ?

Thread view: 
Dado - 30 Dec 2003 18:44 GMT
I know how to print JComponents (JTree, JTable) but on one page and the rest
of component is just cut off. How can I devide some component on four pages,
for example?
Steve W. Jackson - 30 Dec 2003 18:57 GMT
>:I know how to print JComponents (JTree, JTable) but on one page and the rest
>:of component is just cut off. How can I devide some component on four pages,
>:for example?

Since you already know how to print, then you know about the imageable
area of the (virtual) paper you're printing to.  If you want to stick to
one page, you do some math and scale your printing to the right size.  
If you want to print multiple pages, you've got two problems to solve:  
first, you have to figure out the page counts and so forth beforehand,
since the printing APIs are going to request a page number; next, for
each page that could get printed, you'll have to do the math to get the
appropriate area of the component being printed and provide the
necessary code to respond to the print() call when it's received.

= Steve =
Signature

Steve W. Jackson
Montgomery, Alabama



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.