Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to resize and always have the same proportions?  RSS feed

 
Angela Stempfel
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 280
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!