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

JOptionPane confirm dialog buttons are not localized

    Details

    • Subcomponent:
    • Introduced In Version:
      11
    • CPU:
      x86_64
    • OS:
      windows_10

      Description

      ADDITIONAL SYSTEM INFORMATION :
      openjdk version "11" 2018-09-25
      OpenJDK Runtime Environment 18.9 (build 11+28)
      OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)

      A DESCRIPTION OF THE PROBLEM :
      The button labels in JOptionPane confirm dialogs with JOptionPane.YES_NO_OPTION are not localized. Tested with Locale.ITALY and Locale.GERMANY.

      REGRESSION : Last worked in version 10.0.1

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Compile and run the given code

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Buttons are labeled _S_i and _N_o
      ACTUAL -
      Buttons are labeled _Y_es and _N_o

      ---------- BEGIN SOURCE ----------
      package testcase.yesnooption;

      import java.util.Locale;
      import javax.swing.JOptionPane;

      public class MainApp {

          public static void main(final String[] args) {
              Locale.setDefault(Locale.ITALY);
              JOptionPane.showConfirmDialog(null, "Is this localized?", "Localized or not",
                      JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
          }
      }
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Use Java 8, 9 or 10

      FREQUENCY : always


        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                erikj Erik Joelsson
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: