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

VISTA: Cannot copy ExtB character from Notepad to JTextArea

XMLWordPrintable

    • 6u3
    • x86
    • windows_xp, windows_vista

      OPERATING SYSTEM(S):
      --------------------
      Windows Vista Business


      Region and Language:
      --------------------
      Simplified Chinese


      FULL JDK VERSION(S):
      -------------------
      java version "1.6.0_03-ea"
      Java(TM) SE Runtime Environment (build 1.6.0_03-ea-b01)
      Java HotSpot(TM) Client VM (build 1.6.0_03-ea-b01, mixed mode)


      DESCRIPTION:
      ------------
      Problem:
      Can't copy ExtB character from Notepad to JTextArea component on Vista.

      Remark:
      1. This problem also occurs on the JTextField component.
      2. This problem doesn't occurs TextArea/TextField component.
      3. This problem doesn't occurs when copy ExtB character from JTextArea component to Notepad.


      STEPS TO REPRODUCE
      ------------------
      1. Open a Notepad, activate MS-IM and switch to Unicode code Input.
      2. Set focus on Notepad, type ExtB character: 'd840dc00'.
      3. Compile "javac showTextArea.java" and execute testcase "java showTextArea".
      4. Copy the ExtB character from Notepad.
      5. Paste the ExtB character in the JTextArea component.
         PROBLEM: The ExtB character can not be copied in the JTextArea.


      TEST CASES:
      -----------
      showTextArea.java
      -----------------
      import java.awt.*;
      import javax.swing.*;
      import java.awt.event.*;

      class showTextArea extends Frame {

          showTextArea() {
              
              WindowListener l = new WindowAdapter() {
                 public void windowClosing(WindowEvent e) {System.exit(0);}
              };
              addWindowListener(l);

          /*
          * Centre the frame on the screen
          */
          int width = 250;
          int height = 250;
          Dimension sz = Toolkit.getDefaultToolkit().getScreenSize();
          this.setBounds((sz.width - width)/2,(sz.height - height)/2,width,height);
         
          Panel p = new Panel();
          JTextArea ta = new JTextArea("SwingJTextAreaComponent",10,20);
          ta.setFocusable(true);
          ta.setLineWrap(true);

          p.add(ta);
          add(p);
          setSize(width, height);
          show();
          }

          static public void main(String[] args) {
              new showTextArea();
          }
      }

            denis Denis Fokin (Inactive)
            elarsen Erik Larsen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: