• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Changing Printer Ink Colour

 
henri henri
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


 
Ko Wey
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic