Set white king as MainWindow icon

This commit is contained in:
Kai S. K. Engelbart 2019-07-18 11:19:58 +02:00
parent f7812a5f81
commit 3c03f01962

View File

@ -2,6 +2,7 @@ package dev.kske.chess.ui;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.EventQueue; import java.awt.EventQueue;
import java.awt.Toolkit;
import javax.swing.JButton; import javax.swing.JButton;
import javax.swing.JFrame; import javax.swing.JFrame;
@ -54,6 +55,8 @@ public class MainWindow {
mframe.setBounds(100, 100, 494, 565); mframe.setBounds(100, 100, 494, 565);
mframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); mframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
mframe.setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("/pieces/king_white.png")));
boardPane = new BoardPane(); boardPane = new BoardPane();
mframe.getContentPane().add(boardPane, BorderLayout.CENTER); mframe.getContentPane().add(boardPane, BorderLayout.CENTER);