From c2700c157450f167a04c3a09f1c946aa00c75443 Mon Sep 17 00:00:00 2001 From: ole Date: Mon, 23 Dec 2024 23:23:23 +0100 Subject: [PATCH] fix images --- src/JoinGame.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/JoinGame.java b/src/JoinGame.java index 98e2b8c..57541b3 100644 --- a/src/JoinGame.java +++ b/src/JoinGame.java @@ -4,6 +4,7 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.IOException; import java.net.InetSocketAddress; +import java.util.Objects; /** * Das JoinGame Panel dient zum setzten des Ports/IP-Adresse. @@ -16,7 +17,7 @@ public class JoinGame extends JPanel { String standardPort = "51525"; // Grafiken - ImageIcon backButtonIcon = new ImageIcon("graphics/backButton.png"); + ImageIcon backButtonIcon = new ImageIcon(Objects.requireNonNull(getClass().getClassLoader().getResource("graphics/backButton.png"))); // Labels JLabel spielBeitretenLabel;