Menue Start
This commit is contained in:
parent
75096139ac
commit
921b25d601
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -38,6 +38,8 @@ public class GameGui {
|
||||
panel.add(button2);
|
||||
panel.add(button3);
|
||||
|
||||
|
||||
|
||||
frame.add(panel,BorderLayout.EAST);
|
||||
frame.setSize(width,height);
|
||||
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
|
26
src/Tetris/Menue.java
Normal file
26
src/Tetris/Menue.java
Normal file
@ -0,0 +1,26 @@
|
||||
package Tetris;
|
||||
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JOptionPane;
|
||||
|
||||
public class Menue {
|
||||
|
||||
public static void main(final String[] args) {
|
||||
final JFrame parent = new JFrame();
|
||||
JButton button = new JButton();
|
||||
|
||||
button.setText("Namen Eingeben");
|
||||
parent.add(button);
|
||||
parent.pack();
|
||||
parent.setVisible(true);
|
||||
|
||||
button.addActionListener(new java.awt.event.ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
String name = JOptionPane.showInputDialog(parent,
|
||||
"What is your name?", null);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user