aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Fixed with/heigth ratio for Swing frame ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Fixed with/heigth ratio for Swing frame ?" Watch "Fixed with/heigth ratio for Swing frame ?" New topic
Author

Fixed with/heigth ratio for Swing frame ?

Michael Boehm
Ranch Hand

Joined: Jun 02, 2010
Posts: 51
Is there a quick or "automatic" way to ensure that the ratio height/width for a JFrame is kept constanting after a user resizes the frame or do I have to handcode ?
Martin Vanyavchich
Ranch Hand

Joined: Sep 16, 2008
Posts: 241
I don't think there is. Why do you need to keep aspect ratio, if you don't mind me asking?


SCJP 6, OCMJD 6, OCPJWSD 6
I no good English.
Michael Boehm
Ranch Hand

Joined: Jun 02, 2010
Posts: 51
Martin Vanyavchich wrote:I don't think there is. Why do you need to keep aspect ratio, if you don't mind me asking?


I am making a boardgame and thought it would be nice that the ratio always equalled the ratio for the size of a real life board for the game
I think I know how to do it, so no problem anymore.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38873
    
  23
Moving to our GUIs forum.

And please tell us what the solution is, so others can learn. And maybe somebody can improve your solution
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Fixed with/heigth ratio for Swing frame ?