{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreibb3pl7di6w4mrddyg42cbsz62ckeuie4bv5ayypbammvnrxoke7m",
    "uri": "at://did:plc:dxjzgxe7cvirxkwfjr2tjspt/app.bsky.feed.post/3mohwsam2xlv2"
  },
  "path": "/t/solved-how-do-i-force-a-minimum-window-size-in-with-lwjgl2/49626#post_2",
  "publishedAt": "2026-06-17T06:48:20.000Z",
  "site": "https://hub.jmonkeyengine.org",
  "textContent": "In case anyone needs something like this, I found a workable solution:\n\n\n        protected boolean forceMinimumResolution(int w, int h) {\n            int width = w;\n            int height = h;\n\n            if (width < settings.getMinWidth() || height < settings.getMinHeight()) {\n                int newWidth = Math.max(width, settings.getMinWidth());\n                int newHeight = Math.max(height, settings.getMinHeight());\n\n                settings.setResolution(newWidth, newHeight);\n\n                // For LWJGL2 Display\n                try {\n                    org.lwjgl.opengl.Display.setDisplayMode(\n                            new org.lwjgl.opengl.DisplayMode(newWidth, newHeight)\n                    );\n                } catch (LWJGLException e) {\n                    return false;\n                }\n            }\n\n            return true;\n        }\n",
  "title": "[SOLVED] How do I force a minimum window size in with LWJGL2?"
}