in my program the user should be able to change from window-Mode to Fullscreen and back.
When the program ist in window-Mode the window should be resizable.
The program starts in window mode an the window is resizable.
when I switch to fullscreen and then back to window-mode the window isn’t resisable anymore.
I use the following code to change the modes.
What am I doing wrong?
(Windows 11-x64 Product Version: jMonkeyEngine SDK v3.5.2-stable Java: 11.0.17; OpenJDK 64-Bit Server VM 11.0.17+8 Runtime: OpenJDK Runtime Environment 11.0.17+8
LWJGL 2.9.3)
It’s the same when I always stay in window-mode and just want to toggle resizable.
Once resizable ist set to false you cannot set it back to true (to be more exact, you can set the flag, but the window stays not resizable).
You could also try LWJGL 3 to see if it fixes the problem so that we can scope this down. LWJGL 3 is anyway something that you should consider using. LWJGL 2 is considered a legacy thing.
Thank you very much, but I must admit that I don’t know how to migrate to LWJGL3.
I’m just using the JME IDE “out of the box” and I don’t know what problems await me when I try to change something.
I never changed the build tool (I guess it’s “ant”) or anything else of “the system”.
I once tried to update to a higher Version of the IDE but it was a total disaster.
So I try to stay on version 3.5.2.
With SDK and Ant I think it was somewhere from project properties you can choose the libraries. LWJGL 3 comes with the SDK also, so it is just a matter of dropping the LWJGL 2 away and choosing the 3.
That being said, I’ll veer off the subject once again and recommend using Gradle instead of Ant. This of course doesn’t affect the quality of your end product but should help you on your way once you have gotten past the initial shock.
Updating the SDK should always be done with a clean install as there is no update path. I would be very curious to know why it was so disastrous for you. I do know that with Ant it is a bit more intimidating as it directly depends on what the SDK is supplied with. A newer SDK will contain newer jME engine as well as the auxiliary packages. Also if you rely on the shipped Java, that also might have changed. All this requires some Java knowledge to overcome. Gradle projects are less subjectible for this as all the versions are more or less stated in the build files and self managed.
SDK 3.7 is just around the corner, waiting for jME 3.7 release. So if it is too cumbersome process, you might want to wait a bit to do it only once and be able to enjoy the latest and greatest Java game engine (note, a fact, not an opinion).