public void addRecentFile(File f){
  if (null != f) {
    recentFiles.add(f);
  }
}

public void addRecentFile ( File f ) { if ( null != f ) { recentFiles . add ( f ) ; } }
this should be the method used to add a file for the recent menu .
