@Override public boolean printDialog() throws HeadlessException {
  if (GraphicsEnvironment.isHeadless()) {
    throw new HeadlessException();
  }
  if (attributes == null) {
    attributes=new HashPrintRequestAttributeSet();
  }
  if (!(getPrintService() instanceof Win32PrintService)) {
    return super.printDialog(attributes);
  }
  if (noDefaultPrinter == true) {
    return false;
  }
 else {
    return displayNativeDialog();
  }
}

@ Override public boolean printDialog ( ) throws HeadlessException { if ( GraphicsEnvironment . isHeadless ( ) ) { throw new HeadlessException ( ) ; } if ( attributes == null ) { attributes = new HashPrintRequestAttributeSet ( ) ; } if ( ! ( getPrintService ( ) instanceof Win32PrintService ) ) { return super . printDialog ( attributes ) ; } if ( noDefaultPrinter == true ) { return false ; } else { return displayNativeDialog ( ) ; } }
presents the user a dialog for changing properties of the print job interactively .
