From 99b380830744e455f444d05780945f2903342185 Mon Sep 17 00:00:00 2001 From: CyB3RC0nN0R Date: Fri, 26 Jun 2020 09:54:15 +0200 Subject: [PATCH] Fix Play Button --- src/main/dev/lh/ui/StartScreen.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/dev/lh/ui/StartScreen.java b/src/main/dev/lh/ui/StartScreen.java index 2b9f374..d41834b 100755 --- a/src/main/dev/lh/ui/StartScreen.java +++ b/src/main/dev/lh/ui/StartScreen.java @@ -4,7 +4,9 @@ import java.awt.EventQueue; import java.awt.Font; import java.awt.event.KeyEvent; -import javax.swing.*; +import javax.swing.JButton; +import javax.swing.JFrame; +import javax.swing.JPanel; import javax.swing.border.EmptyBorder; import dev.lh.Main; @@ -59,10 +61,9 @@ public class StartScreen extends JFrame { JButton buPlay = new JButton("Start Game"); buPlay.setBounds(158, 197, 190, 131); - buPlay.setIcon(new ImageIcon(StartScreen.class.getResource("/com/sun/javafx/webkit/prism/resources/mediaPlayDisabled.png"))); + buPlay.setText("Play"); buPlay.setMnemonic(KeyEvent.VK_ENTER); buPlay.setFont(new Font("Times New Roman", Font.PLAIN, 16)); - buPlay.addActionListener(a -> { Main.startGame(); @@ -70,6 +71,7 @@ public class StartScreen extends JFrame { dispose(); System.gc(); }); + contentPane.add(buPlay); contentPane.setLayout(null); } catch (Exception e) {