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

FileChooser does not allow choosing directories

    XMLWordPrintable

    Details

      Description

      It's great to see the new javafx.stage.FileChooser class! It works a charm for opening and saving files. We've been able to use it to dump our last remaining traces of Swing, since we were forced to use JFileChooser up until now.

      However, it is not possible to use FileChooser to select a directory. If you click the Open button when a directory is selected, all that happens is that the FileChooser dialog starts showing the contents of that directory. We need directory choosing for certain configuration dialogs in the Visual Tool. Possibly (as I saw suggested in another issue) it could be a separate DirectoryChooser class. Alternatively, the list of file extensions could be moved from a property of FileChooser to a parameter of the existing show*Dialog methods, and a new FileChooser.showOpenDirectoryDialog(Window) method added.

      For the time being we are accessing the Glass method CommonDialogs.showFolderChooser directly, but that is obviously not very comfortable.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              lnerad Ľubomír Nerád
              Reporter:
              emcmanuswse Eamonn McManus (Inactive)
              Votes:
              5 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported: