This week's book giveaway is in the HTML/CSS/JavaScript forum.
We're giving away four copies of Practical SVG and have Chris Coyier on-line!
See this thread for details.
Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How can I stop a JFrame from being resized?

 
netharam ram
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have a JFrame with some content, I want that to be in the same size as it is created.I don't want to get it resized,i.e.(I should not get a resize mouse pointer when my mouse is placed at the borders of the JFrame.is this possible im JFrames or can this be done in Jwindow.Please reply me with the best answer.
Happy middling with java.
Netharam.
 
Raja Kannappan
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. You can achieve that using JFrame. Use the method setResizable(false). Even the re-size pointer won't appear when you have mouse at the borders of the frame.
Another alternative is to use JDialog.
Thanks,
- Raja.
 
netharam ram
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I tired this out & is working fine.
Thank You.
Happy middling with java.
Netharam.
 
God is a comedian playing for an audience that is afraid to laugh - Voltair. tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!