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

Hebrew and Arabic diacritical marks can not be edited in JTextComponents

    XMLWordPrintable

Details

    • x86
    • generic, windows_nt

    Description

      Name: jbT81659 Date: 11/17/99

      To reproduce this bug for Arabic:
      Compile and run the following code
      Use space bar to move any character with diacritical mark to the right.
      Note that diacritical mark does not move
      Highlight diacritical mark and try to delete it.
      Note it does not delete
      note that highlighting is not correct where not all the diactric mark is highlighted each time
      you highlight just one mark
      Try to copy diacritical mark using CTRL+C
      Note it is not copied


      ---Arabic example code------
      /* Copyright (c) Sun Microsystems 1998

      $Header: /home/sun/src/JDK1.2/jarab_tashkeel.java,v 1.6 1999/10/13 10:52:05 isam Exp $

      */

      import javax.swing.*;
      import java.awt.*;
      import java.awt.event.*;

      public class jarab_tashkeel extends JApplet
      {

              public void init()
              {
                      jarabtashkeel tashkeel = new jarabtashkeel();
                      getContentPane().add(tashkeel);
              }

              public static void main(String[] argv)
              {

                      JFrame frame = new JFrame("\u0645\u062b\u0627\u0644");
                      frame.setContentPane(new jarabtashkeel());
                      frame.pack();
                      frame.setFont(new Font("Lucida Sans Regular",Font.PLAIN,22));
                      frame.setVisible(true);
                      frame.setSize(600,6400);
              }

      }


      class jarabtashkeel extends JPanel
      {

              JTextArea tA1,tA2,tA3,tA4;
              
              public jarabtashkeel()
              {

                      this.setLayout(new GridLayout(10,1));
              
                      JTextArea tA1 = new JTextArea();
                      tA1.setText("\u0642\u064e\u0644\u064e\u0645\u064c\u0020\u0648\u064e\u0020\u062f\u064e\u0641\u0652\u062a\u064e\u0631\u064e\u064a\u0652\u0646\u0650\u0020");
                      tA1.setFont(new Font("Lucida Sans Regular",Font.PLAIN,18));

                      JTextArea tA2 = new JTextArea();
                      tA2.setText("\u0625\u0650\u0646\u0651\u064e\u0020\u0627\u0644\u0642\u0650\u0637\u0651\u064e\u0020\u0623\u064e\u0628\u0652\u064a\u064e\u0636\u064c");
                      tA2.setFont(new Font("Lucida Sans Regular",Font.PLAIN,18));

                      JTextArea tA3 = new JTextArea();
                      tA3.setText("\u0628\u0650\u0646\u0652\u062a\u0627\u0646\u064d");
                      tA3.setFont(new Font("Lucida Sans Regular",Font.PLAIN,18));

                      JTextArea tA4 = new JTextArea();
                      tA4.setText("\u062b\u064e\u0644\u0652\u062c\u064e\u0627\u064b\u0020\u0648\u064e\u0020\u0645\u064e\u0637\u064e\u0631\u064e\u0627\u064b");
                      tA4.setFont(new Font("Lucida Sans Regular",Font.PLAIN,18));

                      add(tA1);
                      add(tA2);
                      add(tA3);
                      add(tA4);
              }
      }

      -------------------
      To reproduce bug in Hebrew text:
      Compile and run the following example
      follow same steps as for Arabic testing

      ------Hebrew Code -------------------------
      import javax.swing.*;
      import java.awt.*;

      public class jTaame_hamekra extends JApplet
      {
              public void init()
              {
                      jtaame taame = new jtaame();
                      getContentPane().add(taame);
              }

              public static void main(String[] argv)
              {
                      JFrame frame = new JFrame("\u0645\u062b\u0627\u0644");
                      frame.setContentPane(new jtaame());
                      frame.pack();
                      frame.setSize(400,400);
                      frame.setFont(new Font("Lucida Sans Regular",Font.PLAIN,22));
                      frame.setVisible(true);
              }

      }

      class jtaame extends JPanel
      {
             JTextField label1,label2,label3,label4,label5,label6;

                      public jtaame()
                      {
                      this.setLayout(new GridLayout(10,1));
              
                              label1=new JTextField("\u05ad\u05d1\u05bc\u05b0\u05e0\u05b4\u05d9\u0020\u05d0\u05b4\u05dd\u05be\u05ea\u05bc\u05b4\u05b7\u05e7\u05bc\u05a3\u05d7\u0020\u05d0\u05b2\u05de\u05b8\u05e8\u05b8\u0591\u05d9\u05c3");
                              label1.setFont(new Font("Lucida Sans regular",Font.PLAIN,28));
                             add(label1);
              
                              label2=new JTextField("\u05d5\u05bc\u059d\u05de\u05b4\u05e6\u05b0\u05d5\u05c2\u05ea\u05b7\u0597\u05d9\u0020\u05ea\u05bc\u05b4\u05e6\u05b0\u05e4\u05bc\u05b9\u05a5\u05df\u0020\u05d0\u05b4\u05ea\u05bc\u05b8\u05bd\u05da\u05b0\u05c3");
                              label2.setFont(new Font("Lucida Sans regular",Font.PLAIN,28));
                              add(label2);
              
                              label3=new JTextField("\u05dc\u05b0\u05d4\u05b7\u05e7\u05b0\u05e9\u05c1\u05b4\u05a3\u05d9\u05d1\u0020\u05dc\u05b7\u05bd\u05d7\u05b8\u05db\u05b0\u05de\u05b8\u05a3\u05d4\u0020\u05d0\u05b8\u05d6\u05b0\u05e0\u05b6\u0591\u05da\u05b8\u05c3");
                              label3.setFont(new Font("Lucida Sans regular",Font.PLAIN,28));
                              add(label3);
              
                              label4=new JTextField("\u05ea\u05bc\u05b7\u05d8\u05bc\u05b6\u05a5\u05d4\u0020\u05dc\u05b4\u059c\u05d1\u05bc\u05b0\u05da\u05b8\u0597\u0020\u05dc\u05b7\u05ea\u05bc\u05b0\u05d1\u05d5\u05b9\u05e0\u05bd\u05b8\u05d4\u05c3");
                              label4.setFont(new Font("Lucida Sans regular",Font.PLAIN,28));
                              add(label4);
              
                              label5=new JTextField("\u05db\u05bc\u05b4\u05a4\u05d9\u0020\u05d0\u05b4\u05a3\u05dd\u0020\u05dc\u05d1\u05bc\u05b4\u05d9\u05e0\u05b8\u05a3\u05d4\u0020\u05ea\u05b4\u05e7\u05b0\u05e8\u05b8\u0591\u05d0");
                              label5.setFont(new Font("Lucida Sans regular",Font.PLAIN,28));
                              add(label5);
              
                              label6=new JTextField("\u05dc\u05b7\u059d\u05ea\u05bc\u05b0\u05d1\u05d5\u05b9\u05e0\u05b8\u0597\u05d4\u0020\u05ea\u05bc\u05b4\u05ea\u05bc\u05b5\u05a5\u05df\u0020\u05e7\u05d5\u05b7\u05dc\u05b6\u05bd\u05da\u05b8\u05c3");
                              label6.setFont(new Font("Lucida Sans regular",Font.PLAIN,28));
                              add(label6);
              
              
              
                      }

      }



      WorkAround:
      ======================================================================

      Attachments

        Activity

          People

            peterz Peter Zhelezniakov
            jbenavrasunw Jonathan Benavraham (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Imported:
              Indexed: