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

Some of initial character does not display on Motif AWT Choice

    Details

    • Subcomponent:
    • CPU:
      sparc
    • OS:
      linux, solaris_2.5.1

      Description

      OPERATING SYSTEM(S):
      Red Hat Enterprise Linux AS release 4 (Nahant Update 2)

      FULL JDK VERSION(S):
      $ java -version
      java version "1.5.0_07"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
      Java HotSpot(TM) Client VM (build 1.5.0_07-b03, mixed mode)

      DESCRIPTION:
      Some of initial character does not display on Motif AWT Choice.
      Then following warning message:
      ------------------------------------------------------------
      Warning:
          Name: Text
          Class: XmTextField
          Character 'xx' not supported in font. Discarded.
      ------------------------------------------------------------
      But when I select one of choice item, full characters are displayed.

      Test instruction is as follows:
      1. Login with Japanese UTF-8 locale via GDM
      2. Open gnome-terminal and compile and run ChoiceFontTest
         $ javac ChoiceFontTest.java
         $ AWT_TOOLKIT=MToolkit java ChoiceFontTest
      3. Select one of choice item which has Japanese characters,
         then press "Create" button
      4. Another choice window is displayed, but it does not have 16 characters.
         Following warning message is displayed
         ------------------------------------------------------------
         Warning:
             Name: Text
             Class: XmTextField
             Character 'xx' not supported in font. Discarded.
         ------------------------------------------------------------
      5. On this window, select choice item.
         Then 16 characters are displayed

      ============================================================
      import java.awt.*;
      import java.awt.event.*;

      class ChoiceFontTest extends Frame implements ActionListener {
          Choice choice;
          ChoiceFontTest() {
      choice = new Choice();
      setLayout(new FlowLayout());
      add(choice);
      choice.add("Item");
      choice.add("\u4e9c\u5516\u5a03\u963f\u54c0\u611b\u6328\u59f6\u9022\u8475\u831c\u7a50\u60aa\u63e1\u6e25\u65ed");
      choice.add("\u9662\u9670\u96a0\u97fb\u540b\u53f3\u5b87\u70cf\u7fbd\u8fc2\u96e8\u536f\u9d5c\u7aba\u4e11\u7893");
      choice.add("\u62bc\u65fa\u6a2a\u6b27\u6bb4\u738b\u7fc1\u8956\u9d2c\u9d0e\u9ec4\u5ca1\u6c96\u837b\u5104\u5c4b");
      choice.add("\u9b41\u6666\u68b0\u6d77\u7070\u754c\u7686\u7d75\u82a5\u87f9\u958b\u968e\u8c9d\u51f1\u52be\u5916");
      Button btn = new Button("Create");
      add(btn);
      btn.addActionListener(this);
              pack();
              setVisible(true);
          }
          public void actionPerformed(ActionEvent e) {
              Frame subframe = new Frame();
              Choice subchoice = new Choice();
      subframe.add(subchoice);
      subchoice.add(choice.getSelectedItem());
              subframe.pack();
              subframe.addWindowListener(new WindowAdapter() {
                  public void windowClosing(WindowEvent e) { e.getWindow().dispose(); }
              });
              subframe.setVisible(true);
          }
          static public void main(String[] args) {
              ChoiceFontTest f = new ChoiceFontTest();
              f.addWindowListener(new WindowAdapter() {
                  public void windowClosing(WindowEvent e) { System.exit(0); }
              });
          }
      }
      ============================================================

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                yan Yuri Nesterenko
                Reporter:
                elarsen Erik Larsen (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: