|
|
@ -1,22 +1,25 @@ |
|
|
|
package Gui; |
|
|
|
|
|
|
|
import java.awt.Font; |
|
|
|
import java.awt.GridBagLayout; |
|
|
|
|
|
|
|
import javax.swing.JButton; |
|
|
|
import javax.swing.JFrame; |
|
|
|
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(){ |
|
|
|
jf = new JFrame("Wer wird Millionr"); |
|
|
|
jf.setSize(width,height); |
|
|
|
jf.setVisible(true); |
|
|
|
jf.setLocationRelativeTo(null); |
|
|
|
jf.setResizable(false); |
|
|
|
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); |
|
|
@ -27,11 +30,17 @@ public class gui { |
|
|
|
Panel = new JPanel(); |
|
|
|
Panel.setSize(width,height); |
|
|
|
Panel.setLayout(new GridBagLayout()); |
|
|
|
Label = new JLabel("MiniGames"); |
|
|
|
Label.setHorizontalAlignment(JLabel.CENTER); |
|
|
|
Label.setFont(new Font("Serif", Font.BOLD, 28)); |
|
|
|
Panel.add(StartBtn); |
|
|
|
Panel.add(CloseBtn); |
|
|
|
Panel.add(Label); |
|
|
|
jf.add(Panel); |
|
|
|
jf.setVisible(true); |
|
|
|
Panel.setVisible(true); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |