Debes utilizar 1 Jframe y 2 Jpanel, agrega al jframe los paneles através de nomframe.getContentPane().add(nomPanel);
En el actionperfomed() que el que maneja el evento del botón a utilizar colocas nomPanelOcultar.setVisible(false); y nomPanelMostrar.setVisible(true);
Espero que esto resuelva tu duda
By:
Johanna Mantilla Duque