diff --git a/out/production/Tetris/Tetris/Board.class b/out/production/Tetris/Tetris/Board.class index 5586889..a275faa 100644 Binary files a/out/production/Tetris/Tetris/Board.class and b/out/production/Tetris/Tetris/Board.class differ diff --git a/out/production/Tetris/Tetris/GameGui.class b/out/production/Tetris/Tetris/GameGui.class index cab6a8b..33443e0 100644 Binary files a/out/production/Tetris/Tetris/GameGui.class and b/out/production/Tetris/Tetris/GameGui.class differ diff --git a/src/Tetris/Board.java b/src/Tetris/Board.java index 2315392..cfcc695 100644 --- a/src/Tetris/Board.java +++ b/src/Tetris/Board.java @@ -36,7 +36,7 @@ public class Board extends JPanel protected void paintComponent(Graphics g) { super.paintComponent(g); g.fillRect(0, 0, getWidth(), getHeight()); - g.setColor(Color.DARK_GRAY); + g.setColor(Color.lightGray); //shape mit 2-Forschleife for(int row=0;row< shape.length;row++){ diff --git a/src/Tetris/GameGui.java b/src/Tetris/GameGui.java index 565cee3..b33b061 100644 --- a/src/Tetris/GameGui.java +++ b/src/Tetris/GameGui.java @@ -10,19 +10,26 @@ public class GameGui { public GameGui(){ JPanel panel = new JPanel(); - panel.setBorder(BorderFactory.createMatteBorder(450, 10, 20, 10,Color.black)); + panel.setBorder(BorderFactory.createMatteBorder(400, 10, 20, 10,Color.black)); + //Label + JLabel label = new JLabel(" Ihr Name:"); + panel.add(label); + //Textfeld + JTextField tfName = new JTextField("Bitte Name eingeben"); + tfName.setForeground(Color.white); + // Hintergrundfarbe wird gesetzt + tfName.setBackground(Color.GRAY); + // Textfeld wird unserem Panel hinzugefĆ¼gt + panel.add(tfName); - JLabel label = new JLabel("Name: ",JLabel.LEFT); - label.setBounds(100,100,50,30); + //Button JButton button1 = new JButton("Start"); - button1.setPreferredSize( new Dimension(150,150)); JButton button2 = new JButton("Pause"); JButton button3 = new JButton("Score"); panel.setLayout(new GridLayout(0,1)); - panel.setBackground(Color.gray); - panel.add(label); + panel.setBackground(Color.LIGHT_GRAY); panel.add(button1); panel.add(button2); panel.add(button3);