Hey, i'm making a tic tac toe game and having some problems when the user clicks on a button. Theres no compile error just nothing happens and debugge mode is not really helpful.
I also tried making the buttons into an array but got some error, so just ditched that idea.

Right now, all I wanted it to do is when I click on a button, it changes to the image on an X but nothing happens.

The Event object passed to the action listener method has a reference to the component (JButton) that was clicked. Get that reference, cast it to a JButton and you can access that button's methods as needed.

Don't hard code a reference in the x() method. Pass it as an arg to the method.

Or your solution of giving the listener the reference when it is created should work.