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

JFileChooser and Win LAF: File list font too small to be readable on Win NT/98

XMLWordPrintable

    • b57
    • x86, itanium
    • windows_nt, windows_2003

      Open a JFileChooser under the Windows Look and Feel on Windows NT (running the Windows Standard scheme) and you'll see that the file list is in a font that is too small to be readable.

      More info from initial investigation into this problem:
      JFileChooser displays the file list using a font specified in the desktop properties as "FileChooser.listFont". Asking the UIManager for this font returns a font of size 8.

      FileChooser.listFont is populated with the value of the Windows desktop property "win.icon.font".

      In the Windows display properties, the setting for "Icon" under the Windows Standard scheme is in fact 8. So things seem to line up _at_first_. However, the "Menu" font setting is also 8 but when Java fetches "win.menu.font" we see a size of 11. In my experience, the menu case is the norm. In Swing, when we fetch a desktop property, we usually get back a font size somewhat larger then what appears in the Windows setting. I beleive this accounts for the difference between how Windows deals with font sizes and how Java does.

      SO, we should probably be getting back a font size of 11 for "Icon" too. And here's the kicker...if one manually edits the Windows display property for "Icon" and specifies 8 (thereby creating a custom scheme), then things work perfectly and 11 is returned to Java. So, there seems to be something wrong with fetching "Icon" from the default scheme.

      Perhaps we need to investigate the way that the "Icon" font is prepared. It is done so in a different manner than "Menu" in the Windows awt_DesktopProperties.cpp code.

            leifs Leif Samuelsson (Inactive)
            shickeysunw Shannon Hickey (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: