protected void displayPage(){
  if (pagenum > pageImages.size()) {
    pagenum=pageImages.size();
  }
  if (pagenum < 1) {
    pagenum=1;
  }
  previousButton.setEnabled(true);
  nextButton.setEnabled(true);
  if (pagenum == pageImages.size()) {
    nextButton.setEnabled(false);
  }
  if (pagenum == 1) {
    previousButton.setEnabled(false);
  }
  previewImage=pageImages.elementAt(pagenum - 1);
  previewFrame.setVisible(false);
  previewIcon.setImage(previewImage);
  previewLabel.setIcon(previewIcon);
  previewPanel.add(previewLabel);
  pageCount.setText("" + pagenum);
  totalPages.setText("" + pageImages.size() + "     ");
  previewFrame.invalidate();
  previewFrame.revalidate();
  previewFrame.setVisible(true);
}

protected void displayPage ( ) { if ( pagenum > pageImages . size ( ) ) { pagenum = pageImages . size ( ) ; } if ( pagenum < 1 ) { pagenum = 1 ; } previousButton . setEnabled ( true ) ; nextButton . setEnabled ( true ) ; if ( pagenum == pageImages . size ( ) ) { nextButton . setEnabled ( false ) ; } if ( pagenum == 1 ) { previousButton . setEnabled ( false ) ; } previewImage = pageImages . elementAt ( pagenum - 1 ) ; previewFrame . setVisible ( false ) ; previewIcon . setImage ( previewImage ) ; previewLabel . setIcon ( previewIcon ) ; previewPanel . add ( previewLabel ) ; pageCount . setText ( "" + pagenum ) ; totalPages . setText ( "" + pageImages . size ( ) + "     " ) ; previewFrame . invalidate ( ) ; previewFrame . revalidate ( ) ; previewFrame . setVisible ( true ) ; }
method to display a page image in the preview pane not in original class but added later by dennis miller
