Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Setting frame minimum size

 
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I am trying to make the frame to have a minimum size so that it won't resize to one pixel. There are 2 ways I can think of to do this.

1. make the frame to have a minimum size.
2. make all main (in the content pane) components to have a minimum size so that if I add another one, the minimised frame will still show all components.

Since I can't find frame can set a minimum size, so 2 is the way to go. And I think 2 is better way as well, am I right? Should the frame have a minimum size too?

Thanks for any advice.
 
Anna Hays
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi again, just realise 2 won't work. I have give the components a minimum size, but the frame can still resize pass the minimum size. Can someone help me please?
 
Ranch Hand
Posts: 531
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Anna. I think this may be a good solution. The componentResized event handler could set the minimum size.



... the Adapter:



Hope this info is what you are looking for I hope the mechanism will be helpful to your project.

Sincerely,

Anton.

[ October 16, 2004: Message edited by: Anton Golovin ]
[ October 16, 2004: Message edited by: Anton Golovin ]
 
Ranch Hand
Posts: 1033
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's the code to do that, implemented as an anonymous inner class:
 
I am not a spy. Definitely. Definitely not a spy. Not me. No way. But this tiny ad ...
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic