List of usage examples for javax.print.attribute.standard DialogTypeSelection COMMON
DialogTypeSelection COMMON
To view the source code for javax.print.attribute.standard DialogTypeSelection COMMON.
Click Source Link
From source file:Test.java
public Test() { this.setSize(200, 100); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.setLayout(new FlowLayout()); JColorChooser.showDialog(this, null, Color.blue); JButton printDialogButton = new JButton("Print Dialog"); printDialogButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent event) { final PrintRequestAttributeSet attributes = new HashPrintRequestAttributeSet(); attributes.add(DialogTypeSelection.COMMON); PrinterJob printJob = PrinterJob.getPrinterJob(); printJob.printDialog(attributes); }//from w ww . j a v a2 s. c o m }); this.add(printDialogButton); }