What is the correct way to create a resizable window that uses a native titlebar and has a fixed aspect ratio?
My Problem is that for the intended layout to work I actually need the aspect ratio to be constant for the bare window area excluding borders and titlebar.
And of course I would prefer to use the native edge and corner handles to resize the
window.
Should I use the constraint on a main component? how would I make the surrounding window snap to the component? Or is there another recommended way to achieve this?
I just finished a way to do this so I thought I’d share. I overrode the “checkBounds” function of the ComponentBoundsConstrainer to also factor in a border. It’s pretty simple. Just one overriden function: