From 5ef8e2b438693fa3d3f4a52c2896a7f0a1405603 Mon Sep 17 00:00:00 2001 From: Yazan Alaamer Date: Fri, 20 Jan 2023 20:37:17 +0100 Subject: [PATCH] create hit points number label --- src/main/java/game/StartDarkSoulsGame.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/game/StartDarkSoulsGame.java b/src/main/java/game/StartDarkSoulsGame.java index 658af4b..640a818 100644 --- a/src/main/java/game/StartDarkSoulsGame.java +++ b/src/main/java/game/StartDarkSoulsGame.java @@ -21,6 +21,7 @@ public class StartDarkSoulsGame { JPanel playerPanel; JTextArea mainTextArea; JLabel hpLabel; + JLabel hpLabelNumber; Font titelFont = new Font("Times new Roman", Font.PLAIN, 90); Font normalFont = new Font ("Times new Roman", Font.PLAIN, 28); JButton startButton; @@ -116,6 +117,11 @@ public class StartDarkSoulsGame { hpLabel.setForeground(Color.white); playerPanel.add(hpLabel); + hpLabelNumber = new JLabel(); + hpLabelNumber.setFont(normalFont); + hpLabelNumber.setForeground(Color.white); + playerPanel.add(hpLabelNumber); + con.add(playerPanel); } public class TitelScreenHandler implements ActionListener{