• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

background printing

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI,
did anybody know how to initiate print in background using Java Printing API.
I would like to print JPanel without showing in the Jframe
My requirement is I need to write some text to Jpanel and Print the JPanel without showing to user.
or is there any alternative ? I mean if you have some text with you if you want to print it without
showing what is the best way to do it?.
I am using Swing as my UI.
Any Ideas greatly appreciated
Thanks
Murphy
 
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If your requirement is not to display the print dialog, use the following code
......
......
JobAttributes jobAttributes = new JobAttributes();
jobAttributes.setDialog(JobAttributes.NONE);
......
......
frame.getToolkit().getPrintJob(frame, jobtitle, jobAttributes, pageAttributes);
......
......
 
reply
    Bookmark Topic Watch Topic
  • New Topic