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

FileDialog.getDirectory() does not return null when file dialog is cancelled

    XMLWordPrintable

Details

    • b47
    • sparc
    • solaris_9
    • Verified

    Description

      I am opening an AWT FileDialog on clicking a button on the frame. When the dialog opens, I am navigating through some of the directories listed and finally I am cancelling the dialog. When I call FileDialog.getDirectory() after that, it returns me the default directory. I expect this method to return 'null' when the dialog is cancelled.

      This is how it behaves on Win32 and Motif and XToolkit must be compatible with Motif. This is reproducible on Mustang as well as Tiger-fcs. Not reproducible on Win32.

      I have attached a sample test. Execute the sample test. Click on 'OPEN' or 'SAVE' button. A file dialog will be opened. Cancel the file dialog. If you see a valid directory being printed on the console, the bug is reproduced. I reproduced it on SolarisSparc9-CDE.
      ###@###.### 2005-04-25 12:44:15 GMT

      Attachments

        Issue Links

          Activity

            People

              dcherepanov Dmitry Cherepanov
              pmohansunw Praveen Mohan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: