Can you use a Card Layout on Game Panels?

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?

hi, i am a noob too but are you taking about swing? if so have you considered tabbed pane?
i havent tried to do a card layout before but from the sounds of it are you creating the layout inside your game loop?

I agree with Mark. Take a look at http://www.cokeandcode.com/spaceinvaderstutorial

Start with active rendering first as most likely you will be going down that road. Swing buttons have their own display frequency and have to be set up carefully.

What does this have to do with networking? :-\