src/com/mmpp/motivationapp/backend/Achiever.java
public void importAchievementsFromFile(String filename, ArrayList<Achievement> a) {
		try {
			InputStream stream = getClass().getResourceAsStream(filename);
			BufferedReader in = new BufferedReader(new InputStreamReader(stream));
			while(in.ready()) {
				String s = in.readLine();
				addAchievement(s, a);
			}
			in.close();
		} catch (Exception e) {
			JOptionPane.showMessageDialog(null, e.getStackTrace(), "Error", JOptionPane.INFORMATION_MESSAGE);
		}
	}
/**
	 * Imports achievements into the allAchievements from a file
	 * @param filename the name of the file
	 */
Imports achievements into the allAchievements from a file
@param filename the name of the file
Imports achievements into the allAchievements from a file @param filename the name of the file
public void importAchievementsFromFile(String filename, ArrayList<Achievement> a) {
		try {
			InputStream stream = getClass().getResourceAsStream(filename);
			BufferedReader in = new BufferedReader(new InputStreamReader(stream));
			while(in.ready()) {
				String s = in.readLine();
				addAchievement(s, a);
			}
			in.close();
		} catch (Exception e) {
			JOptionPane.showMessageDialog(null, e.getStackTrace(), "Error", JOptionPane.INFORMATION_MESSAGE);
		}
	}
public void importAchievementsFromFile ( String filename , ArrayList < Achievement > a ) { try { InputStream stream = getClass ( ) . getResourceAsStream ( filename ) ; BufferedReader in = new BufferedReader ( new InputStreamReader ( stream ) ) ; while ( in . ready ( ) ) { String s = in . readLine ( ) ; addAchievement ( s , a ) ; } in . close ( ) ; } catch ( Exception e ) { JOptionPane . showMessageDialog ( null , e . getStackTrace ( ) , "Error" , JOptionPane . INFORMATION_MESSAGE ) ; } }
Imports achievements into the allAchievements from a file
 @param filename the name of the file
Imports achievements into the allAchievements from a file @param filename the name of the file