Results 1 to 11 of 11

Thread: Resizing JFrame? [resolved]

  1. #1

    Thread Starter
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418

    Resizing JFrame? [resolved]

    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.
    Last edited by Dilenger4; Oct 1st, 2001 at 03:13 PM.

  2. #2

    Thread Starter
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    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

  3. #3

    Re: Resizing JFrame?

    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.
    In JBuilder when I was messing around with my main JFrame there was a property called "sizable" or something like that.

  4. #4

    Thread Starter
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    Hummmmmmm. Ok cool. Ill search for it.
    Thanks. Filbert

  5. #5

    Thread Starter
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    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.

  6. #6

    Thread Starter
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    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.

    Code:
     GUI.setResizable("false");

  7. #7
    That would make no sense; try passing it a boolean.

  8. #8

    Thread Starter
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    I know it makes no sense. 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]

  9. #9
    Maybe they just never re-javadoc'ed the class. *shrug*

  10. #10

    Thread Starter
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    I got it to work. Thanks. I just passed it a non-String false.

  11. #11
    Originally posted by filburt1
    That would make no sense; try passing it a boolean.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width