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

JOptionPane.showXXXDialog() methods are not clear about modality.

XMLWordPrintable

    • beta2
    • generic
    • solaris_2.6

      JOptionPane.showXXXDialog() methods' detailed descriptions can be misleading.

      Up at the very top of the webpage for this class, it clearly states that:
      "All dialogs are modal. Each showXxxDialog method blocks the current thread
      until the user's interaction is complete."

      However, at the detailed descriptions for the following 2 methods as an
      example, could be misleading:
      -------------------------------------------------------------------------------
      showInteralMessageDialog
      public static void showInternalMessageDialog(Component parentComponent,
                                                   Object message)
          Brings up an internal confirmation dialog panel. The dialog is a
          modal information-message dialog titled "Meeage:.
          Parameter:
              parentComponent - Determines the Frame in which the dialog is
              displayed. If null, or if the parentComponent has no Frame, a
              default Frame is used.
              message - The object to display
      -------------------------------------------------------------------------------
      showInteralMessageDialog
      public static void showInternalMessageDialog(Component parentComponent,
                                                   Object message,
                                                   String title,
                                                   int messageType)
          Brings up an internal dialog panel that displays a message using a
          default icon determined by the messageType parameter.
          Parameter:
              parentComponent - Determines the Frame in which the dialog is
              displayed. If null, or if the parentComponent has no Frame, a
              default Frame is used.
              message - The object to display
              title - the title string for the dialog
              messageType - the type of message to be displayed: ERROR_MESSAGE,
              INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, or
              PLAIN_MESSAGE.
      -------------------------------------------------------------------------------

      Once read the first description and then the second description, the reader
      would be lead to thinking that there a distinction in the modality.

      It would be better to take out the description for modality except for the
      excerpt at the top.

      Roger Pham 8/30/99

            sharonz Sharon Zakhour (Inactive)
            rphamsunw Roger Pham (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: