|
|
@ -36,6 +36,20 @@ public class TikTakToeGame extends JFrame{ |
|
|
|
public String spieler2 = "Spieler 2 hat %d Punkte"; |
|
|
|
public int punkte1 = 0, punkte2 = 2; |
|
|
|
|
|
|
|
JPanel panelHauptFeld = new JPanel(); |
|
|
|
JButton btnNewButton1 = new JButton(""); |
|
|
|
JButton btnNewButton2 = new JButton(""); |
|
|
|
JButton btnNewButton3 = new JButton(""); |
|
|
|
JButton btnNewButton4 = new JButton(""); |
|
|
|
JButton btnNewButton5 = new JButton(""); |
|
|
|
JButton btnNewButton6 = new JButton(""); |
|
|
|
JButton btnNewButton7 = new JButton(""); |
|
|
|
JButton btnNewButton8 = new JButton(""); |
|
|
|
JButton btnNewButton9 = new JButton(""); |
|
|
|
|
|
|
|
JButton btnNewButtonReset = new JButton("Reset Game"); |
|
|
|
JButton btnNewButtonClearField = new JButton("Feld Säubern"); |
|
|
|
|
|
|
|
public static void main(String[] args) { |
|
|
|
EventQueue.invokeLater(new Runnable() { |
|
|
|
public void run() { |
|
|
@ -50,6 +64,26 @@ public class TikTakToeGame extends JFrame{ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public TikTakToeGame() {}//end |
|
|
|
public TikTakToeGame() { |
|
|
|
setTitle("TikTakToe Game"); |
|
|
|
setIconImage(Toolkit.getDefaultToolkit().getImage(GamelauncherMain.class.getResource("/de/hs_fulda/gruppenprojekt/JavaGamelauncher/media/GameLauncher.ico"))); |
|
|
|
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); |
|
|
|
setBounds(100, 100, 600, 600); |
|
|
|
|
|
|
|
contentPane = new JPanel(); |
|
|
|
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); |
|
|
|
setContentPane(contentPane); |
|
|
|
|
|
|
|
setForeground(Color.GRAY); |
|
|
|
setBackground(Color.DARK_GRAY); |
|
|
|
contentPane.setForeground(Color.GRAY); |
|
|
|
contentPane.setBackground(Color.DARK_GRAY); |
|
|
|
contentPane.setLayout(null); |
|
|
|
|
|
|
|
panelHauptFeld.setBackground(Color.GRAY); |
|
|
|
panelHauptFeld.setBounds(10, 11, 400, 400); |
|
|
|
contentPane.add(panelHauptFeld); |
|
|
|
panelHauptFeld.setLayout(null); |
|
|
|
}//end |
|
|
|
|
|
|
|
} |