title: CardLayout not working
body: <p>I'm working on a little game where users login. After you have logged in, you will be able to go to the main menu. I am using a CardLayout which is not working. There are a few final Strings containing the panel names. I have been debugging for a while and I know for sure that this piece of code is reached. Any tips are welcome. Thanks!</p>
  
  <pre><code>/*
   * showPanel()
   * Method to switch to a different panel
   * @author Rick Slinkman
   */
  public void showPanel(String newPanel) 
  {
      game.setCurrentPanel(newPanel);
      cardLayout.show(mainpanel, newPanel);
      revalidate();
      repaint();
  }
  </code></pre>