JDK-6790849 : need seperate message for label text of open button in both basic and metal LookAndFeel
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6u12
  • Priority: P4
  • Status: Closed
  • Resolution: Not an Issue
  • OS: windows
  • CPU: x86
  • Submitted: 2009-01-07
  • Updated: 2011-01-19
  • Resolved: 2009-06-23
Related Reports
Relates :  
Description
In Metal LookAndFeel, the open button of JFileChooser dialog should not have mnemonics. In Windows LookAndFeel, the open button of JFileChooser dialog should have mnemonics. In asian locales, unlike in western locales, the label text of the open button is sthing like "Open(O)" to display the option of mnemonic key.

Currently, in j2se/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic.properties, following two keys are used to display lable text of open button:
FileChooser.openButtonText=Open
FileChooser.directoryOpenButtonText=Open

In Asian locales (Chinese, Japanese, Korean), to make the label text shown correctly in metal look and feel(do not display (O)), the text should be "Open". While, to make the label text show correctly in windows look and feel, the text should be "Open(O)". So one key in basic.properties is not enough. 

The above two keys should also be in j2se/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal.properties. When the JFileChooser dialog is opened in metal look and feel, the button label text will be loaded from metal.properties, showing "Open". When the JFileChooser dialog is opened in windows look and feel, the button lable text will be loaded from basic.properties, showing "Open(O)".

Comments
EVALUATION According to Yuka, she can solve the CR. I assign the CR to her, and as she likes, she can merge the two CR into one.
07-01-2009