diff --git a/res/icon.ico b/res/icon.ico new file mode 100644 index 0000000..bb37ecc Binary files /dev/null and b/res/icon.ico differ diff --git a/res/icon.png b/res/icon.png new file mode 100644 index 0000000..fcd0911 Binary files /dev/null and b/res/icon.png differ diff --git a/src/Game.java b/src/Game.java index 562e2ec..2bc6853 100644 --- a/src/Game.java +++ b/src/Game.java @@ -23,6 +23,7 @@ public Game() { showView(new Menu(this)); this.setVisible(true); // To view the window this.pack(); // To size the components(button, img) optimally + this.setIconImage(Toolkit.getDefaultToolkit().getImage("res/icon.png")); // Change the icon this.setResizable(false); // To avoid resizing the window this.setLocationRelativeTo(null); // To set the window in the center