From 4dcc9f7ca099768dac8a1df4d0e73ead575bada2 Mon Sep 17 00:00:00 2001 From: CyB3RC0nN0R Date: Thu, 18 Jul 2019 11:19:58 +0200 Subject: [PATCH] Set white king as MainWindow icon --- src/dev/kske/chess/ui/MainWindow.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/dev/kske/chess/ui/MainWindow.java b/src/dev/kske/chess/ui/MainWindow.java index e697839..c33a162 100644 --- a/src/dev/kske/chess/ui/MainWindow.java +++ b/src/dev/kske/chess/ui/MainWindow.java @@ -2,6 +2,7 @@ package dev.kske.chess.ui; import java.awt.BorderLayout; import java.awt.EventQueue; +import java.awt.Toolkit; import javax.swing.JButton; import javax.swing.JFrame; @@ -54,6 +55,8 @@ public class MainWindow { mframe.setBounds(100, 100, 494, 565); mframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + mframe.setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("/pieces/king_white.png"))); + boardPane = new BoardPane(); mframe.getContentPane().add(boardPane, BorderLayout.CENTER);