diff --git a/src/main/java/src/Main.java b/src/main/java/src/Main.java index e40a241..6d896a3 100644 --- a/src/main/java/src/Main.java +++ b/src/main/java/src/Main.java @@ -16,6 +16,9 @@ public class Main { TasksFrame tasksFrame = new TasksFrame(); tasksFrame.run(); + TicTacToeGame toeGame = new TicTacToeGame(); + + } }); } diff --git a/src/main/java/src/TicTacToeGame.java b/src/main/java/src/TicTacToeGame.java new file mode 100644 index 0000000..41afa15 --- /dev/null +++ b/src/main/java/src/TicTacToeGame.java @@ -0,0 +1,45 @@ +package src; +import java.awt.*; +import java.awt.event.*; +import java.util.*; +import javax.swing.*; + +public class TicTacToeGame implements ActionListener { + JFrame frame = new JFrame(); + JPanel t_panel = new JPanel(); + JPanel bt_panel = new JPanel(); + JLabel textfield = new JLabel(); + + + // Creating class constructor + + TicTacToeGame() + { + frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + frame.setSize(300, 300); + frame.getContentPane().setBackground(new Color(250, 184, 97)); + frame.setTitle("Tic Tac Toe Game"); + frame.setLayout(new BorderLayout()); + frame.setVisible(true); + + textfield.setBackground(new Color(0,0,0)); + textfield.setForeground(new Color(255,0,0)); + textfield.setFont(new Font("Serif", Font.BOLD, 25)); + textfield.setHorizontalAlignment(JLabel.CENTER); + textfield.setText("Tic Tac Toe"); + textfield.setOpaque(true); + + t_panel.setLayout(new BorderLayout()); + t_panel.setBounds(0, 0, 800, 100); + + bt_panel.setLayout(new GridLayout(3, 3)); + bt_panel.setBackground(new Color(0, 0, 0)); + + + } + + @Override + public void actionPerformed(ActionEvent e) { + + } +}