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

FileDialog with null parent does not block a toolkit modal dialog


    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 9
    • Fix Version/s: tbd_major
    • Component/s: client-libs
    • Labels:


      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.


          Issue Links



              • Assignee:
                azvegint Alexander Zvegintsev (Inactive)
                avstepan Alexander Stepanov (Inactive)
              • Votes:
                0 Vote for this issue
                1 Start watching this issue


                • Created: