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

UI focus is not proper when the file name is longer in JFileChooser

    XMLWordPrintable

Details

    Description

      OPERATING SYSTEM(S):
      --------------------
      Windows XP

      FULL JDK VERSION(S):
      -------------------
      java version "1.6.0_04"
      Java(TM) SE Runtime Environment (build 1.6.0_04-b07)
      Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode)

      DESCRIPTION:
      ------------

      UI focus is not proper when the file name is longer in JFileChooser.

      Reproduction Instructions:

      1. Run the following java program to create folders with longer names.

      import java.io.File;
      import java.io.IOException;

      public class createFile {
      public static void main(String args[]) throws IOException{
      System.out.println("Hello...");
      File f = new File("C:\\tmp\\1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890\\1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890.1234567890");

      System.out.println(f.mkdirs());
      }
      }


      2. Run SwingSet2.jar
      3. Go to "FileChooser" demo.
      4. Click on "Show Plain JFileChooser"
      5. Select "C" drive & then select "tmp" then select the folder with
         long name created by above program
      6. Do F2 to rename this folder
      7. Press "End" button to move the cursor to the end of the above
         selected long folder.

      Observed result:
      We will not be able to see the cursor.

      Expected result:
      We should be able to see the cursor i.e folder/file should be scrolled in order to see the cursor. (Please compare the behaviour with file chooser of windows XP notepad application)

      Note: If we choose the "Detailed" view of the FileChooser then problem is not seen.

      Note: After doing F2 + end, If we use horizontal scrollbar to move right then we will be able to see the cursor at end

      Attachments

        Issue Links

          Activity

            People

              tr Tejesh R
              elarsen Erik Larsen (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Imported:
                Indexed: