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

JTextfield display a squarebox at the end of string in ar locale

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.4.0
    • 1.4.0
    • client-libs
    • None
    • 2d
    • beta2
    • sparc
    • solaris_8

      run following test csse in ar locale, a squarebox is displayed at the end
      of text. (the original test case FontTest.java is attached to reproduce the
      problem in iw locale)

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

      public class Test3 extends JFrame {
          private static String testString = Locale.getDefault().getDisplayLanguage();
          Test3() {
             super("Test3");
             JTextField jtf = new JTextField(testString);

             Container container = getContentPane();
             container.setLayout(new BorderLayout());
             container.add(jtf, BorderLayout.CENTER);
             setSize(getPreferredSize());
             pack();
             setVisible(true);
          }

          public static void main(String[] args) {
      System.err.println("Locale: " + Locale.getDefault().toString());
      System.err.println("file.encoding: " + System.getProperty("file.encoding"));
             Test3 test3 = new Test3();
          }
      }

            dougfelt Doug Felt
            sherman Xueming Shen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: