Results 1 to 2 of 2

Thread: Problem associating with window focusing ...

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2002
    Posts
    12

    Exclamation Problem associating with window focusing ...

    Say, I have a main window with a button inside, and if the user presses on that button, another warning window with an OK button inside will then pop up. Now the question is how can I disallow the user from returning back to the main window unless the OK button on the pop-up window is pressed ? Thanx.

  2. #2
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    Pretty sure JOptionpane.showMessageDialog
    is modal by default so that would take care
    of the problem. If you were creating a dialog
    from scratch you would have to pass true
    to the constructor to set modal to true.

    public JDialog(Frame parent, String title, boolean modal)

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