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

Not all JTextFields are displayed under Solaris 8 Arabic Locale

    XMLWordPrintable

Details

    • beta2
    • sparc
    • solaris_8
    • Verified

    Description



      Name: jbT81659 Date: 07/17/2001

      OS: Solaris Sparc 8, Arabic locale
      JDK: jdk1.4.0-b71 BetaRefresh
      application: jTextField


      Only one JTextField is displayed when application is executed under Solaris Sparc 8.
      Clicking the tab or mouse on the frame causes the other JTextFields to display.
      This behavior is noticed under Solaris Sparc 8 only. I could not reproduce under
      any other platform.

      To reproduce this bug:
      1- Compile and run the following code under Solaris Sparc 8 "Ar" locale
      2- Note that only one JTextField is displayed in the frame
      3- Press the TAB button on the keyboard.
      4- Note the next JTextField is displayed
      5- Press the TAB button untill all JTextFields are displayed in the frame.
      6- Close the application the execute it again
      7- Note that only one JTextFiels is displayed
      8- Use the mouse to click anywhere inside the Frame
      9- Note that the JTextField underneath the mouse is displayed

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

      $Header: /home-bazelet/sun/src/javaLab/JDK1.4/standard/jTextField.java,v 1.1.1.1 2001/06/19 15:01:31 isam Exp $

      */

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

      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);
              frame.addWindowListener( new WindowAdapter()
              {
                   public void windowClosing( WindowEvent e)
                   {
                       System.exit(0);
                   }
              });

              }
      }
      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);
              }
      }
      ------------------------
      ======================================================================

      Attachments

        Activity

          People

            shickeysunw Shannon Hickey (Inactive)
            jbenavrasunw Jonathan Benavraham (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: