-6

I'm making a game and whenever I press the play button the game should start in a new window. How to change the frame of the same window in Java GUI? How can I make the whole thing in one window?

user1803551
  • 12,426
  • 5
  • 43
  • 69

1 Answers1

0

"so how can make the whole thing in one window"

See How to Use CardLayout. It will let you swap between views/panels, so you can stick to just one frame. Also see a simple example here

Community
  • 1
  • 1
Paul Samsotha
  • 197,959
  • 33
  • 457
  • 689