Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Please Help me with the Print API

 
seema kamath
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic