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

JFileChooser doesn't offer validation

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • 6
    • 6
    • client-libs

      RFE Description : JFileChooser doesn't offer validation, which is available in native Filechooser's.

      Steps to reproduce:
      1.Install jdk1.6.0
      2.Launch FileChooser Demo
      3.Select "Save" option and "Windows" L/F
      4.Click "Show File Chooser" button

      Save dialog will open up in "FileName" text field enter a file name with absolute path,the path should not exist(enter invalid drive location) and click "Save" button,

      Expected behavior : it should report error message ,displaying invalid location or location cannot exist.
      Actual Behavior : but validation is not happening

      Option available to application developer is a workaround
      User have to create a subclass of JFileChooser and override the
      method approveSelection() and perform validation test there,
      and then User can show an error dialog (using JOptionPane), or if
      everything is okay then just call super.approveSelection().

      when same in implemented in JFileChooser User will not have to override any method,it will be easy for User to use it.

      ###@###.### 2005-04-05 11:06:59 GMT

            shickeysunw Shannon Hickey (Inactive)
            schandarsunw Suresh Chandar (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: