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

FileDialog does not show file extention on Windows

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_xp

      Description



      Name: iaR10016 Date: 04/30/2003


      Filed By : J2SE-SQA [###@###.###
      JDK : JDK1.4.2-b21, JDK1.5.0-b05, JDK1.4.1, JDK1.4.0
      Platforms : Windows XP, Windows 2000
                       (not reproducible on Solaris sparc, Solaris x86, Linux systems)

      java.awt.FileDialog component does not show file extention in it's "FileName:" field if Windows Explorer
      "Hide file extension for known file types" property is set.

      Please, do the following steps to reproduce the failure:

      1. Set "Hide file extension for known file types" explorer property to "true" (for example, for Windows 2000
          in Windows Explorer window select "Tools" - "Folder options" - "View" and set "Hide file extension for
          known file types" switch checked if it was not)

      2. Compile and run the following test example:

      --------- test.java ---------
      import java.awt.*;
      public class test {
        public static void main(String[] args) {
           FileDialog aDialog = new FileDialog(new Frame());
           aDialog.setFile("aaaa.bbbb.cccc");
           aDialog.setVisible(true);
          }
      }
      -----------------------------

      This example creates FileDialog with "aaaa.bbbb.cccc" file name (please, note that "cccc" is not known file type
      on my Windows system!).

      When the dialog appers, the file name in the "File name:" field does not contain extention:
      it is "aaaa.bbbb", not "aaaa.bbbb.cccc" as expected.

      3. Try to select some existing files in the FileDialog files list. "File name:" field will not show extension
          for any of them.

      Specific machine info:
      ======================
      Hostname: linux-2
      OS: Windows 2000

      ======================================================================

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            irasunw Ira Ira (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: