public void actionPerformed(ActionEvent e){
  File nextPage=null;
  for (Iterator iter=testFiles.iterator(); iter.hasNext(); ) {
    File f=(File)iter.next();
    if (f.equals(currentDisplayed)) {
      if (iter.hasNext()) {
        nextPage=(File)iter.next();
        break;
      }
    }
  }
  if (nextPage == null) {
    Iterator iter=testFiles.iterator();
    nextPage=(File)iter.next();
  }
  try {
    switchPage(nextPage,false);
  }
 catch (  Exception ex) {
    ex.printStackTrace();
  }
}

public void actionPerformed ( ActionEvent e ) { File nextPage = null ; for ( Iterator iter = testFiles . iterator ( ) ; iter . hasNext ( ) ; ) { File f = ( File ) iter . next ( ) ; if ( f . equals ( currentDisplayed ) ) { if ( iter . hasNext ( ) ) { nextPage = ( File ) iter . next ( ) ; break ; } } } if ( nextPage == null ) { Iterator iter = testFiles . iterator ( ) ; nextPage = ( File ) iter . next ( ) ; } try { switchPage ( nextPage , false ) ; } catch ( Exception ex ) { ex . printStackTrace ( ) ; } }
invoked when an action occurs .
