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

FileSystemView.getSystemIcon() retrieves incorrect icons with high DPIs

XMLWordPrintable

      FULL PRODUCT VERSION :
      JRE version 1.6.0_11 Java HotSpot(TM) Client VM

      ADDITIONAL OS VERSION INFORMATION :
      Windows Vista (any)
      WindowsXP (any)

      A DESCRIPTION OF THE PROBLEM :
      javax.swing.filechooser.FileSystemView.getSystemIcon() retrieves incorrect icons with non-standard high DPIs (i.e. higher than 96).
      Icons for files and directories are slightly enlarged, then clipped to their original size. As a result, the bottoms and right sides are cut off, and they look terrible.

      This bug was first reported here: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5025450

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      You can reproduce this bug in the FileChooserDemo by doing two things:

      1) Set a different DPI value in the Personalization control panel for Windows Vista. Choose "Adjust font size (DPI)" and then choose 120 DPI.

      2) Use the Windows Look and Feel. The FileChooserDemo uses the default look and feel, which doesn't use the windows icons. Add code to use the platform's look and feel, and you'll see this bug.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Icons are displayed normally.
      ACTUAL -
      Icons are expanded and clipped to fit the 16x16 size.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      There is a workaround for WindowsXP: retrieve a larger icon using ShellFolder and then rescale it to 16x16.

      However, this doesn't work on Vista.

            Unassigned Unassigned
            igor Igor Nekrestyanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: