Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Mar 2005
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation locking a window in Java Swing

    Is there a way to lock a window in java swing, what i simply mean is i have a small GUI that appears in front of a larger one, and i dont want the user to be able to click anywhere else untill they have finished with the smaller gui.

    hope this makes sense.

    thanks in advance
    kusky

  • #2
    JPM
    JPM is offline
    Regular Coder
    Join Date
    Mar 2004
    Location
    Norway
    Posts
    204
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Small dialog windows are modal (they block all other windows), but Im not sure about regular windows.

    link
    <JPM />

  • #3
    Regular Coder
    Join Date
    Jul 2002
    Location
    Kentucky
    Posts
    133
    Thanks
    0
    Thanked 1 Time in 1 Post
    Yeah, use JDialog instead of JFrame for the smaller window. Then pass the owner JFrame to the JDialog constructor.


  •  

    Posting Permissions

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