• Post Reply Bookmark Topic Watch Topic
  • New Topic

directing output to printer

 
shilpa reddy
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
I have already posted this question on another forum but haven't got any answer.
1) How do I direct a file to a printer device.
2) I have used the following code to print a frame-
Properties props = new Properties();
PrintJob pj = Toolkit.getDefaultToolkit().getPrintJob(this,"Print Job", props);
this refers to the frame required to be printed.
I get the print dialog box but nothing gets printed.
Thanks in advance,
Shilpa.
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What you have is a object with which, you can now format pages and send to the printer. Sun has a white paper called SDK 1.2 Printing API: A Tutorial which should help you out.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!