JFileChooser details view chops off text

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 1.4.1
    • Affects Version/s: 1.4.0
    • Component/s: client-libs
    • hopper
    • generic
    • generic



      Name: jk109818 Date: 12/10/2001


      java version "1.4.0-beta3"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta3-b84)
      Java HotSpot(TM) Client VM (build 1.4.0-beta3-b84, mixed mode)

      The JFileChooser details view does not consider the font size in
      determining row height, for both Metal and Windows L&Fs. For large
      fonts, the text will be chopped off and unreadable. On my system,
      the top of the file icon is chopped off at any font size.
      Example code follows.


         import javax.swing.*;
         import java.util.Enumeration;
         import java.awt.Font;
         import javax.swing.plaf.FontUIResource;

         public class JFileChooserBug {
         
            public static void main(String args[]) {
               setFonts();
               JFileChooser fc = new JFileChooser();
               fc.showOpenDialog(null);
            }
         
            public static void setFonts() {
               UIDefaults defaults = UIManager.getDefaults();
               Enumeration keys = defaults.keys();
               while(keys.hasMoreElements()) {
                  Object key = keys.nextElement();
                  if(defaults.get(key) instanceof Font)
                     UIManager.put(key, new FontUIResource(new Font("Courier",
      Font.BOLD, 30)));
               }
            }
         }
      (Review ID: 136635)
      ======================================================================

            Assignee:
            Konstantin Eremin (Inactive)
            Reporter:
            Jeffrey Kim (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: