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