From ce85efaf76aefc7d5dd197ba87e7f583491284e5 Mon Sep 17 00:00:00 2001 From: zhe Date: Mon, 13 Dec 2021 11:21:06 +0100 Subject: [PATCH] =?UTF-8?q?Men=C3=BC=20background?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- out/production/Tetris/Tetris/GameGui.class | Bin 2004 -> 2008 bytes src/Tetris/GameGui.java | 16 +++++++--------- src/Tetris/Menue.java | 10 ++++++++-- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/out/production/Tetris/Tetris/GameGui.class b/out/production/Tetris/Tetris/GameGui.class index 105af812980cab141393dc72820012de1b849591..e36b3694ec0b2f0e3a8a8e4afca0ae5c4b9b27ab 100644 GIT binary patch delta 128 zcmcb@e}jL+1V$t7q|%a-{Jem~(&AJ`22r1^#InQ+{o?Y>ymWmpC$O9~BLh@baB_Z8 z>gHXHcbVAPB3*ra{KGddV(DX2)nw>k&|;X%pv^FsL5E=}gD%5b20exy4EhX*84MUM ZFc>o2U@)2-${xpR%D};3HhBlT3;>+dCHDXT delta 103 zcmcb?e}#X;1V#?_q|%a-{5+${a~P#y9OKQ081FK1bNP6>dxXTh2RTM=UdGbLq^ix( z!Jxx1l|h$bE`uJ!QU-m7wG0LfI~WWZ4l@`rTwpL}xWQmDIg&k&)trHY!D8|rb{PPF C9vt8R diff --git a/src/Tetris/GameGui.java b/src/Tetris/GameGui.java index 3e09018..b9e9eda 100644 --- a/src/Tetris/GameGui.java +++ b/src/Tetris/GameGui.java @@ -27,18 +27,16 @@ public class GameGui { //Button //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)); + JButton buttonPause = new JButton("Pause"); + buttonPause.setPreferredSize( new Dimension(100,30)); + JButton buttonScore = new JButton("Score"); + buttonScore.setPreferredSize( new Dimension(100,30)); //Button untereinander panel.setLayout(new GridLayout(0,1)); - panel.setBackground(Color.LIGHT_GRAY); + panel.setBackground(Color.YELLOW); //panel.add(button1); - panel.add(button2); - panel.add(button3); - - + panel.add(buttonPause); + panel.add(buttonScore); frame.add(panel,BorderLayout.EAST); frame.setSize(width,height); diff --git a/src/Tetris/Menue.java b/src/Tetris/Menue.java index 326c05d..dbf10b6 100644 --- a/src/Tetris/Menue.java +++ b/src/Tetris/Menue.java @@ -3,14 +3,17 @@ package Tetris; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JOptionPane; +import java.awt.*; public class Menue { - public static void main(final String[] args) { - final JFrame parent = new JFrame(); + public Menue(){ + JFrame parent = new JFrame("Tetris MenĂ¼"); JButton button = new JButton(); button.setText("Namen Eingeben"); + button.setPreferredSize(new Dimension(550,650)); + button.setBackground(Color.CYAN); parent.add(button); parent.pack(); parent.setVisible(true); @@ -23,4 +26,7 @@ public class Menue { } }); } + public static void main(final String[] args) { + new Menue(); + } } \ No newline at end of file