Hi everyone. I am currently working on a game - Sokoban. I ran into a bit of an issue, where I want the frame to automatically resize itself when a new level begins (as most levels are different in size).
I can't seem to get it to work.
Here are parts of my code:
The game is essentially a JPanel that I draw inside a JFrame.
As you can see, I've been trying to revalidate the JFrame in different parts, but it doesn't appear to be working. I think it's revalidating the JPanel. How can I revalidate the JFrame to match the new coordinates of the JPanel?