Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-5016849

JOptionPane showXXXDialog documents blocking dispatch thread but does not

XMLWordPrintable

    • b46
    • x86
    • windows_xp



      Name: jl125535 Date: 03/19/2004


      URL OF FAULTY DOCUMENTATION :
      http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JOptionPane.html

      A DESCRIPTION OF THE PROBLEM :
      JOptionPane showXXXDialog documents blocking the dispatch thread but does not.

      The class documentation states:

        All dialogs are modal. Each showXxxDialog method blocks the
         current thread until the user's interaction is complete.

      However, if the current thread is the event dispatch thread, then it is
      not blocked but sent to keep pumping events until the dialog is closed.



      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      All dialogs are modal. Each showXxxDialog method blocks the
      current thread until the user's interaction is complete unless the
      current thread is the event dispatch thread in which case other
      events continue to be dispatched while the dialog is waiting to
      be dismissed.
      ACTUAL -
      All dialogs are modal. Each showXxxDialog method blocks the
         current thread until the user's interaction is complete.

      (Incident Review ID: 244078)
      ======================================================================

            svioletsunw Scott Violet (Inactive)
            jleesunw Jon Lee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: