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

In Win32, we can not change a List's font correctly.

    Details

    • Subcomponent:
    • Resolved In Build:
      1.2fcs
    • CPU:
      x86
    • OS:
      windows_95
    • Verification:
      Not verified

      Description

      JDK Version: 1.2beta3-L
      OS: Windows 95 + WinNT
      Locale: ALL

      This bug is not an i18n one.

      In win95, we can not change a list font correctly. Following is a program
      to show this problem. In solaris, it works well.
      ===========================CheckFont.java=================================
      import java.awt.*;
      import java.awt.event.*;

      public class CheckFont implements ItemListener {
          Choice choice;
      List list;
      Frame f;
      public static void main(String args[]) {
      new CheckFont();
      }

      public CheckFont() {
      f = new Frame("Check Font");
      f.setLayout(new BorderLayout());
      choice = new Choice();
      choice.add("12");
      choice.add("18");
      choice.add("32");
      choice.add("48");
      choice.add("64");
      choice.addItemListener(this);
      list = new List(10);
      for (int i = 0; i < 10; i++) {
      list.add("My Number is " + i);
      }
      f.add("North", choice);
      f.add("Center", list);
      f.pack();
      f.setVisible(true);
      //f.setResizable(false);
      }

      public void itemStateChanged(ItemEvent e) {
      int size = Integer.parseInt(choice.getSelectedItem());
      Font font = new Font("Dialog", Font.PLAIN, size);
      list.setFont(font);
      list.invalidate();
      f.pack();
      }

      }
      ===========================================================================


      jim.hu@prc 1998-03-12

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ehawkessunw Eric Hawkes (Inactive)
                Reporter:
                jhusunw Jim Hu (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: