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

Add more features to java.awt.FileDialog


    • Subcomponent:
    • CPU:
      generic, x86
    • OS:
      generic, windows_2000


      On nearly all platforms, JFileChoosers are a poor substitute for native file dialogs. They do not look very much like native file dialogs, and they have far less functionality. On Windows, for example, they offer many more views than a JFileChooser does, allow you to view the Properties window for a file, allow you to open a file in a selected application, display previews of images, and so on. They also have better handling of shortcuts, better handling of networked drives, etc. It is unlikely that JFileChooser will ever reproduce all of this functionality. For these reasons, many programs that otherwise are entirely Swing based still use FileDialog instead of JFileChooser.

      On the other hand, JFileChooser offers some important features that are not available in FileDialog: a "select folder" mode, multiple file selection, filtering of files, the ability to embed a custom component, etc.

      Some of these features would be difficult or impossible to implement, since native file dialogs do not provide the proper support. Others, however, are well supported by native file dialogs on all platforms, and there is no reason not to add them to FileDialog.

      At the very least, FileDialog should be enhanced to offer:

      1. A "select folder" mode
      2. Multiple file selection

      It also would be very nice to add

      3. Some mechanism for filtering files

      FileDialog already allows you to set a FilenameFilter, but it is ignored on most platforms, since it is incompatible with the way native file dialogs filter files. Native file dialogs do provide filtering mechanisms, however, and it would be nice if FileDialog could make use of them.

      FileDialog is widely used due to its many advantages over JFileChooser, and that will remain true for the foreseeable future. It therefore should be enhanced to add useful features wherever possible. It will probably never reproduce all the features of JFileChooser, but similarly, JFileChooser will never reproduce all the features of FileDialog. Both of them should be actively supported and updated.
      ###@###.### 2004-11-09 19:13:02 GMT
      CAP member is also interested in those new features request -

      Wish to have the ability to set a "View mode hint". As a developer of an image oriented software they naturally want the FileDialog to default to thumbnail view mode and not to "list view mode" as it does now.


          Issue Links



              • Assignee:
                rmandalasunw Ranjith Mandala (Inactive)
              • Votes:
                0 Vote for this issue
                3 Start watching this issue


                • Created: