added Control.ioErrorMessage() method (USE THIS TO HANDLE IOExceptions)
This commit is contained in:
parent
06f4e32942
commit
b2505d283d
@ -26,7 +26,7 @@ public class ApplicationFrame implements Runnable
|
|||||||
setGameParams(dungeonSource);
|
setGameParams(dungeonSource);
|
||||||
gamepanel.drawVisuals();
|
gamepanel.drawVisuals();
|
||||||
} catch (IOException e1) {
|
} catch (IOException e1) {
|
||||||
JOptionPane.showMessageDialog(null, "Nem sikerült cicát nyitni! :(");
|
Control.ioErrorMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
jframe.add(gamepanel);
|
jframe.add(gamepanel);
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package cicaprojekt;
|
package cicaprojekt;
|
||||||
|
|
||||||
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.event.KeyAdapter;
|
import java.awt.event.KeyAdapter;
|
||||||
import java.awt.event.KeyEvent;
|
import java.awt.event.KeyEvent;
|
||||||
@ -69,4 +70,8 @@ public class Control {
|
|||||||
Game.instance.updateDisplay();
|
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?");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user