JFrame Image Icon 1.0

This commit is contained in:
ekresse
2021-01-11 15:30:59 +01:00
parent 955fe052f8
commit 9d3d5a403c
3 changed files with 9 additions and 0 deletions

View File

@@ -16,8 +16,13 @@ import de.jaujau.spiellogik.Spiel;
import java.awt.event.MouseAdapter; import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import javax.swing.BoxLayout; import javax.swing.BoxLayout;
import java.awt.Font; import java.awt.Font;
import java.awt.Toolkit;
@@ -38,6 +43,7 @@ public class GUI extends JFrame{
// Constructors // Constructors
// //
public GUI (Texturenpakete texturenpakete, Spielerverwaltung speicherung) { public GUI (Texturenpakete texturenpakete, Spielerverwaltung speicherung) {
setIconImage(Toolkit.getDefaultToolkit().getImage(GUI.class.getResource("/img/jaujau.png")));
setMinimumSize(new Dimension(1000, 600)); setMinimumSize(new Dimension(1000, 600));
// jaujau.getAktuellesSpiel(); // jaujau.getAktuellesSpiel();
@@ -47,6 +53,7 @@ public class GUI extends JFrame{
setSize(1565, 916); setSize(1565, 916);
getContentPane().setLayout(new BorderLayout(0, 0)); getContentPane().setLayout(new BorderLayout(0, 0));
JPanel Menue = new JPanel(); JPanel Menue = new JPanel();
Menue.setPreferredSize(new Dimension(270, 450)); Menue.setPreferredSize(new Dimension(270, 450));
getContentPane().add(Menue, BorderLayout.WEST); getContentPane().add(Menue, BorderLayout.WEST);

View File

@@ -7,6 +7,8 @@
*/ */
package de.jaujau.spiellogik; package de.jaujau.spiellogik;
import javax.swing.ImageIcon;
import de.jaujau.daten.Spielerverwaltung; import de.jaujau.daten.Spielerverwaltung;
import de.jaujau.daten.Texturenpakete; import de.jaujau.daten.Texturenpakete;
import de.jaujau.gui.GUI; import de.jaujau.gui.GUI;

BIN
src/img/jaujau.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB