• Post Reply Bookmark Topic Watch Topic
  • New Topic

Printing to paper in java

 
Patrick ODonnell
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
Is it possible to print the content of a JDialog?? the JDialog has JTextfields and Jlabels in it. And if it is possible has anyone got code or a good tutorial site to show me how.
Any help would be useful as I am not sure where to start!!
Thanks,
Patrick.
 
Philip Pross
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there, if you want you can simply send contents of the textfield and label it to a web page, and then print. If you using an application, open your broswer by default
example..
Process p = Runtime.getRuntime().exec(cmd);
or by an applet ..
getAppletThis().getAppletContext().showDocument(url, "test");
I hopes this helps .... any question, just ask
Phil
 
Patrick ODonnell
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your suggestion but I am developing an application which graphs the number of messages on a queue (JMS), I have a right click on the graph to get the message statistics which I would then like to be able to print.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!