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
if(pageIndex%2 == 0)
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
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL