fix horizontal size  
Author Message
Scott





PostPosted: 2003-9-20 16:25:00 Top

java-programmer, fix horizontal size I have a JFrame that I'd like to fix so it is resizable vertically, but not
horizontally. I can't seem to come up with any simple way of doing this, but
it doesn't sound like it should be too difficult.

Can anybody help. If I need to make it a JWindow, or something else, that
shouldn't be a problem.

Cheers
Scott


 
Harald Hein





PostPosted: 2003-9-21 0:56:00 Top

java-programmer >> fix horizontal size "Scott" wrote:

> I have a JFrame that I'd like to fix so it is resizable
> vertically, but not horizontally. I can't seem to come up with any
> simple way of doing this, but it doesn't sound like it should be
> too difficult.

There is no direct way. You could hook into the resizing event and set
the width back to what you like. This will give you some unusual
jumping window resizing behavior.

BTW comp.lang.java is not a valid newsgroup

 
Scott





PostPosted: 2003-9-21 12:15:00 Top

java-programmer >> fix horizontal size "Harald Hein" <email***@***.com> wrote in message
news:email***@***.com...
> "Scott" wrote:
>
> > I have a JFrame that I'd like to fix so it is resizable
> > vertically, but not horizontally. I can't seem to come up with any
> > simple way of doing this, but it doesn't sound like it should be
> > too difficult.
>
> There is no direct way. You could hook into the resizing event and set
> the width back to what you like. This will give you some unusual
> jumping window resizing behavior.
Yeah that was the about the only way I could think of doing it, but I
thought there must be a better way.
Aw well

>
> BTW comp.lang.java is not a valid newsgroup
Oh isn't it. I won't bother with it then :-)

Thanks