JDK-4065241 : Cannot set Chinese characters in TextArea and TextField constructors
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt:i18n
  • Affected Version: 1.1.3,1.1.4,1.2.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_2.5.1,windows_95
  • CPU: x86,sparc
  • Submitted: 1997-07-17
  • Updated: 1998-03-19
  • Resolved: 1998-03-19
Related Reports
Duplicate :  
Description

Name: rlT66838			Date: 07/16/97


// Try this little application.
// Get chinese text in Label but not TextField and
// TextArea.
// I though this problem was solved in jdk1.1.3

import java.awt.*;

class test
{
  public static void main(String args[])
    {
      new hello();
    }
}

class hello extends Frame
{
  public hello()
    {
      super( "Test chinese Characters"  );
      setLayout( new FlowLayout() );
      Font f = new Font("Serif",Font.PLAIN,18);

      Label label = new Label("\u51db \u51db");
      label.setFont(f);
      add(label);
      
      TextField field = new TextField("\u51db \u51db");
      field.setFont(f);
      add(field);

      TextArea area = new TextArea("\u51db \u51db");
      area.setFont(f);
      add(area);

      setSize( 600,300 );				
      setResizable( true );
      setVisible( true );
    }
}


======================================================================
This is a duplicate bug
cindy.jao@eng 1998-03-19

Comments
WORK AROUND Name: rlT66838 Date: 07/16/97 I needed a read-only TextArea so I created a CommentBox class that uses Labels to implement a TextArea like object. ======================================================================
11-06-2004