fix horizontal size

Discussion in 'Java' started by Scott, Sep 20, 2003.

  1. Scott

    Scott Guest

    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
     
    Scott, Sep 20, 2003
    #1
    1. Advertising

  2. Scott

    Harald Hein Guest

    "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
     
    Harald Hein, Sep 20, 2003
    #2
    1. Advertising

  3. Scott

    Scott Guest

    "Harald Hein" <> wrote in message
    news:Xns93FCC09C7E6Dhhtoken@194.97.5.16...
    > "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
     
    Scott, Sep 21, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Patrick Philippot
    Replies:
    0
    Views:
    475
    Patrick Philippot
    Apr 14, 2006
  2. Xah Lee
    Replies:
    22
    Views:
    1,156
    Tim Roberts
    Mar 21, 2006
  3. Xah Lee
    Replies:
    23
    Views:
    1,105
    Tim Roberts
    Mar 21, 2006
  4. Jason Cavett

    Preferred Size, Minimum Size, Size

    Jason Cavett, May 23, 2008, in forum: Java
    Replies:
    5
    Views:
    12,655
    Michael Jung
    May 25, 2008
  5. Xah Lee
    Replies:
    21
    Views:
    830
    Tim Roberts
    Mar 21, 2006
Loading...

Share This Page