GeeCON Prague 2014*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes how to make a frame not resizeable ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "how to make a frame not resizeable ?" Watch "how to make a frame not resizeable ?" New topic
Author

how to make a frame not resizeable ?

Varaku Venkata
Ranch Hand

Joined: Mar 17, 2002
Posts: 30
Hi,
can somebody tell me how to make a frame not resizeable ?
Thanks
Geir Morten Hagen
Ranch Hand

Joined: Apr 05, 2002
Posts: 34
setResizable(false)
Why would you prevent the user from resizing the frame?
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
setResizable(false)? Or am I missing something?
- Peter
Varaku Venkata
Ranch Hand

Joined: Mar 17, 2002
Posts: 30
Hi,
Geir ...I want to make the frame size to be one particular size..i will set an initial size to the frame and in that i will place the components ...i do not want the user to maximize it so that the placing of the components is disturbed.....
in which class is this method setResizeable(false) present..
Thanks Geir for replying so fast...
Geir Morten Hagen
Ranch Hand

Joined: Apr 05, 2002
Posts: 34
I would not do that. What if the user like to have his applications maximized?
The use of layout managers will help
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

in which class is this method setResizeable(false) present..

java.awt.Frame, which is a superclass of JFrame.
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Rajesh Matti
Ranch Hand

Joined: Jan 07, 2002
Posts: 121
Geir- Using layout will not stop anybody from making a screen look bad. Even if you use GridBagLayout, if you have not set the constraints right, screen can still loook bad, if the user resizes. Hence once may need to make a screen not resizable, if he/she thinks it may worsen the look and feel.
-Rajesh
Varaku Venkata
Ranch Hand

Joined: Mar 17, 2002
Posts: 30
Hi Rajesh,
I am also in sync with your opinion.......but is it correct or is there anybody who have made the frame(having some LayoutManager) not resizeable...
Thanks
venkat
Sai Prasad
Ranch Hand

Joined: Feb 25, 2002
Posts: 560
I would go with 640x480 for the JFrame and not worry about putting any limitations on the user.
Rajesh Matti
Ranch Hand

Joined: Jan 07, 2002
Posts: 121
Varaku - I would maximize the screen by setting its dimension to toolkit.getScreenSize(). But let the user resize the screen.
-Rajesh
 
 
subject: how to make a frame not resizeable ?