From b06a0294c53746c3312c767aea9405e6fc77608a Mon Sep 17 00:00:00 2001 From: fdai7551 Date: Wed, 25 Jan 2023 10:53:09 +0100 Subject: [PATCH] =?UTF-8?q?[SnakeGame=20Class]:=20hinzuf=C3=BCgen=20der=20?= =?UTF-8?q?Panel=203&4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../JavaGamelauncher/SnakeGame.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/JavaGamelauncher/src/main/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/SnakeGame.java b/JavaGamelauncher/src/main/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/SnakeGame.java index 879407b..5989a70 100644 --- a/JavaGamelauncher/src/main/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/SnakeGame.java +++ b/JavaGamelauncher/src/main/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/SnakeGame.java @@ -38,6 +38,8 @@ public class SnakeGame extends JFrame { private JPanel cP; public JPanel panel1; public JPanel panel2; + public JPanel panel3; + public JPanel panel4; public int breite = 1200; public int hoehe = 600; @@ -79,6 +81,20 @@ public class SnakeGame extends JFrame { panel2.setBackground(Color.BLACK); cP.add(panel2); + + panel3 = new JPanel(); + panel3.setBounds(500, 0, 100, 100); + panel3.setVisible(true); + panel3.setBackground(Color.BLACK); + + cP.add(panel3); + + panel4 = new JPanel(); + panel4.setBounds(600, 0, 100, 100); + panel4.setVisible(true); + panel4.setBackground(Color.BLACK); + + cP.add(panel4); } }