Anyway i can stop a user from resizing a JFrame? Im digging through my books but i cant find squat. I dont see anything under the JFrame class or the Window class that would stop the user from resizing a Frame. :confused:
Printable View
Anyway i can stop a user from resizing a JFrame? Im digging through my books but i cant find squat. I dont see anything under the JFrame class or the Window class that would stop the user from resizing a Frame. :confused:
I know the constants in the Windows interface that JFrame JDialog and JInternalFrame implement so please dont mention
DISPOSE_ON_CLOSE
DO_NOTHING_ON_CLOSE
HIDE_ON_CLOSE ;)
In JBuilder when I was messing around with my main JFrame there was a property called "sizable" or something like that.Quote:
Originally posted by Dilenger4
Anyway i can stop a user from resizing a JFrame? Im digging through my books but i cant find squat. I dont see anything under the JFrame class or the Window class that would stop the user from resizing a Frame. :confused:
Hummmmmmm. Ok cool. Ill search for it.
Thanks. Filbert :p
I have a pretty good idea that the property you are talking about
is defined in the java.awt.Frame class which javax.swing.JFrame
extends. Unfortunatly i dont have a awt book so ill have to make a little trip to the good old sun docs. :)
I found it under the java.awt.Frame class as setResizable(boolean resizable); but when i try to compile it produces an error. It says that setResizable in Java.awt.Frame cannot be applied to (java.lang.String) which make no sense becuase that is what it's asking for. :confused:
Code:GUI.setResizable("false");
That would make no sense; try passing it a boolean.
I know it makes no sense. :p Just for the **** of it i tried the
boolean isResizeble() which is also inherited from java.awt.Frame and it works fine.
[code]
boolean is = GUI.isResizable();
System.out.println(is);
[code]
Maybe they just never re-javadoc'ed the class. *shrug*
I got it to work. Thanks. I just passed it a non-String false.
:rolleyes:
:D :DQuote:
Originally posted by filburt1
That would make no sense; try passing it a boolean.