• Post Reply Bookmark Topic Watch Topic
  • New Topic

Disable posibility of vertical resize of JInternalFrame  RSS feed

 
Bartek Myszkowski
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@edit:
I HAVE JUST NOTICED THAT THERE'S A SIMILAR TOPIC ON THIS FORUM: http://www.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
  • 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
 
Campbell Ritchie
Sheriff
Posts: 55351
157
  • Mark post as helpful
  • send pies
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!