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

JFileChooser Windows Look & Feel is not consistent with the native platform



    • Subcomponent:
    • CPU:
    • OS:
      windows_nt, windows_xp


      Using JDK 1.4 beta 54 on Windows NT 4.0
      These bugs all apply to JFileChooser when using the Windows Look and Feel:

      1) The size and layout of the JFileChooser dialog does not exactly match the
      native dialog. (See bug 4268204.)
        A)The larger dialog makes the 4 toolbar buttons in the upper right
          too big.
        B)The "Look In" and "Files of Type" comboboxes are too tall.

      2) The 4 button icons in upper right are different from the standard Windows
        A) They should be toggle buttons and not push buttons.
        B) Should not be able to receive keyboard focus.

      3) Enter does not work in the List or Details mode:
        A)In List mode Enter does not open the selected directory or return a file.
        B)In Details mode the focus skips to the next available directory or file.
       The Windows behavior for a selected directory & file is to go into directory
       and display the contents or return the selected file.

      4) Using the Tab key to navigate thru JFileChooser doesn't work properly:
        A)In Details mode, when focus is in the list, hitting the Tab key seems to
         invisibly send focus to the next cell in the table, rather than to the
         filename textfield.
        B)In both List and Details mode if focus is in the "file name" field, and
          you press Shift-Tab to move focus to the list, there is no visual
          indicator that the list has focus, either in List mode or Details mode.

      5) Shortcuts don't work:
        A) If you double-click on a shortcut to a directory, the dialog closes,
           and the shortcut itself (the .lnk file) is returned. Shortcuts to both
           files and folders should be handled correctly.

      6) The list in Details mode doesn't show a dashed rectangle around the
         selected item.

      7) In "list" mode, the highlighting of the selected file is different
         - the native dialog highlights only the file name with the blue
         background, and darken the icon.

      8) In the native dialog, the Open/Save and Cancel buttons don't have tooltips.
        The Look In dropdown does - it shows the full path of the directory you're
        currently viewing.

      9) Is probably an RFE
          The right mouse button brings up a menu of useful commands when you click
          on a file in the native dialog, but it does nothing in JFileChooser.

      There is a simple testcase in the attachments that show all these issues.


          Issue Links



              loneid Leonid Popov (Inactive)
              atongschsunw Albert Tong-schmidt (Inactive)
              0 Vote for this issue
              1 Start watching this issue