|
|
@ -11,24 +11,31 @@ import javax.swing.JLabel; |
|
|
|
import javax.swing.JPanel; |
|
|
|
|
|
|
|
public class gui { |
|
|
|
JFrame jf; |
|
|
|
JButton StartBtn, CloseBtn; |
|
|
|
JPanel Panel; |
|
|
|
JLabel Label; |
|
|
|
|
|
|
|
|
|
|
|
public static int width = 800, height = 600; |
|
|
|
|
|
|
|
public void create(){ |
|
|
|
public static JFrame jf; |
|
|
|
public static JButton StartBtn, CloseBtn; |
|
|
|
public static JPanel Panel; |
|
|
|
public static JLabel Label; |
|
|
|
public static int width = 800, height = 600; |
|
|
|
|
|
|
|
public void StartMainMenu() { |
|
|
|
createFrame(); |
|
|
|
createButtons(); |
|
|
|
createPanel(); |
|
|
|
} |
|
|
|
public void createFrame(){ |
|
|
|
jf = new JFrame("Wer wird Millionr"); |
|
|
|
jf.setSize(width,height); |
|
|
|
jf.setLocationRelativeTo(null); |
|
|
|
jf.setResizable(false); |
|
|
|
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); |
|
|
|
} |
|
|
|
|
|
|
|
public void createButtons() { |
|
|
|
StartBtn = new JButton("Starte Spiel"); |
|
|
|
StartBtn.setSize(300,100); |
|
|
|
CloseBtn = new JButton("Schlieen"); |
|
|
|
CloseBtn.setSize(300,100); |
|
|
|
|
|
|
|
} |
|
|
|
public void createPanel() { |
|
|
|
Panel = new JPanel(); |
|
|
|
Panel.setSize(width,height); |
|
|
|
Panel.setLayout(new GridBagLayout()); |
|
|
@ -47,8 +54,7 @@ public class gui { |
|
|
|
jf.add(Panel); |
|
|
|
jf.setVisible(true); |
|
|
|
Panel.setVisible(true); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |