eXBii

Go Back eXBii > Technology> Technical Help & Tutorials > JPanel - how to disable resize?

Reply
 
Thread Tools Search this Thread
  #1  
Old 12th July 2012
mike11's Avatar
mike11 mike11 is offline
 
Join Date: 27th January 2007
Posts: 507
Rep Power: 16 Points: 321
mike11 has many secret admirers
UL: 92.11 gb DL: 95.30 gb Ratio: 0.97
JPanel - how to disable resize?

Exbiians,

I am working on a project using swing. Using NetBeans (not using the drag and drop) so have to manually code everything. I wonder how is it possible to make the Jpanel not resizable???

Reply With Quote
  #2  
Old 13th July 2012
iyerpaiyen iyerpaiyen is offline
 
Join Date: 19th May 2012
Posts: 121
Rep Power: 3 Points: 71
iyerpaiyen is beginning to get noticed
yourFrame.setResizable(false);

or make

setMaximumSize on the JFrame and it won't allow you to resize the JFrame.

Reply With Quote
  #3  
Old 13th July 2012
iyerpaiyen iyerpaiyen is offline
 
Join Date: 19th May 2012
Posts: 121
Rep Power: 3 Points: 71
iyerpaiyen is beginning to get noticed
hope you got it?? if not tell me dude i will help

Reply With Quote
  #4  
Old 14th July 2012
mike11's Avatar
mike11 mike11 is offline
 
Join Date: 27th January 2007
Posts: 507
Rep Power: 16 Points: 321
mike11 has many secret admirers
UL: 92.11 gb DL: 95.30 gb Ratio: 0.97
Quote:
Originally Posted by iyerpaiyen View Post
hope you got it?? if not tell me dude i will help
tried setMin or setMax but it dint work. It makes the the window fixed size but still it allows the user to change the size of the window by dragging the window size.

Reply With Quote
  #5  
Old 14th July 2012
iyerpaiyen iyerpaiyen is offline
 
Join Date: 19th May 2012
Posts: 121
Rep Power: 3 Points: 71
iyerpaiyen is beginning to get noticed
did u try this yourFrame.setResizable(false);

Reply With Quote
  #6  
Old 14th July 2012
mike11's Avatar
mike11 mike11 is offline
 
Join Date: 27th January 2007
Posts: 507
Rep Power: 16 Points: 321
mike11 has many secret admirers
UL: 92.11 gb DL: 95.30 gb Ratio: 0.97
Quote:
Originally Posted by iyerpaiyen View Post
did u try this yourFrame.setResizable(false);
I think the one you suggested is for the jframe right? but i am using jpanel

Reply With Quote
  #7  
Old 14th July 2012
iyerpaiyen iyerpaiyen is offline
 
Join Date: 19th May 2012
Posts: 121
Rep Power: 3 Points: 71
iyerpaiyen is beginning to get noticed
then try like this put the jpanel into jframe and then do this na??

Reply With Quote
  #8  
Old 15th July 2012
mike11's Avatar
mike11 mike11 is offline
 
Join Date: 27th January 2007
Posts: 507
Rep Power: 16 Points: 321
mike11 has many secret admirers
UL: 92.11 gb DL: 95.30 gb Ratio: 0.97
Quote:
Originally Posted by iyerpaiyen View Post
then try like this put the jpanel into jframe and then do this na??
will try and let you know...

Reply With Quote
  #9  
Old 18th July 2012
supersaiyan_gohan's Avatar
supersaiyan_gohan supersaiyan_gohan is offline
kurosaki ichigo
 
Join Date: 13th February 2011
Location: good heavens
Posts: 30,919
Rep Power: 38 Points: 10638
supersaiyan_gohan is one with the universesupersaiyan_gohan is one with the universesupersaiyan_gohan is one with the universesupersaiyan_gohan is one with the universe
UL: 111.46 mb DL: 366.25 mb Ratio: 0.30
frame.setResizable(false);

Reply With Quote
  #10  
Old 18th August 2012
mike11's Avatar
mike11 mike11 is offline
 
Join Date: 27th January 2007
Posts: 507
Rep Power: 16 Points: 321
mike11 has many secret admirers
UL: 92.11 gb DL: 95.30 gb Ratio: 0.97
Quote:
Originally Posted by iyerpaiyen View Post
then try like this put the jpanel into jframe and then do this na??
It worked!! many thanks

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


One of the largest message boards on the web ! All times are GMT +5.5. The time now is 02:27 AM.
Page generated in 0.01883 seconds