Menü background
This commit is contained in:
parent
89a3585544
commit
ce85efaf76
Binary file not shown.
@ -27,18 +27,16 @@ public class GameGui {
|
|||||||
//Button
|
//Button
|
||||||
//JButton button1 = new JButton("Start");
|
//JButton button1 = new JButton("Start");
|
||||||
//button1.setPreferredSize( new Dimension(150,50));
|
//button1.setPreferredSize( new Dimension(150,50));
|
||||||
JButton button2 = new JButton("Pause");
|
JButton buttonPause = new JButton("Pause");
|
||||||
button2.setPreferredSize( new Dimension(100,30));
|
buttonPause.setPreferredSize( new Dimension(100,30));
|
||||||
JButton button3 = new JButton("Score");
|
JButton buttonScore = new JButton("Score");
|
||||||
button3.setPreferredSize( new Dimension(100,30));
|
buttonScore.setPreferredSize( new Dimension(100,30));
|
||||||
//Button untereinander
|
//Button untereinander
|
||||||
panel.setLayout(new GridLayout(0,1));
|
panel.setLayout(new GridLayout(0,1));
|
||||||
panel.setBackground(Color.LIGHT_GRAY);
|
panel.setBackground(Color.YELLOW);
|
||||||
//panel.add(button1);
|
//panel.add(button1);
|
||||||
panel.add(button2);
|
panel.add(buttonPause);
|
||||||
panel.add(button3);
|
panel.add(buttonScore);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
frame.add(panel,BorderLayout.EAST);
|
frame.add(panel,BorderLayout.EAST);
|
||||||
frame.setSize(width,height);
|
frame.setSize(width,height);
|
||||||
|
@ -3,14 +3,17 @@ package Tetris;
|
|||||||
import javax.swing.JButton;
|
import javax.swing.JButton;
|
||||||
import javax.swing.JFrame;
|
import javax.swing.JFrame;
|
||||||
import javax.swing.JOptionPane;
|
import javax.swing.JOptionPane;
|
||||||
|
import java.awt.*;
|
||||||
|
|
||||||
public class Menue {
|
public class Menue {
|
||||||
|
|
||||||
public static void main(final String[] args) {
|
public Menue(){
|
||||||
final JFrame parent = new JFrame();
|
JFrame parent = new JFrame("Tetris Menü");
|
||||||
JButton button = new JButton();
|
JButton button = new JButton();
|
||||||
|
|
||||||
button.setText("Namen Eingeben");
|
button.setText("Namen Eingeben");
|
||||||
|
button.setPreferredSize(new Dimension(550,650));
|
||||||
|
button.setBackground(Color.CYAN);
|
||||||
parent.add(button);
|
parent.add(button);
|
||||||
parent.pack();
|
parent.pack();
|
||||||
parent.setVisible(true);
|
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