How to clear/ reset a JFrame
Me and my friend have decided to work on a card game which cycles between 3 screens ( Player1HandScreen, Player2HandScreen and FightScreen ). Once Player1 has chosen their card from Player1HandScreen , Player1HandScreen leads to Player2HandScreen where Player2 does the same. then Player2HandScreen leads to FightScreen where the two cards are compared and one player is declared the winner of that round. The problem we are having is that once the round ends we want to clear Player1HandScreen as well as the Player2HandScreen once refreshing our parameters we are having trouble updating the GUI