Menu. Menu.add(pVP) //adds the player vs player button Menu.add(instruct) //adds the instruction button tLayout(new FlowLayout()) //arranges the layout of the buttons on the panel Public static void menu ()//the main menu of the game Public static JButton instruct = new JButton('Instructions'), pVP = new JButton('Player VS. Public static JPanel board = new JPanel(), menu = new JPanel() Public static JFrame menuFrame = new JFrame('Tic-Tac-Toe') Public class ticTacToe implements ActionListener //uses action listener because of the use of buttons, so it needs to know when the buttons are clicked Most of my knowledge is self-taught, so any help is appreciated. Again, I am new to swing and everything around it. I realize some of the imported content is not used, but I plan on them probably being used once I get further in the program. Managing Listener Lists with EventListenerList import java. Anyways, the error is stated in the title, and my goal is to figure out how to detect which button is clicked, and then have an if/else statement to control what happens next, by using methods. A call to the following code (fireActionPerformed(actionEvent)) will replace the one line of. It very well be because I'm new to this that there may have been an answer, but I did not understand. I hope this is not considered a duplicate because I scanned this site for hours trying to find an answer to this. So I am trying to make a Tic-Tac-Toe game, and I am completely new to JFrames, panels, pretty much all of the GUI stuff.