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

[macosx] Yes and No buttons are untranslated in JOptionPane on Japanese machine.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P3 P3
    • 9
    • 7u10, 9
    • client-libs

      FULL PRODUCT VERSION :
      Java Version: Java 1.7.0_10-b18

      ADDITIONAL OS VERSION INFORMATION :
      Mac OS X 10.7

      A DESCRIPTION OF THE PROBLEM :
      When JOptionPane is created with the JOptionPane.YES_NO_CANCEL_OPTION option on Mac with a Japanese locale, the 'yes' and 'no' buttons are untranslated.

      This seems to be the case in JVM 6 as well (did not test further back).

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      On a Mac with a Japanese locale (this seems to be reproducible on JVM 6 and 7), compile and run the attached example code.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      As on Windows, I expect the 'yes' and 'no' buttons to be translated - the 'cancel' button is translated.

       
      ACTUAL -
       The 'yes' and 'no' buttons are untranslated to Japanese, but 'cancel' button is translated.


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import javax.swing.JDialog;
      import javax.swing.JFrame;
      import javax.swing.JOptionPane;

      public class TestMJOptionPane {
          public static void main(String[] args) {

              JFrame frame = new JFrame();
              JOptionPane pane =
                      new JOptionPane( " First Argument " , JOptionPane.QUESTION_MESSAGE, JOptionPane.YES_NO_CANCEL_OPTION,
                              null,
                              null, null);

              pane.setComponentOrientation(frame.getComponentOrientation());

              JDialog dialog = pane.createDialog(frame, " title " );
              dialog.setVisible(true);
              dialog.dispose();
          }
      }

      ---------- END SOURCE ----------

            aniyogi Avik Niyogi (Inactive)
            webbuggrp Webbug Group
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: