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

MenuItem accelerators display CTRL in a German Locale instead of STRG.

XMLWordPrintable

    • x86_64
    • generic

      ADDITIONAL SYSTEM INFORMATION :
      Windows 10, Java 1.8.0_171

      A DESCRIPTION OF THE PROBLEM :
      When attempting to add accelerators in a JavaFX MenuItem object so that the user can use the CTRL+N keys to open a new document where the application is configured for German the label beside the MenuItem text shows "CTRL+N" and not "STRG+N". There also does not seem to be a method to allow the developer to manually change the text displayed.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Create a menu item and set the accelerator with a KeyCombination.keyCombination("CTRL+N").
      Set the Locale.setDefault(Locale.German) or Locale.setDefault(Locale.Germany).
      Run the application and see that the menu item's accelerator is CTRL+N and not STRG+N as it should be for a German Locale.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      I would expect that instead of CTRL+N I would see STRG+N.
      ACTUAL -
      CTRL+N

      CUSTOMER SUBMITTED WORKAROUND :
      No workaround available as the methods that allow access to the text are private or protected and cannot be accessed from the main application.

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: