Java Core GUI APIs: Force JFrame to resize in only diagonal direction
Posted on 2010-11-29
I'm looking for a way to force a JFrame to only resize along a diagonal. I need to maintain a particular width:length ratio for the entire frame. I know I have seen this is other applications (probably not in Java though). So to clarify, the JFrame is resizable, but you cannot size in only the vertical or in only the horizontal directions (shouldn't even get the resize icon when you put the mouse along those borders). But, if the mouse is in the lower right corner, the diagonal resize icon shows up and the entire JFrame resizes along the diagonal maintaining the aspect ratio. Any thoughts?