From 75096139ac108209f83612d4cf99a0fd12ab920b Mon Sep 17 00:00:00 2001 From: zhe Date: Mon, 13 Dec 2021 09:41:27 +0100 Subject: [PATCH] Gamegui Button anpassen --- src/Tetris/GameGui.java | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/Tetris/GameGui.java b/src/Tetris/GameGui.java index 2e5059b..65fc0f0 100644 --- a/src/Tetris/GameGui.java +++ b/src/Tetris/GameGui.java @@ -11,28 +11,30 @@ public class GameGui { public GameGui(){ frame = new JFrame("Tetris"); JPanel panel = new JPanel(); - panel.setBorder(BorderFactory.createMatteBorder(400, 10, 10, 10,Color.black)); + panel.setBorder(BorderFactory.createMatteBorder(500, 10, 10, 50,Color.black)); //Label - JLabel label = new JLabel(" Ihr Name:"); - panel.add(label); + //JLabel label = new JLabel(" Ihr Name:"); + //panel.add(label); //Textfeld - JTextField tfName = new JTextField("Bitte Name eingeben"); - tfName.setForeground(Color.white); + //JTextField tfName = new JTextField("Bitte Name eingeben"); + //tfName.setForeground(Color.white); // Hintergrundfarbe wird gesetzt - tfName.setBackground(Color.GRAY); + // tfName.setBackground(Color.GRAY); // Textfeld wird unserem Panel hinzugefĆ¼gt - panel.add(tfName); + //panel.add(tfName); //Button - JButton button1 = new JButton("Start"); - button1.setPreferredSize( new Dimension(150,50)); + //JButton button1 = new JButton("Start"); + //button1.setPreferredSize( new Dimension(150,50)); JButton button2 = new JButton("Pause"); + button2.setPreferredSize( new Dimension(100,30)); JButton button3 = new JButton("Score"); + button3.setPreferredSize( new Dimension(100,30)); //Button untereinander panel.setLayout(new GridLayout(0,1)); panel.setBackground(Color.LIGHT_GRAY); - panel.add(button1); + //panel.add(button1); panel.add(button2); panel.add(button3);