PrinterJob
class is the
root of the java.awt.print
package. To
print your component, you must create a PrinterJob
object.
The PrinterJob
class has a static method
called getPrinterJob()
. getPrinterJob()
to
create a printer job. setPrintable(Printable painter)
method
to specify the Printable
object you have
implemented. Print
dialog
box by calling the printDialog()
method. Page
Setup
dialog box by calling the pageDialog()
method. print()
method of the printer job.
PrinterJob
class
for more information.