JDK-8002077 : Possible mnemonic issue on JFileChooser Save button on nimbus L&F
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 7u6,8
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2012-10-31
  • Updated: 2015-06-11
  • Resolved: 2012-12-04
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8
7u40Fixed 8 b68Fixed
Related Reports
Relates :  
Relates :  
Description
java -jar FileChooserDemo.jar
Look&Feel: Nimbus
Dialog Type: Save
The "Save" button is displayed as "Save(S)" in Asian locale (where Save has been translated). In English locale, it's displayed as "Save" with no underline under S. In European locales, the underlines are also not displayed.

On the same demo, if we test "Open" button, the mnemonic has underline added to "Open(O)" and works fine.

The resource file looks like this:

% grep FileChooser.saveButton.textAndMnemonic jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/*
basic_de.properties:FileChooser.saveButton.textAndMnemonic=&Speichern
basic_es.properties:FileChooser.saveButton.textAndMnemonic=&Guardar
basic_fr.properties:FileChooser.saveButton.textAndMnemonic=Enregi&strer
basic_it.properties:FileChooser.saveButton.textAndMnemonic=Sal&va
basic_ja.properties:FileChooser.saveButton.textAndMnemonic=\u4FDD\u5B58(&S)
basic_ko.properties:FileChooser.saveButton.textAndMnemonic=\uC800\uC7A5(&S)
basic.properties:FileChooser.saveButton.textAndMnemonic=&Save
basic_pt_BR.properties:FileChooser.saveButton.textAndMnemonic=&Salvar
basic_sv.properties:FileChooser.saveButton.textAndMnemonic=&Spara
basic_zh_CN.properties:FileChooser.saveButton.textAndMnemonic=\u4FDD\u5B58(&S)
basic_zh_TW.properties:FileChooser.saveButton.textAndMnemonic=\u5132\u5B58(&S)

% grep FileChooser.openButton.textAndMnemonic jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/*
basic_de.properties:FileChooser.openButton.textAndMnemonic=\u00D6&ffnen
basic_es.properties:FileChooser.openButton.textAndMnemonic=&Abrir
basic_fr.properties:FileChooser.openButton.textAndMnemonic=&Ouvrir
basic_it.properties:FileChooser.openButton.textAndMnemonic=&Apri
basic_ja.properties:FileChooser.openButton.textAndMnemonic=\u958B\u304F(&O)
basic_ko.properties:FileChooser.openButton.textAndMnemonic=\uC5F4\uAE30(&O)
basic.properties:FileChooser.openButton.textAndMnemonic=&Open
basic_pt_BR.properties:FileChooser.openButton.textAndMnemonic=A&brir
basic_sv.properties:FileChooser.openButton.textAndMnemonic=&\u00D6ppna
basic_zh_CN.properties:FileChooser.openButton.textAndMnemonic=\u6253\u5F00(&O)
basic_zh_TW.properties:FileChooser.openButton.textAndMnemonic=\u958B\u555F(&O)

Comments
The test has been added by fix JDK-8024413 Add tests for issues JDK-8002077 and JDK-7199708 See test/javax/swing/JFileChooser/8002077/bug8002077.java
16-09-2013

Verified using FileChooserDemo & b81
18-04-2013

The issue is that a mnemonic is not updated for the JFileChooser when contril buttons are changed. So the old mnemonic for OPEN_DIALOG type is used instead of the mnemonic for the SAVE_DIALOG type.
16-11-2012

the issue was introduced in 7u6
06-11-2012