(Java Newbie - Panel Transitions) How do I switch between panels in a frame?

Sounds like you should consider using JTabbedPane.

In addition to How to Use Tabbed Panes, you may want to look at CardLayout, mentioned here and here.

I have a problem where I want a program to switch between multiple panels in a same frame. The problems I am encountering are that I can't set the layout when the panels switch and after the switch content is lowering pixel by pixel. Here is my code.

And here are the two classes that hold frames. Any help is appreciated. Please keep in mind I am not so good with java GUI.

Related Questions