Printing

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Jun 2004
Posts: 609
Reputation: freesoft_2000 is an unknown quantity at this point 
Solved Threads: 8
freesoft_2000 freesoft_2000 is offline Offline
Practically a Master Poster

Printing

 
0
  #1
Nov 27th, 2004
Hi everyone,

I am currently trying to print even or odd pages only.
I have a frame which contains a jtextpane with some text in it that spans about ten pages and it also contains two buttons. One button if clicked prints out only even pages and the other button when clicked only prints odd pages. The thing is the program does not seem to work. I am using the printable interfce by the way.

I tried testing the pageIndex variable of the overided print function of the printable interface
as follows:

if(pageIndex%2 == 0)
{
print even
}

else
{
print even
}

The thing is that only the first page is being printed no matter how many pages i have whether i am printing even or odd pages only.

Can someone show me the correct way of printing even or odd pages using the printable interface the right way.

If it is of no inconvinience i hope someone can show a simple example of printing even or odd pages using the printable interface

Any help is greatly appreciated

Thank You

Your Sincerely

Richard West
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Java Forum


Views: 2222 | Replies: 0
Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC