![java lwjgl vs libgdx java lwjgl vs libgdx](https://i.stack.imgur.com/VfNo9.png)
However, you need to react to that change in your game, to do that the best way (imho) is use a similar approach LibGDX does. If you chose another layout, then maybe you will call tSize() by hand. For example, if you chose a layout which grows to the parent container size, then each time you resize the container, the Canvas will be resized. If you are working with LWJGL directly, then it depends a lot of how which kind of layout are you using for the container of the Canvas object. The other way around, suppose you have a way inside your game to choose the game resolution, you will have to communicate that to the Browser, probably calling a Javascript function from your Applet to let the Browser react to the change. To resize an Applet on the browser, two possible ways are, use Javascript to change the applet tag sizes or just configure the HTML applet tag to adapt to its container size, so if you resize the browser window then all corresponding HTML components are resized.
#Java lwjgl vs libgdx how to#
(note: using fullscreen is a different case but has no meaning for this post) How to resize an Applet Unless you want some custom behavior, I believe that is the common usage. On desktop, you create a JFrame or similar and add inside a Canvas, on Applet you just create the Canvas and add it to the Applet. LWJGL Applets are similar to LWJGL Applications, they work using a class named Display which uses an AWT Canvas component. (note: LWJGL version 2.8.2 was used for all the tests I made). As I never used resizable LWJGL Applets, I had to do some research.
![java lwjgl vs libgdx java lwjgl vs libgdx](https://i.ytimg.com/vi/CIJ53Ul4l18/maxresdefault.jpg)
Some posts before, in the comments section, Gornova asked me to write about resizable Applets if I had some time. Resizable Applets and Applications with LWJGL