I set up a Card Layout at main Game Panel, in order to bring up some additional menus at certain times during the game.

When I run the build, the panels just flash back and forth between each other continually. Is this because both of them are continually refreshing? and is the card layout feasible in the main Game Panel,

Is there a better way to bring up in game menus?