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

New folder created in JFileChoosers can't be renamed in applet

XMLWordPrintable

      FULL PRODUCT VERSION :
      java version "1.6.0_06"
      Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
      Java HotSpot(TM) Client VM (build 10.0-b22, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]

      A DESCRIPTION OF THE PROBLEM :
      When a JFileChooser is instantiated from my (signed) applet and create a new folder via the "new folder" button, it's impossible to change its name from the default "New folder". When I run the same code as an application, everything works fine.

      Under Linux the applet works as expected.
      It still worked under Windows with JRE 1.6.0_03 and stopped working with JRE 1.6.0_04.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Compile and run my testing code below.

      When I put it in a jar, sign it and run it from a html page in Internet Explorer or Firefox under Windows, I can't rename newly created folders. When run as an application via the main method, everything works fine.
      When run under Linux, everything works fine no matter if I run it as an applet or as an application.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Newly created folder should be renamed
      ACTUAL -
      default value "New Folder" can't be overwritten, pressing "enter" or "escape" has no effect

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import javax.swing.*;

      public class Test extends JApplet
      {
      public void start()
      {
      JFileChooser c = new JFileChooser();
      c.showSaveDialog(null);
      }

      public static void main(String [] args)
      {
      Test a = new Test();
      a.init();
      a.start();
      }
      }

      ---------- END SOURCE ----------

      Release Regression From : 6u3
      The above release value was the last known release where this
      bug was not reproducible. Since then there has been a regression.

            Unassigned Unassigned
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: