public PageFormat validatePage(PageFormat page){
  PageFormat newPage=(PageFormat)page.clone();
  Paper newPaper=new Paper();
  validatePaper(newPage.getPaper(),newPaper);
  newPage.setPaper(newPaper);
  return newPage;
}

public PageFormat validatePage ( PageFormat page ) { PageFormat newPage = ( PageFormat ) page . clone ( ) ; Paper newPaper = new Paper ( ) ; validatePaper ( newPage . getPaper ( ) , newPaper ) ; newPage . setPaper ( newPaper ) ; return newPage ; }
the passed in pageformat is cloned and altered to be usable on the printerjob ' s current printer .
