From 42749bdf4a3a5b4a3a82d35a112d47ce93a1d65b Mon Sep 17 00:00:00 2001 From: Yazan Alaamer Date: Fri, 20 Jan 2023 20:33:37 +0100 Subject: [PATCH] create hit points label --- src/main/java/game/StartDarkSoulsGame.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/game/StartDarkSoulsGame.java b/src/main/java/game/StartDarkSoulsGame.java index d2630c4..658af4b 100644 --- a/src/main/java/game/StartDarkSoulsGame.java +++ b/src/main/java/game/StartDarkSoulsGame.java @@ -20,6 +20,7 @@ public class StartDarkSoulsGame { JPanel choiceButtonPanel; JPanel playerPanel; JTextArea mainTextArea; + JLabel hpLabel; Font titelFont = new Font("Times new Roman", Font.PLAIN, 90); Font normalFont = new Font ("Times new Roman", Font.PLAIN, 28); JButton startButton; @@ -109,6 +110,12 @@ public class StartDarkSoulsGame { playerPanel.setBounds(100,15,600,50); playerPanel.setBackground(Color.red); playerPanel.setLayout(new GridLayout(1,4)); + + hpLabel = new JLabel("HP:"); + hpLabel.setFont(normalFont); + hpLabel.setForeground(Color.white); + playerPanel.add(hpLabel); + con.add(playerPanel); } public class TitelScreenHandler implements ActionListener{