A simple two-player Tic Tac Toe game with a graphical user interface using Java Swing.
This project also started as a class exercise in my Computer Science course. My professor provided us with the basic logic in the terminal. I decided to go beyond that by building a full desktop GUI version using JFrame and Java Swing.
Players take turns placing their mark, the game automatically checks for a win or draw, and thereβs a reset button to start over.
- Java SE
- Java Swing (
JFrame,JButton,JLabel) - IntelliJ IDEA
- Two-player gameplay
- Win and draw detection
- Reset button to restart
- Clean and functional GUI
- Object-Oriented Design
MyTicTacToe.javaβ Builds the GUI and handles interactionsMain.javaβ Entry point to launch the gameTicTacToeGame.jarβ Packaged runnable JAR version
TicTacToeDemo.mov
This was a great way for me to apply what I learned in class and see how simple logic could become an actual app. Converting a console game into a GUI project made it more exciting and gave me hands-on experience with Java Swing.
Make sure Java is installed on your system.
Run the JAR file with:
java -jar TicTacToeGame.jar