We will design a Tic Tac Toe game with a Graphical User Interface (GUI).
We will need a game frame and buttons and ... it will be very compliated to code these things.
But wait... we can borrow code from the Java Swing library.
It has components that we can use and also redesign if necessary for our own purposes.
Java Swing has the following components ... and many more:
Without these components, you would need to do do a lot of coding to design your own!
So, using the Java Swing library (or any library file(s)):
The following video will cover these concepts and show you how to develop the game frame hosting 9 clickable buttons!
Let's get started with the game logic. Every time we click a button, we trigger an event.
Let's conclude the game logic and play the game!
implements this.add(buttons[i]) GameFrame extends setTitle() new DisplayGrid(3,3) class ActionListener() for() public JFrame new private JButton