Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
Sheriffs:
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • fred rosenberger
  • Frits Walraven

Changing Printer Ink Colour

 
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Below is my standard print module. It prints the film titles seen in red located within a JTextArea. The print comes out as the same colour red I have specified in my JTextArea. In order to save on coloured ink, I would like to have it print out in black. I experimented with the print class, but failed to find out where to insert code that would give me a black ink printout.

http://pollscanada.com/screenshot.html


 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Very nice screenshot!! Deserves a bottle of red ink!

Can you select "PRINT IN B&W option " in your printJob.printDialog()-dialog?

or

Did you try:
componentToBePrinted.getGraphics().setColor(Color.black);
componentToBePrinted.paint(g2);
Probably will not succeed?

Just curious....
 
henri henri
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok ko let me try that
 
Every plan is a little cooler if you have a blimp. And a tiny ad.
Try Free Java/.NET Libraries for Word Excel PowerPoint and PDF
htttp://www.e-iceblue.com/free-apis.html
    Bookmark Topic Watch Topic
  • New Topic