I have a gameboard class: class gameboard extends JInternalFrame
In the constructor i have the line: setDefaultCloseOperation(DISPOSE_ON_CLOSE);
my gameboards are actually in an array myboards were each is an object of this class.
the deal is I want to be able to tell which are open and i want to resuse spots in the array if they close a window. I thought if they closed a gameboard, the array spot would go to null. It does not. The only way to tell if a board spot in the array is open is:
if(myboards[a].isVisible() == true).
Am I doing this right? if it properly disposes of the game board should the spot myboards[a] == null? Can i just stick with isVisible and if say spot 0 is not visible its safe to to do myboards= new gameboard(); ?
can you even call isVisible() on spots in teh array that were never initialized in the first place?