|
|
@ -1,11 +1,15 @@ |
|
|
|
package Gui; |
|
|
|
|
|
|
|
import java.awt.GridBagLayout; |
|
|
|
|
|
|
|
import javax.swing.JButton; |
|
|
|
import javax.swing.JFrame; |
|
|
|
import javax.swing.JPanel; |
|
|
|
|
|
|
|
public class gui { |
|
|
|
JFrame jf; |
|
|
|
JButton StartBtn, CloseBtn; |
|
|
|
JPanel Panel; |
|
|
|
|
|
|
|
public static int width = 800, height = 600; |
|
|
|
|
|
|
@ -18,10 +22,16 @@ public class gui { |
|
|
|
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); |
|
|
|
StartBtn = new JButton("Starte Spiel"); |
|
|
|
StartBtn.setSize(300,100); |
|
|
|
jf.add(StartBtn); |
|
|
|
CloseBtn = new JButton("Schlieen"); |
|
|
|
CloseBtn.setSize(300,100); |
|
|
|
jf.add(CloseBtn); |
|
|
|
Panel = new JPanel(); |
|
|
|
Panel.setSize(width,height); |
|
|
|
Panel.setLayout(new GridBagLayout()); |
|
|
|
Panel.add(StartBtn); |
|
|
|
Panel.add(CloseBtn); |
|
|
|
jf.add(Panel); |
|
|
|
Panel.setVisible(true); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |