This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Please Help me with the Print API Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "Please Help me with the Print API" Watch "Please Help me with the Print API" New topic
Author

Please Help me with the Print API

seema kamath
Greenhorn

Joined: Nov 27, 2000
Posts: 14
Hello everybody,
I'am new to swings and the print API.I would like to know whether there is a way by which i can see a print preview of the stuff i wanna print.Kindly help me.
Thanks in advance
Seema Kamath
santosh desai
Greenhorn

Joined: May 13, 2001
Posts: 8
hi seema,
The printing classes of the Java platform do not supply a std "print preview" dialog.But it is easy to design ur own.
To construct a "PrintPreviewDialog",u supply either a "Printable" or a "Book",together with a "PageFormat" object.
Have a nice Day!!!
santosh
seema kamath
Greenhorn

Joined: Nov 27, 2000
Posts: 14
Hi Santosh,
Thanks for the reply.Iam sure i will have a nice day trying to design my own print preview.Thanks once again
Seema
Originally posted by santosh desai:
hi seema,
The printing classes of the Java platform do not supply a std "print preview" dialog.But it is easy to design ur own.
To construct a "PrintPreviewDialog",u supply either a "Printable" or a "Book",together with a "PageFormat" object.
Have a nice Day!!!
santosh

santosh desai
Greenhorn

Joined: May 13, 2001
Posts: 8
hi seema,
I am facing a major problem now...i am sure u can solve this for me..I have developed a swing applet to be viewed on a browser..i want to print the content of JTextArea...as of now i am getting the printDialogbox but the contents are not printing.
I am not using using the print button provided by the browser but have implemented my own like what u have done...
Please reply me ASAP regarding this...
thanx
santosh
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Please Help me with the Print API
 
Similar Threads
Printing in Java
Printing multiple pages (Urgent)!
Printing from JTextArea
Problem in the print option of JavaHelp