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

Kestrel-T,RTL only JTextField Ctrl+Shift+O support is broken

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.3.0
    • Fix Version/s: None
    • Component/s: client-libs
    • Labels:

      Description



      Name: jbT81659 Date: 01/27/2000

      RTL only JTextField does not support Ctrl+Shift+O under windows2000

      To reproduce this bug:

      Compile and run attached code under Win98, Win95 or WinNT.

      Note that pressing Shift+Ctrl+O in the first TextField causes
      the RTL text to be displayed on the right end side of TextField
      or Left side as you press Ctrl+Shift+O again.

      Run the same application under Win2000.

      Note that Ctrl+Shift +O does not change component orientation for that
      TextField.

      Note that Ctrl+Shift+O works for the other TextFields in application
      where text is bidi.

      ---------------------Code-------------------------
      /* Copyright (c) Sun Microsystems 1998

      $Header: /home/sun/src/JDK1.2/jTextField.java,v 1.15 1999/12/08 13:52:53 isam Exp $

      */

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

      public class jTextField extends JApplet
      {
              public void init()
              {
                      textAAA text = new textAAA();
                      getContentPane().add(text);
              }
              public static void main(String[] argv)
              {
                      JFrame frame = new JFrame("\u0645\u062b\u0627\u0644");
                      frame.setContentPane(new textAAA());
                      frame.pack();
                      frame.setVisible(true);
              }
      }
      class textAAA extends JPanel
      {
              JTextField tf0,tf1,tf2,tf3,tf4,tf5,tf6,tf7,tf8,tf9,tf10;
              public textAAA()
              {
                      setLayout(new GridLayout(12,1));

                      JTextField tf0 = new JTextField(30);
                      tf0.setFont(new Font("Lucida Sans Regular",Font.PLAIN,14));
      tf0.setText("\u062a\u0641\u0627\u062d\u0020\u0623\u062d\u0645\u0631\u0020\u0643\u0628\u064a\u0631");
                      //tf0.setHorizontalAlignment(JTextField.LEFT);
                      add(tf0);

                      JTextField tf1 = new JTextField(30);
                      tf1.setFont(new Font("Lucida Sans Regular",Font.PLAIN,14));
      tf1.setText("\u0067\u062a\u0641\u0627\u062d\u0020\u0623\u062d\u0645\u0631\u0020\u0643\u0628\u064a\u0631");
                      tf1.setHorizontalAlignment(JTextField.RIGHT);

                      add(tf1);

                      JTextField tf2 = new JTextField(30);
                      tf2.setFont(new Font("Lucida Sans Regular",Font.PLAIN,14));
      tf2.setText("\u0648\u0644\u062f\u0020\u0635\u063a\u064a\u0631\u0020\u006c\u0069\u006d\u0065\u0020\u0069\u0073\u0020\u0067\u0072\u0065\u0065\u006e\u0020\u0648\u062c\u0645\u064a\u0644");
                      tf2.setHorizontalAlignment(JTextField.RIGHT);
                      add(tf2);

                      JTextField tf3 = new JTextField(30);
                      tf3.setFont(new Font("Lucida Sans Regular",Font.PLAIN,14));
      tf3.setText("\u0067\u0647\u0630\u0627\u0020\u064a\u0648\u0645\u0020\u0644\u0637\u064a\u0641\u0020\u05d6\u05d4\u0020\u05d9\u05d5\u05dd\u0020\u05e0\u05e2\u05d9\u05dd");
                      tf3.setHorizontalAlignment(JTextField.RIGHT);
                      add(tf3);

                      JTextField tf4 = new JTextField(30);
                      tf4.setFont(new Font("Lucida Sans Regular",Font.PLAIN,14));
      tf4.setText("\u05d6\u05d5\u0020\u05e9\u05e0\u05d4\u0020\u05d9\u05e4\u05d4");
                      tf4.setHorizontalAlignment(JTextField.LEFT);
                      add(tf4);

                      JTextField tf5 = new JTextField(30);
                      tf5.setFont(new Font("Lucida Sans Regular",Font.PLAIN,14));
      tf5.setText("\u05d6\u05d5\u0020\u05e9\u05e0\u05d4\u0020\u05d9\u05e4\u05d4\u0020\u0054\u0048\u0045\u0020\u0059\u0045\u0041\u0052\u0020\u0031\u0039\u0035\u0038");
                      tf5.setHorizontalAlignment(JTextField.CENTER);
                      add(tf5);

                      JTextField tf6 = new JTextField(30);
                      tf6.setFont(new Font("Lucida Sans Regular",Font.PLAIN,14));
      tf6.setText("\u05d7\u05d5\u05de\u05d5\u05e1\u0020\u0069\u0073\u0020\u0067\u0072\u0065\u0065\u006e\u0020\u05d9\u05e7\u05e8\u006c\u0069\u006d\u0065");
                      tf6.setHorizontalAlignment(JTextField.CENTER);
                      add(tf6);


                      JTextField tf7 = new JTextField(30);
                      tf7.setFont(new Font("Lucida Sans Regular",Font.PLAIN,14));
                      tf7.setHorizontalAlignment(JTextField.LEFT);
                      add(tf7);

                      JTextField tf8 = new JTextField(30);
                      tf8.setFont(new Font("Lucida Sans Regular",Font.PLAIN,14));
                      tf8.setHorizontalAlignment(JTextField.RIGHT);
                      add(tf8);
              }
      }


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

        Attachments

          Activity

            People

            Assignee:
            bcbeck Brian Beck (Inactive)
            Reporter:
            jbenavrasunw Jonathan Benavraham (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: