Menü background
This commit is contained in:
parent
89a3585544
commit
ce85efaf76
Binary file not shown.
@ -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);
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user