Example usage for java.awt.print PrinterJob pageDialog

List of usage examples for java.awt.print PrinterJob pageDialog

Introduction

In this page you can find the example usage for java.awt.print PrinterJob pageDialog.

Prototype

public PageFormat pageDialog(PrintRequestAttributeSet attributes) throws HeadlessException 

Source Link

Document

A convenience method which displays a cross-platform page setup dialog.

Usage

From source file:processing.app.Editor.java

/**
 * Handler for File → Page Setup.
 *//* w ww  .j  ava2 s.  c o  m*/
public void handlePageSetup() {
    PrinterJob printerJob = PrinterJob.getPrinterJob();
    if (pageFormat == null) {
        pageFormat = printerJob.defaultPage();
    }
    pageFormat = printerJob.pageDialog(pageFormat);
}