Problem with resizing a frame
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Wednesday, August 1, 2001 12:13 PM

Problem with preventing resizing of a frame as it messes up the panels that are added to it I want to prevent people resizing my frame thus I have a component listener that checks for when the frame is being resized and thus the event action sets it back to the preferred size. Unfortunately this messes up the panels on the frame i.e. the frame goes back to the "perferred size" but the panels stay squashed up. I am using gridbaglayout and have messed with the weightings on my panel i.e. setting them to 0.0, 1.0 Any Help would be greatly appreciated Regards Colette    More>>

Problem with preventing resizing of a frame as it messes up the
panels that are added to it

			
I want to prevent people resizing my frame thus I have a component
listener that checks for when the frame is being resized and thus the event action
sets it back to the preferred size.

Unfortunately this messes up the panels on the frame i.e. the frame
goes back to the "perferred size" but the panels stay squashed up.

I am using gridbaglayout and have messed with the weightings
on my panel i.e. setting them to 0.0, 1.0

Any Help would be greatly appreciated

Regards

Colette
   <<Less

Re: Problem with resizing a frame

Posted By:   Sam_Hughes  
Posted On:   Wednesday, August 1, 2001 03:35 PM

I'm not totally sure this is what you're asking, but if you're trying to stop a JFrame from being resized, just do this:



myFrame.setResizable(false);
About | Sitemap | Contact