|
@ -12,7 +12,7 @@ import javax.swing.JPanel; |
|
|
|
|
|
|
|
|
public class gui implements GuiInterface { |
|
|
public class gui implements GuiInterface { |
|
|
public static JFrame Frame; |
|
|
public static JFrame Frame; |
|
|
public static JButton StartBtn, CloseBtn, StartDarkSoulsBtn; |
|
|
|
|
|
|
|
|
public static JButton StartBtn, CloseBtn, StartDarkSoulsBtn,StartTicTacToeBtn; |
|
|
public static JPanel Panel; |
|
|
public static JPanel Panel; |
|
|
public static JLabel Label; |
|
|
public static JLabel Label; |
|
|
public static int status = 0; |
|
|
public static int status = 0; |
|
@ -40,6 +40,8 @@ public class gui implements GuiInterface { |
|
|
StartBtn.addActionListener(new StartGameGui()); |
|
|
StartBtn.addActionListener(new StartGameGui()); |
|
|
StartDarkSoulsBtn = new JButton("Starte Dark Souls 4"); |
|
|
StartDarkSoulsBtn = new JButton("Starte Dark Souls 4"); |
|
|
StartDarkSoulsBtn.addActionListener(new StartGameGui()); |
|
|
StartDarkSoulsBtn.addActionListener(new StartGameGui()); |
|
|
|
|
|
StartTicTacToeBtn = new JButton("Starte Tic Tac Toe"); |
|
|
|
|
|
StartTicTacToeBtn.addActionListener(new StartGameGui()); |
|
|
CloseBtn = new JButton("Schliessen"); |
|
|
CloseBtn = new JButton("Schliessen"); |
|
|
CloseBtn.addActionListener(new ActionHandler()); |
|
|
CloseBtn.addActionListener(new ActionHandler()); |
|
|
|
|
|
|
|
@ -54,14 +56,15 @@ public class gui implements GuiInterface { |
|
|
gbc.gridwidth = GridBagConstraints.REMAINDER; |
|
|
gbc.gridwidth = GridBagConstraints.REMAINDER; |
|
|
gbc.fill = GridBagConstraints.HORIZONTAL; |
|
|
gbc.fill = GridBagConstraints.HORIZONTAL; |
|
|
gbc.ipadx = 300; |
|
|
gbc.ipadx = 300; |
|
|
gbc.ipady = 100; |
|
|
|
|
|
gbc.insets = new Insets(20, 0, 0, 0); |
|
|
|
|
|
|
|
|
gbc.ipady = 50; |
|
|
|
|
|
gbc.insets = new Insets(10, 0, 0, 0); |
|
|
Label = new JLabel("MiniGames"); |
|
|
Label = new JLabel("MiniGames"); |
|
|
Label.setHorizontalAlignment(JLabel.CENTER); |
|
|
Label.setHorizontalAlignment(JLabel.CENTER); |
|
|
Label.setFont(new Font("Serif", Font.BOLD, 28)); |
|
|
Label.setFont(new Font("Serif", Font.BOLD, 28)); |
|
|
Panel.add(Label, gbc); |
|
|
Panel.add(Label, gbc); |
|
|
Panel.add(StartBtn, gbc); |
|
|
Panel.add(StartBtn, gbc); |
|
|
Panel.add(StartDarkSoulsBtn, gbc); |
|
|
Panel.add(StartDarkSoulsBtn, gbc); |
|
|
|
|
|
Panel.add(StartTicTacToeBtn,gbc); |
|
|
Panel.add(CloseBtn, gbc); |
|
|
Panel.add(CloseBtn, gbc); |
|
|
Frame.add(Panel); |
|
|
Frame.add(Panel); |
|
|
Frame.setVisible(true); |
|
|
Frame.setVisible(true); |
|
|