Inspiration

I was inspired to write the code for this from my previous work with graphical user interface (GUI) components being introduced in my advanced object-oriented programming course of my university.

What it does

This program uses Graphical User Interface (GUI) component provided by the javax.swing.* library in order to create a four-by-four grid to play the connect 4 game, which is basically a less-than-efficient game of tic-tac-toe.

How we built it

I built the software application of this programming challenge using the javax.sing., java.awt., and java.awt.event.* libraries of the object-oriented programming language of Java.

Challenges we ran into

I ran into the issue of figuring out how to record the change of background color of each button selected by each player, but then figured it out via a quick google search. This then allowed me to assign a boolean flag to the change of button backgrounds, thereby signaling a turn has been taken by one of the players.

Accomplishments that we're proud of

I am proud of using my education from my advanced object-oriented programming course to create a recreational game for players to consume.

What we learned

I learned how to record the background color of any GUI component for a specified purpose in Java.

What's next for Connect Four in Java

I could expand the size of the frame to include more elements for both dimensions in this software application of Connect 4.

Built With

Share this project:

Updates