added Control.ioErrorMessage() method (USE THIS TO HANDLE IOExceptions)

This commit is contained in:
Kjistóf 2016-05-13 18:20:28 +02:00
parent 06f4e32942
commit b2505d283d
2 changed files with 6 additions and 1 deletions

View File

@ -26,7 +26,7 @@ public class ApplicationFrame implements Runnable
setGameParams(dungeonSource);
gamepanel.drawVisuals();
} catch (IOException e1) {
JOptionPane.showMessageDialog(null, "Nem sikerült cicát nyitni! :(");
Control.ioErrorMessage();
}
jframe.add(gamepanel);

View File

@ -1,5 +1,6 @@
package cicaprojekt;
import javax.swing.*;
import java.awt.*;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
@ -69,4 +70,8 @@ public class Control {
Game.instance.updateDisplay();
}
}
public static void ioErrorMessage(){
JOptionPane.showMessageDialog(null, "Nem sikerült betölteni a dzidzás képeket :( ! Biztos a helyükön vannak?");
}
}