I've a program that starts with a welcomeScreen JFrame, on which it has a JButton with the option of starting the game.. when I click that button, it opens the JFrame with my game however it does not close.. anyway of how to do this? I only know System.exit(0) and this closes everything..
Asked
Active
Viewed 959 times
2 Answers
3
I've a program that starts with a welcomeScreen JFrame, on which it has a JButton with the option of starting the game.. when I click that button, it opens the JFrame with my game however it does not close.. anyway of how to do this? I only know System.exit(0) and this closes everything..
don't to create another
JFrame
use
CardLayout
withJFrame.pack()
, after card is switched

mKorbel
- 109,525
- 20
- 134
- 319