Results 1 to 2 of 2
  1. #1
    coco is offline Member
    Join Date
    Jul 2007
    Posts
    39
    Rep Power
    0

    Default Locking window in java

    Hi, 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 don't want the user to be able to click anywhere else until they have finished with the smaller GUI.
    Hope this makes sense.

    Thanks.

  2. #2
    hardwired's Avatar
    hardwired is offline Senior Member
    Join Date
    Jul 2007
    Posts
    1,576
    Rep Power
    8

    Default

    You want a modal dialog. You can use a JDialog, set modal, or a JOptionPane, all of which are modal. See api for each class. The tutorial has a section on how to make dialogs and each of the two api listings have a link to this page in the tutorial.

Similar Threads

  1. Java Popup Window & Url Query String Value
    By Rivelyn in forum New To Java
    Replies: 4
    Last Post: 01-20-2011, 05:03 AM
  2. drawing window
    By BlitzA in forum New To Java
    Replies: 1
    Last Post: 01-15-2009, 12:55 PM
  3. how we get popup window in java
    By baserohit in forum Advanced Java
    Replies: 1
    Last Post: 03-22-2008, 04:39 AM
  4. refresh a different window
    By marceldupont in forum AWT / Swing
    Replies: 3
    Last Post: 03-22-2008, 02:44 AM
  5. drawing window
    By BlitzA in forum Advanced Java
    Replies: 0
    Last Post: 12-30-2007, 05:39 PM

Posting Permissions

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