• 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 ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

Printing a Dialog using PrinterJob

Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to print a Dialog using a PrinterJob. I have made my Dialog class Printable and am passsing the Dialog in the setPrintable() method. However, how do get the Dialog to render itself within the print(Graphics g, PageFormat pf, int pageIndex) method of my Dialog class?
The two examples I have found from SUN only cover printing components by rendering them explicitly onto the Graphics using a drawxxx() method?
There has to be an easy way to do this? Any help would be much appreciated.
Farmers know to never drive a tractor near a honey locust tree. But a tiny ad is okay:
the value of filler advertising in 2021
    Bookmark Topic Watch Topic
  • New Topic