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

FileDialog objects don't allow directory AND files selection simultaneously

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 7
    • Fix Version/s: tbd
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
    • CPU:
      x86
    • OS:
      linux

      Description

      A DESCRIPTION OF THE REQUEST :
      The native file chooser only allows file selection making it useless for apps that need to import many files at once (or even just a directory).

      I don't know the history of the limitation; though it must exist, since it's unnatural, but i request that it be reviewed: all platforms java supports allow the native file choser to select directories (and both directories and files at the same time).

      JUSTIFICATION :
      Because JFileChooser is broken in contrast with the native file choosers. Because it is much slower. Because it slows down classloading for the whole application. And because most of it's functions could be done by a FileDialog that accepted both files and directories, with maybe a filefilter optional.


      CUSTOMER SUBMITTED WORKAROUND :
      Use one of the many, many buggy, non portable jni libraries that expose or attempt recreate the moving target that is the native filechooser in pure swing
      eg:
      http://code.google.com/p/gtkjfilechooser/ (currently broken in java7)
      http://code.google.com/p/xfiledialog/ (windows only, jni, ironic since i suspect the original motivation for the limitation was inadequate windows API)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                serb Sergey Bylokhov
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Imported:
                  Indexed: