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

JOptionPane doesn't support Dialog.ModalityType

XMLWordPrintable

      A DESCRIPTION OF THE REQUEST :
      Creating a JOptionPane with one of the static methods doesn't allow you to configure the modality of the JDialog used by the component. You have to manually create the JOptionPane and attach it to the created dialog from createDialog.

       
      One should be able to configure the modality with another argument to the static method.

      JUSTIFICATION :
      Better utalization of new modality functionality.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Offer addition argument to all the showXXX methods.
      ACTUAL -
      Must manually create...

         JOptionPane pane = new JOptionPane(
            "New label", JOptionPane.QUESTION_MESSAGE
            );
          pane.setWantsInput(true);
          JDialog dialog = pane.createDialog(parent, "Enter Text");
          dialog.setModalityType(Dialog.ModalityType.DOCUMENT_MODAL);
          dialog.setVisible(true);

            Unassigned Unassigned
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: