public boolean pageSetupDialog(PrinterJob job){
  PrintRequestAttributeSet prats=getPrintRequestAttributeSet();
  PageFormat pf=job.pageDialog(prats);
  setPrintRequestAttributeSet(prats);
  return true;
}

public boolean pageSetupDialog ( PrinterJob job ) { PrintRequestAttributeSet prats = getPrintRequestAttributeSet ( ) ; PageFormat pf = job . pageDialog ( prats ) ; setPrintRequestAttributeSet ( prats ) ; return true ; }
show dialog and set paper
