0

I am working on a 15 puzzle. I need to change the JPanel in the JFrame for a new game. The reason is that some games have 16 buttons while others have 9 or 25. Sometimes the buttons have a number, but sometimes they have pieces of a picture. I would like to set up my JPanel, then set it into the JFrame. The only way that I have been able to achieve this so far is to create a new JFrame, but that outputs a new window. Is it possible to change the JPanel in the JFrame in java?

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433

0 Answers0