Why Wont the Java Component JPanel wont disapear?

I was trying to set up something with the JMenu where you can switch between "pages" (JPanels) but I ran into an issue where one would not disappear after trying a few methods online. Can someone tell me what is the error I am making?