Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ICM.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent ev) {
- String filecontents = "";
- FileReader fr = null;
- try {
- fr = new FileReader(("resources/" + "WorkingSaveFile.txt"));
- } catch (FileNotFoundException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- int i;
- if (fr != null) {
- try {
- while ((i = fr.read()) != -1) {
- filecontents = filecontents + (char) i;
- }
- } catch (IOException | NullPointerException n) {
- n.printStackTrace();
- }
- try {
- fr.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- map = Loader.load(filecontents);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement