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

ComponentOrientation:JOptionPane's focus traversal does not respect RTL.

XMLWordPrintable

    • b43
    • generic
    • generic
    • Verified

      JOptionPane's focus traversal in RIGHT_TO_LEFT orientation does not traverse in that manner. The following program demonstrates this. Further, a bug was filed in the past regarding this problem, but the problem didn't seemed to be fixed unless the fix was specific to a particular locale platform in order for the fix to work. See bug# 4419914. Tried the sample program in this bug on the build which was stated to have the fix in it and bug is still present.

      ----------------------------- Cut Here ---------------------------
      import javax.swing.*;
      import java.awt.*;

      public class SimpleTest extends JFrame {

          private JOptionPane pane;

          public static void main(String[] args) {
              new SimpleTest();
          }

          public SimpleTest() {
              this.applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);

      /* pane = new JOptionPane();
              pane.applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
              pane.showConfirmDialog(this, "Yo"); */
              JOptionPane.showConfirmDialog(this, "Hello");

              setSize(200, 200);
              show();
          }
      }

      ----------------------------- Cut Here ---------------------------

      ###@###.### 2002-12-0

            peytoia Yuka Kamiya (Inactive)
            elousunw Edmund Lou (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: