|
|
@ -10,19 +10,21 @@ import javax.swing.JFrame; |
|
|
|
import javax.swing.JLabel; |
|
|
|
import javax.swing.JPanel; |
|
|
|
|
|
|
|
public class gui { |
|
|
|
public class gui implements GuiInterface { |
|
|
|
public static JFrame Frame; |
|
|
|
public static JButton StartBtn, CloseBtn; |
|
|
|
public static JPanel Panel; |
|
|
|
public static JLabel Label; |
|
|
|
public static int width = 800, height = 600; |
|
|
|
|
|
|
|
public void StartMainMenu() { |
|
|
|
@Override |
|
|
|
public void StartMainMenu() { |
|
|
|
createFrame(); |
|
|
|
createButtons(); |
|
|
|
createPanel(); |
|
|
|
} |
|
|
|
public void createFrame(){ |
|
|
|
@Override |
|
|
|
public void createFrame(){ |
|
|
|
Frame = new JFrame("MiniGames"); |
|
|
|
Frame.setSize(width,height); |
|
|
|
Frame.setLocationRelativeTo(null); |
|
|
@ -30,6 +32,7 @@ public class gui { |
|
|
|
Frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void createButtons() { |
|
|
|
StartBtn = new JButton("Starte Spiel"); |
|
|
|
StartBtn.addActionListener(new StartGameGui()); |
|
|
@ -38,6 +41,7 @@ public class gui { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
@Override |
|
|
|
public void createPanel() { |
|
|
|
Panel = new JPanel(); |
|
|
|
Panel.setSize(width,height); |
|
|
|