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

Cannot display some strings in JTextField in RTL component orientation.

    XMLWordPrintable

    Details

      Description

      ======================================================================

      Name: rmT116609 Date: 08/22/2001


      java version "1.3.1"

      One can't enter the following text in JTextField: letter, symbol, digit.
      Try to enter the following strings into the JTextField and you can see that
      it's impossible(you get them converted, no metter in what order you enter the
      letters):

      1/a
      1@a
      1 a

      etc...
      -----------------------------------------
      The source:

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

      public class ComponentOrientationTest extends JPanel
      {
      public ComponentOrientationTest()
      {
      JPanel panel = new JPanel();
      JTextField field = new JTextField(5);

           field.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);

      panel.add(new JLabel("input:"));
      panel.add(field);
      add(panel);

      }

              public static void main(String[] args)
      {
                      JFrame frame= new JFrame("ComponentOrientationTest");
      ComponentOrientationTest test = new ComponentOrientationTest();
                      frame.getContentPane().add(test);
                      frame.pack();
                      frame.show();
              }
      }
      (Review ID: 130281)
      ======================================================================

        Attachments

          Activity

            People

            Assignee:
            peterz Peter Zhelezniakov
            Reporter:
            peytoia Yuka Kamiya (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Imported:
              Indexed: