• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Disable posibility of vertical resize of JInternalFrame

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@edit:
I HAVE JUST NOTICED THAT THERE'S A SIMILAR TOPIC ON THIS FORUM: https://coderanch.com/t/432705/Swing-AWT-SWT-JFace/java/disable-only-vertical-resize-JFrame - PLEASE CLOSE/REMOVE MINE OR MERGE TOPICS.


---

Hello,

I'd like to prevent JInternalFrame from being resized but only in vertical directions - is there any way I can achieve this in "easy way"?

Now I'm using ComponentListener to know when JIF is resized (and prevent vertical resize) but I think it's not good idea... I wonder if somewhere is method/booleanFlag to prevent one direction resizing (I know there is setResizable(false) but it blocks both, vertical and horizontal resizing and I want only vertical one to be blocked)Is the code above only solution for what I want do achieve?
 
Bartek Myszkowski
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've got solution on my own (sorry for wasting Your time)
I've forgotten that I can set maximum and minimum height to same value which will prevent resizing
Shame on me
 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are not wasting anybody's time; you are providing useful information for all readers. And well done sorting it out
 
These are the worst of times and these are the best of times. And this is the best tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic