I attached my code to this post. I couldn't upload java files, so it's a txt, if you want to see it, just make sure you change it to java before compilation.
Anyway, it's a fully functional Connect 4 game (the edit name buttons and quit button on the frame that pops up when you win don't work yet though). I got this far with it, but I just don't know how to automatically exit a frame. Basically if you win the game, a screen comes up saying "Player 1/2 Wins" It has two buttons, play again, and quit (which, as I said, doesn't work)
when you hit play again, the game resets as it should, but how the screen that says 'player 1/2 wins' is still there. When I click play again, I want not only the game to reset (which it does fine), but the screen that win screen should disappeat. I want to do this from the action listener attached to the playagain button.
I tried searching, but that doesn't work well, because I can't define my problem in a couple keywords
Thanks
Jake
Anyway, it's a fully functional Connect 4 game (the edit name buttons and quit button on the frame that pops up when you win don't work yet though). I got this far with it, but I just don't know how to automatically exit a frame. Basically if you win the game, a screen comes up saying "Player 1/2 Wins" It has two buttons, play again, and quit (which, as I said, doesn't work)
when you hit play again, the game resets as it should, but how the screen that says 'player 1/2 wins' is still there. When I click play again, I want not only the game to reset (which it does fine), but the screen that win screen should disappeat. I want to do this from the action listener attached to the playagain button.
I tried searching, but that doesn't work well, because I can't define my problem in a couple keywords
Thanks
Jake
Attachments
-
10.3 KB Views: 13