• 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

PrinterJob doesn't remember the Printer

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I am trying to print using PrinterJob from my GUI.
I noticed that when I select a printer from a printer list in the Dialog, that printer is not 'remembered' next time I try to print.
So, how can I make it so that I can have the PrinterJob remember the printer I chose initally?
I noticed that PageFormat doesn't carry that value. So what field does carry the value for which printer it is?
One other solution I tried was to define the PrinterJob at the beginning of the GUI hoping that it would exist throughout and retain it's fields' values. But it doesn't.

printJob = PrinterJob.getPrinterJob();
printJob.setPrintable(GUI.this, pageFormat);

I would appreciate any help or comments.
Ivan
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic