I am trying to make a game applet. When the JApplet goes to the second stage I remove the first JPanel from the JApplet's content pane and add the new one, but all I get is a gray box as if the new JPanel is not really being added.
Here is some of the code:
// clean up stuff from old stage
removeKeyListener( myKeyInputer );
getContentPane().remove( myOptionsView );
myOptionsModel.deleteObserver( this );
// make new stuff for color stage
myColorModel = new colorModel( players, this );
myColorView = new colorView(
myColorModel, extractParam("WIDTH"), extractParam("HEIGHT") );
myColorModel.addObserver( this );
getContentPane().add( myColorView );
myKeyInputer = new colorInputer( this, myColorModel );
addKeyListener( myKeyInputer );
Is there something obvious I'm missing or would anyone look at the whole thing?