|
#1
|
||||
|
||||
|
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??? |
|
#2
|
|||
|
|||
|
yourFrame.setResizable(false);
or make setMaximumSize on the JFrame and it won't allow you to resize the JFrame. |
|
#3
|
|||
|
|||
|
hope you got it?? if not tell me dude i will help
|
|
#4
|
||||
|
||||
|
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.
|
|
#5
|
|||
|
|||
|
did u try this yourFrame.setResizable(false);
|
|
#6
|
||||
|
||||
|
I think the one you suggested is for the jframe right? but i am using jpanel
|
|
#7
|
|||
|
|||
|
then try like this put the jpanel into jframe and then do this na??
|
|
#8
|
||||
|
||||
|
will try and let you know...
|
|
#9
|
||||
|
||||
|
frame.setResizable(false);
|
|
#10
|
||||
|
||||
|
Quote:
![]() |