Set Window's Minimum size when using P2D

Get the window like this:

import com.jogamp.newt.opengl.GLWindow;

window = (GLWindow) surface.getNative();
window.setResizable(true);

Then at the top of draw(), include something like this:

window.setSize(max(window.getWidth(), minWidth), max(window.getHeight(), minHeight));

… as there doesn’t seem to be a way to set minimum dimensions on the window object:

2 Likes