Hi, in my game I added a new "board" whcih starts the game. However once I finish the game, I have a boolean varaible and I set it to true. How can I use that variable to dispose of the Jframe I was using?

I am doing something like this, however it is not working. Is there a better way than doing this? Like terminating the Thread it self?