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

FileDialog with null parent does not block a toolkit modal dialog

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • P4
    • Resolution: Unresolved
    • 9
    • tbd
    • client-libs
    • None

    Description

      Accordingly to spec. for FileDialog - http://docs.oracle.com/javase/8/docs/api/java/awt/FileDialog.html
      "since it is a modal dialog, when the application calls its show method to display the dialog, it blocks the rest of the application until the user has chosen a file."

      Please run the attached test and push 'Open' button. A file dialog will appear. Try to push 'Close' button on the parent dialog - you cannot do that because it is blocked.
      Close the tests.

      Then change parent of fd to null:
      FileDialog fd = new FileDialog((Dialog) null);
      - now you can close the parent dialog before the FileDialog - that seems to be a bug; and application is still running even after closing both of the dialogs.

      If change 'TOOLKIT_MODAL' to any other modality type then the parent dialog should be blocked again.

      Checked with JDK9-b14 on Ubuntu 14.04 Linux and Windows 7.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              avstepan Alexander Stepanov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: