Okay, I've worked it out.
I'd created two methods in the Square class: int getX() and int getY().
Presumably they overrided some other methods in a bad way.
Hope this is useful information for someone else with the same problems.
I am creating a Minesweeper game.
There is a grid of X * Y "Square"s which extend the JButton class.
Everything was working fine, all the buttons were displaying and all the functionality of the game were there and working.
Then I changed the Square class, adding two integer...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.