IntelliJ Java IDE
The moose likes Swing / AWT / SWT / JFace and the fly likes how to resize and always have the same proportions?   Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT / JFace
Reply Bookmark "how to resize and always have the same proportions?   " Watch "how to resize and always have the same proportions?   " New topic
Author

how to resize and always have the same proportions?

Angela Stempfel
Greenhorn

Joined: Nov 27, 2001
Posts: 15
hi all
i have an application that i can resize, but i would like to have always the same proportions of the panels and borders. how do i have to do that?
thanks
angela
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
Hi Angela,
I don't think you can affect the way a user resizes the window. All you can do is to resize it correctly after they are done shrinking or stretching it.
You setup a component listener and override the componentResized method.
Regards,
Manfred.
[This message has been edited by Manfred Leonhardt (edited December 07, 2001).]
Jason Kretzer
Ranch Hand

Joined: May 31, 2001
Posts: 280
Actually, you can stop users from resizing windows. JFrames have a setResizable(boolean) method. Just set it to false. I believe JWindows and JDialogs are not resizable at all.

Best Regards,
-Jason


Jason R. Kretzer<br />Software Engineer<br />System Administrator<br /><a href="http://alia.iwarp.com" target="_blank" rel="nofollow">http://alia.iwarp.com</a>
 
IntelliJ Java IDE
 
subject: how to resize and always have the same proportions?
 
Threads others viewed
Resizing my SplitPane
Help suggest a proper layout manager for my form
Resizing a JTable inside BorderLayout
How to avoid repaint?
Proportional resizing of the main window
developer file tools