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

[CCJK] Incorrect mnemonic key (0) is displayed on cancel button on messagedialog of JOptionPane

    Details

    • Subcomponent:
    • Resolved In Build:
      b141
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Description

      In src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_xx.properties for CCJK, for exmaple basic_zh_CN.properties, following messages are not correct.

      OptionPane.cancelButtonText : It has the mnemonic key (0) displayed.

      OptionPane.cancelButtonMnemonic=0 : The mnemonic key of cancel button should not be 0.

      messagedialog of JOptionpane is frequently used by many java programs to display simple message. The incorrect mnemonic on cancel button will be viewd frequently in CCJK.

      Attached is a snapshot of message dialog in zh_CN. The mnemonic key of cancel dialog is displayed as (0).

        Issue Links

          Activity

          Hide
          mfang Michael Fang (Inactive) added a comment -
          BT2:EVALUATION

          In the English basic.properties files, it has
          OptionPane.okButtonText=OK
          OptionPane.okButtonMnemonic=0
          OptionPane.cancelButtonText=Cancel
          OptionPane.cancelButtonMnemonic=0

          But on the comment it said it only defined mnemonics for yes and no. So, these "0" are "undefined".

          I will remove these labels on CCJK locales. To avoid the problem, I also need to comment out the following in English file:
          OptionPane.okButtonMnemonic=0
          OptionPane.cancelButtonMnemonic=0
          Show
          mfang Michael Fang (Inactive) added a comment - BT2:EVALUATION In the English basic.properties files, it has OptionPane.okButtonText=OK OptionPane.okButtonMnemonic=0 OptionPane.cancelButtonText=Cancel OptionPane.cancelButtonMnemonic=0 But on the comment it said it only defined mnemonics for yes and no. So, these "0" are "undefined". I will remove these labels on CCJK locales. To avoid the problem, I also need to comment out the following in English file: OptionPane.okButtonMnemonic=0 OptionPane.cancelButtonMnemonic=0

            People

            • Assignee:
              mfang Michael Fang (Inactive)
              Reporter:
              yhuang Yong Huang
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: