Hey guys, my game is currently set up so that there is a single JFrame. The “Game” class displays levels, etc (extends JPanel).
However, I now need to make a screen for the level select/ menus. Is there a way to make more JPanels and have them overlap each other on the JFrame, and then just pick which one to show (and subsequently hide others), so I don’t have to use a GameState variable or something and end up with a 100kb Game.class instead.
Thanks, much appreciated.
Its called a TabbedPane
RTJD
I thought about TabbedPanes but can you hide their buttons?
you are looking for the cardlayout.
CardLayout has worked great!
Thanks a bunch, guys. ;D