From 11f315aeec85c861e59014a1e78ada78df38c2b6 Mon Sep 17 00:00:00 2001 From: Yazan Alaamer Date: Thu, 19 Jan 2023 16:27:15 +0100 Subject: [PATCH] create game screen methode and add main text panel --- src/main/java/game/StartDarkSoulsGame.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/game/StartDarkSoulsGame.java b/src/main/java/game/StartDarkSoulsGame.java index 2a5c846..687e53a 100644 --- a/src/main/java/game/StartDarkSoulsGame.java +++ b/src/main/java/game/StartDarkSoulsGame.java @@ -16,6 +16,7 @@ public class StartDarkSoulsGame { JPanel titleNamePanel; JLabel titelNameLabel; JPanel StartButtonPanel; + JPanel mainTextPanel; // comit (7) create maintextpanel Font titelFont = new Font("Times new Roma", Font.PLAIN, 90); JButton startButton; // commit (5) create start button Container con; @@ -45,7 +46,13 @@ public class StartDarkSoulsGame { StartButtonPanel.add(startButton); con.add(titleNamePanel); - con.add(StartButtonPanel); // commit 4 create start button panel + con.add(StartButtonPanel); } + public void createGameScreen() { + mainTextPanel = new JPanel(); + mainTextPanel.setBounds(100, 100, 600,250); + mainTextPanel.setBackground(Color.red); + con.add(mainTextPanel); + } }