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 variables x and y so that it knew where it was in the grid. I also changed a method in the class which revealed blank squares.
And now, when I start up the application only one Square appears in the top left of the grid! All the squares are there but they don't reveal themselves until they are clicked on.
It's crazy! I've had a similar problem before when making a chess game, only then the squares did appear when you hovered the mouse over.
It's such an annoying problem and I hope someone out there can tell me how to solve it 'coz I'm going out of my mind trying to work something out!!![Smile :) :)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
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 variables x and y so that it knew where it was in the grid. I also changed a method in the class which revealed blank squares.
And now, when I start up the application only one Square appears in the top left of the grid! All the squares are there but they don't reveal themselves until they are clicked on.
It's crazy! I've had a similar problem before when making a chess game, only then the squares did appear when you hovered the mouse over.
It's such an annoying problem and I hope someone out there can tell me how to solve it 'coz I'm going out of my mind trying to work something out!!