changeset 5373:dd14c599e337

Merge
author andrew
date Wed, 17 Oct 2012 00:48:55 +0100
parents 06c648337d2b 0d904c4373d1
children d0062bc9fd99
files
diffstat 47 files changed, 601 insertions(+), 207 deletions(-) [+]
line wrap: on
line diff
--- a/src/macosx/classes/sun/lwawt/macosx/CPlatformResponder.java	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/macosx/classes/sun/lwawt/macosx/CPlatformResponder.java	Wed Oct 17 00:48:55 2012 +0100
@@ -134,7 +134,7 @@
         boolean postsTyped = false;
 
         char testChar = KeyEvent.CHAR_UNDEFINED;
-        char testDeadChar = 0;
+        boolean isDeadChar = (chars!= null && chars.length() == 0);
 
         if (isFlagsChangedEvent) {
             int[] in = new int[] {modifierFlags, keyCode};
@@ -150,14 +150,21 @@
                 testChar = chars.charAt(0);
             }
 
-            int[] in = new int[] {testChar, testDeadChar, modifierFlags, keyCode};
-            int[] out = new int[2]; // [jkeyCode, jkeyLocation]
+            int[] in = new int[] {testChar, isDeadChar ? 1 : 0, modifierFlags, keyCode};
+            int[] out = new int[3]; // [jkeyCode, jkeyLocation, deadChar]
 
             postsTyped = NSEvent.nsToJavaKeyInfo(in, out);
             if (!postsTyped) {
                 testChar = KeyEvent.CHAR_UNDEFINED;
             }
 
+            if(isDeadChar){
+                testChar = (char) out[2];
+                if(testChar == 0){
+                    return;
+                }
+            }
+
             jkeyCode = out[0];
             jkeyLocation = out[1];
             jeventType = isNpapiCallback ? NSEvent.npToJavaEventType(eventType) :
--- a/src/macosx/native/sun/awt/AWTEvent.m	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/macosx/native/sun/awt/AWTEvent.m	Wed Oct 17 00:48:55 2012 +0100
@@ -26,6 +26,7 @@
 #import <JavaNativeFoundation/JavaNativeFoundation.h>
 #import <JavaRuntimeSupport/JavaRuntimeSupport.h>
 #import <sys/time.h>
+#include <Carbon/Carbon.h>
 
 #import "LWCToolkit.h"
 #import "ThreadUtilities.h"
@@ -378,26 +379,68 @@
     return nsChar;
 }
 
+static unichar NsGetDeadKeyChar(unsigned short keyCode)
+{
+    TISInputSourceRef currentKeyboard = TISCopyCurrentKeyboardInputSource();
+    CFDataRef uchr = (CFDataRef)TISGetInputSourceProperty(currentKeyboard, kTISPropertyUnicodeKeyLayoutData);
+    if (uchr == nil) { return; }
+    const UCKeyboardLayout *keyboardLayout = (const UCKeyboardLayout*)CFDataGetBytePtr(uchr);
+    // Carbon modifiers should be used instead of NSEvent modifiers
+    UInt32 modifierKeyState = (GetCurrentEventKeyModifiers() >> 8) & 0xFF;
+
+    if (keyboardLayout) {
+        UInt32 deadKeyState = 0;
+        UniCharCount maxStringLength = 255;
+        UniCharCount actualStringLength = 0;
+        UniChar unicodeString[maxStringLength];
+
+        // get the deadKeyState
+        OSStatus status = UCKeyTranslate(keyboardLayout,
+                                         keyCode, kUCKeyActionDown, modifierKeyState,
+                                         LMGetKbdType(), kUCKeyTranslateNoDeadKeysBit,
+                                         &deadKeyState,
+                                         maxStringLength,
+                                         &actualStringLength, unicodeString);
+
+        if (status == noErr && deadKeyState != 0) {
+            // Press SPACE to get the dead key char
+            status = UCKeyTranslate(keyboardLayout,
+                                    kVK_Space, kUCKeyActionDown, 0,
+                                    LMGetKbdType(), 0,
+                                    &deadKeyState,
+                                    maxStringLength,
+                                    &actualStringLength, unicodeString);
+
+            if (status == noErr && actualStringLength > 0) {
+                return unicodeString[0];
+            }
+        }
+    }
+    return 0;
+}
+
 /*
  * This is the function that uses the table above to take incoming
  * NSEvent keyCodes and translate to the Java virtual key code.
  */
 static void
-NsCharToJavaVirtualKeyCode(unichar ch, unichar deadChar,
+NsCharToJavaVirtualKeyCode(unichar ch, BOOL isDeadChar,
                            NSUInteger flags, unsigned short key,
-                           jint *keyCode, jint *keyLocation, BOOL *postsTyped)
+                           jint *keyCode, jint *keyLocation, BOOL *postsTyped, unichar *deadChar)
 {
     static size_t size = sizeof(keyTable) / sizeof(struct _key);
     NSInteger offset;
 
-    if (deadChar) {
+    if (isDeadChar) {
+        unichar testDeadChar = NsGetDeadKeyChar(key);
         const struct CharToVKEntry *map;
         for (map = charToDeadVKTable; map->c != 0; ++map) {
-            if (deadChar == map->c) {
+            if (testDeadChar == map->c) {
                 *keyCode = map->javaKey;
                 *postsTyped = NO;
                 // TODO: use UNKNOWN here?
                 *keyLocation = java_awt_event_KeyEvent_KEY_LOCATION_UNKNOWN;
+                *deadChar = testDeadChar;
                 return;
             }
         }
@@ -521,18 +564,18 @@
     const struct _nsKeyToJavaModifier* cur;
 
     for (cur = nsKeyToJavaModifierTable; cur->nsMask != 0; ++cur) {
-        jint mask = isExtMods? cur->javaExtMask : cur->javaMask; 
+        jint mask = isExtMods? cur->javaExtMask : cur->javaMask;
         if ((mask & javaModifiers) != 0) {
             nsFlags |= cur->nsMask;
         }
     }
 
     // special case
-    jint mask = isExtMods? java_awt_event_InputEvent_ALT_GRAPH_DOWN_MASK : 
+    jint mask = isExtMods? java_awt_event_InputEvent_ALT_GRAPH_DOWN_MASK :
                            java_awt_event_InputEvent_ALT_GRAPH_MASK;
 
     if ((mask & javaModifiers) != 0) {
-        nsFlags |= NSAlternateKeyMask;      
+        nsFlags |= NSAlternateKeyMask;
     }
 
     return nsFlags;
@@ -691,14 +734,10 @@
         }
 
         javaModifiers = NsKeyModifiersToJavaModifiers([event modifierFlags], TRUE);
-        if (javaModifiers == 0) {
-      // TODO: dead key chars
-//            testDeadChar = GetDeadKeyCharacter(event);
-        }
 
-        NsCharToJavaVirtualKeyCode(testChar, testDeadChar,
+        NsCharToJavaVirtualKeyCode(testChar, NO,
                                    [event modifierFlags], [event keyCode],
-                                   &javaKeyCode, &javaKeyLocation, &postsTyped);
+                                   &javaKeyCode, &javaKeyLocation, &postsTyped, &testDeadChar);
         if( !postsTyped ) {
             testChar = java_awt_event_KeyEvent_CHAR_UNDEFINED;
         }
@@ -823,18 +862,14 @@
     unichar testChar, testDeadChar = 0;
     jint javaModifiers = NsKeyModifiersToJavaModifiers([nsEvent modifierFlags], TRUE);
 
-    if (javaModifiers == 0) {
-        testDeadChar = [nsEvent deadKeyCharacter];
-    }
-
     NSString *theChars = [nsEvent characters];
     unsigned i, stringLength = [theChars length];
 
     for (i = 0; i < stringLength; i++) {
         testChar = [theChars characterAtIndex:i];
-        NsCharToJavaVirtualKeyCode(testChar, testDeadChar,
+        NsCharToJavaVirtualKeyCode(testChar, NO,
                                    [nsEvent modifierFlags], [nsEvent keyCode],
-                                   &javaKeyCode, &javaKeyLocation, &postsTyped);
+                                   &javaKeyCode, &javaKeyLocation, &postsTyped, &testDeadChar);
 
         if (postsTyped) {
             // Some keys may generate a KEY_TYPED, but we can't determine
@@ -1042,23 +1077,25 @@
 
     // in  = [testChar, testDeadChar, modifierFlags, keyCode]
     jchar testChar = (jchar)data[0];
-    jchar testDeadChar = (jchar)data[1];
+    BOOL isDeadChar = (data[1] != 0);
     jint modifierFlags = data[2];
     jshort keyCode = (jshort)data[3];
 
     jint jkeyCode = java_awt_event_KeyEvent_VK_UNDEFINED;
     jint jkeyLocation = java_awt_event_KeyEvent_KEY_LOCATION_UNKNOWN;
+    jchar testDeadChar = 0;
 
-    NsCharToJavaVirtualKeyCode((unichar)testChar, (unichar)testDeadChar,
+    NsCharToJavaVirtualKeyCode((unichar)testChar, isDeadChar,
                                (NSUInteger)modifierFlags, (unsigned short)keyCode,
-                               &jkeyCode, &jkeyLocation, &postsTyped);
+                               &jkeyCode, &jkeyLocation, &postsTyped, &testDeadChar);
 
-    // out = [jkeyCode, jkeyLocation];
+    // out = [jkeyCode, jkeyLocation, deadKeyChar];
     (*env)->SetIntArrayRegion(env, outData, 0, 1, &jkeyCode);
     (*env)->SetIntArrayRegion(env, outData, 1, 1, &jkeyLocation);
-    
+    (*env)->SetIntArrayRegion(env, outData, 2, 1, (jint *)&testDeadChar);
+
     (*env)->ReleaseIntArrayElements(env, inData, data, 0);
-    
+
 JNF_COCOA_EXIT(env);
 
     return postsTyped;
@@ -1098,7 +1135,7 @@
     (*env)->SetIntArrayRegion(env, outData, 2, 1, &jkeyType);
 
     (*env)->ReleaseIntArrayElements(env, inData, data, 0);
-    
+
 JNF_COCOA_EXIT(env);
 }
 
@@ -1112,12 +1149,12 @@
 (JNIEnv *env, jclass cls, char nsChar, jint modifierFlags)
 {
     jchar javaChar = 0;
-    
+
 JNF_COCOA_ENTER(env);
-    
+
     javaChar = NsCharToJavaChar(nsChar, modifierFlags);
 
 JNF_COCOA_EXIT(env);
-    
+
     return javaChar;
 }
--- a/src/macosx/native/sun/awt/AWTView.m	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/macosx/native/sun/awt/AWTView.m	Wed Oct 17 00:48:55 2012 +0100
@@ -278,7 +278,10 @@
         return;
     }
 
-    if (![self hasMarkedText] && fKeyEventsNeeded) {
+    NSString *eventCharacters = [event characters];
+    BOOL isDeadKey = (eventCharacters != nil && [eventCharacters length] == 0);
+
+    if ((![self hasMarkedText] && fKeyEventsNeeded) || isDeadKey) {
         [self deliverJavaKeyEventHelper: event];
     }
 
--- a/src/share/classes/com/sun/java/swing/plaf/motif/MotifFileChooserUI.java	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/com/sun/java/swing/plaf/motif/MotifFileChooserUI.java	Wed Oct 17 00:48:55 2012 +0100
@@ -529,21 +529,25 @@
         Locale l = fc.getLocale();
 
         enterFolderNameLabelText = UIManager.getString("FileChooser.enterFolderNameLabelText",l);
-        enterFolderNameLabelMnemonic = UIManager.getInt("FileChooser.enterFolderNameLabelMnemonic");
+        enterFolderNameLabelMnemonic = getMnemonic("FileChooser.enterFolderNameLabelMnemonic", l);
         enterFileNameLabelText = UIManager.getString("FileChooser.enterFileNameLabelText",l);
-        enterFileNameLabelMnemonic = UIManager.getInt("FileChooser.enterFileNameLabelMnemonic");
+        enterFileNameLabelMnemonic = getMnemonic("FileChooser.enterFileNameLabelMnemonic", l);
 
         filesLabelText = UIManager.getString("FileChooser.filesLabelText",l);
-        filesLabelMnemonic = UIManager.getInt("FileChooser.filesLabelMnemonic");
+        filesLabelMnemonic = getMnemonic("FileChooser.filesLabelMnemonic", l);
 
         foldersLabelText = UIManager.getString("FileChooser.foldersLabelText",l);
-        foldersLabelMnemonic = UIManager.getInt("FileChooser.foldersLabelMnemonic");
+        foldersLabelMnemonic = getMnemonic("FileChooser.foldersLabelMnemonic", l);
 
         pathLabelText = UIManager.getString("FileChooser.pathLabelText",l);
-        pathLabelMnemonic = UIManager.getInt("FileChooser.pathLabelMnemonic");
+        pathLabelMnemonic = getMnemonic("FileChooser.pathLabelMnemonic", l);
 
         filterLabelText = UIManager.getString("FileChooser.filterLabelText",l);
-        filterLabelMnemonic = UIManager.getInt("FileChooser.filterLabelMnemonic");
+        filterLabelMnemonic = getMnemonic("FileChooser.filterLabelMnemonic", l);
+    }
+
+    private Integer getMnemonic(String key, Locale l) {
+        return SwingUtilities2.getUIDefaultsInt(key, l);
     }
 
     protected void installIcons(JFileChooser fc) {
--- a/src/share/classes/com/sun/java/swing/plaf/motif/MotifLookAndFeel.java	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/com/sun/java/swing/plaf/motif/MotifLookAndFeel.java	Wed Oct 17 00:48:55 2012 +0100
@@ -1215,11 +1215,6 @@
             "EditorPane.focusInputMap", multilineInputMap,
 
 
-            "FileChooser.pathLabelMnemonic", new Integer(KeyEvent.VK_P), // 'p'
-            "FileChooser.filterLabelMnemonic", new Integer (KeyEvent.VK_R), // 'r'
-            "FileChooser.foldersLabelMnemonic", new Integer (KeyEvent.VK_L), // 'l'
-            "FileChooser.filesLabelMnemonic", new Integer (KeyEvent.VK_I), // 'i'
-            "FileChooser.enterFileNameLabelMnemonic", new Integer (KeyEvent.VK_N), // 'n'
             "FileChooser.ancestorInputMap",
                new UIDefaults.LazyInputMap(new Object[] {
                      "ESCAPE", "cancelSelection"
--- a/src/share/classes/com/sun/java/swing/plaf/motif/resources/motif.properties	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/com/sun/java/swing/plaf/motif/resources/motif.properties	Wed Oct 17 00:48:55 2012 +0100
@@ -26,11 +26,11 @@
 FileChooser.openDialogTitle.textAndMnemonic=Open
 FileChooser.updateButton.textAndMnemonic=Update
 FileChooser.helpButton.textAndMnemonic=Help
-FileChooser.pathLabel.textAndMnemonic=Enter path or folder name:
-FileChooser.filterLabel.textAndMnemonic=Filter
-FileChooser.foldersLabel.textAndMnemonic=Folders
-FileChooser.filesLabel.textAndMnemonic=Files
-FileChooser.enterFileNameLabel.textAndMnemonic=Enter file name:
+FileChooser.pathLabel.textAndMnemonic=Enter &path or folder name:
+FileChooser.filterLabel.textAndMnemonic=Filte&r
+FileChooser.foldersLabel.textAndMnemonic=Fo&lders
+FileChooser.filesLabel.textAndMnemonic=F&iles
+FileChooser.enterFileNameLabel.textAndMnemonic=E&nter file name:
 FileChooser.enterFolderNameLabel.textAndMnemonic=Enter folder name:
 
 FileChooser.cancelButtonToolTip.textAndMnemonic=Abort file chooser dialog.
--- a/src/share/classes/com/sun/java/swing/plaf/motif/resources/motif_de.properties	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/com/sun/java/swing/plaf/motif/resources/motif_de.properties	Wed Oct 17 00:48:55 2012 +0100
@@ -26,11 +26,11 @@
 FileChooser.openDialogTitle.textAndMnemonic=\u00D6ffnen
 FileChooser.updateButton.textAndMnemonic=Aktualisieren
 FileChooser.helpButton.textAndMnemonic=Hilfe
-FileChooser.pathLabel.textAndMnemonic=Pfad- oder Ordnernamen eingeben:
-FileChooser.filterLabel.textAndMnemonic=Filter
-FileChooser.foldersLabel.textAndMnemonic=Ordner
-FileChooser.filesLabel.textAndMnemonic=Dateien
-FileChooser.enterFileNameLabel.textAndMnemonic=Dateinamen eingeben:
+FileChooser.pathLabel.textAndMnemonic=&Pfad- oder Ordnernamen eingeben:
+FileChooser.filterLabel.textAndMnemonic=Filte&r
+FileChooser.foldersLabel.textAndMnemonic=Ordner(&L)
+FileChooser.filesLabel.textAndMnemonic=Date&ien
+FileChooser.enterFileNameLabel.textAndMnemonic=Datei&namen eingeben:
 FileChooser.enterFolderNameLabel.textAndMnemonic=Ordnernamen eingeben:
 
 FileChooser.cancelButtonToolTip.textAndMnemonic=Dialogfeld f\u00FCr Dateiauswahl schlie\u00DFen.
--- a/src/share/classes/com/sun/java/swing/plaf/motif/resources/motif_es.properties	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/com/sun/java/swing/plaf/motif/resources/motif_es.properties	Wed Oct 17 00:48:55 2012 +0100
@@ -26,11 +26,11 @@
 FileChooser.openDialogTitle.textAndMnemonic=Abrir
 FileChooser.updateButton.textAndMnemonic=Actualizar
 FileChooser.helpButton.textAndMnemonic=Ayuda
-FileChooser.pathLabel.textAndMnemonic=Introducir nombre de la ruta de acceso o carpeta:
-FileChooser.filterLabel.textAndMnemonic=Filtro
-FileChooser.foldersLabel.textAndMnemonic=Carpetas
-FileChooser.filesLabel.textAndMnemonic=Archivos
-FileChooser.enterFileNameLabel.textAndMnemonic=Introducir nombre de archivo:
+FileChooser.pathLabel.textAndMnemonic=Introducir nombre de la ruta de acceso o car&peta:
+FileChooser.filterLabel.textAndMnemonic=Filt&ro
+FileChooser.foldersLabel.textAndMnemonic=Carpetas(&L)
+FileChooser.filesLabel.textAndMnemonic=Arch&ivos
+FileChooser.enterFileNameLabel.textAndMnemonic=I&ntroducir nombre de archivo:
 FileChooser.enterFolderNameLabel.textAndMnemonic=Introducir nombre de carpeta:
 
 FileChooser.cancelButtonToolTip.textAndMnemonic=Abortar cuadro de di\u00E1logo del selector de archivos.
--- a/src/share/classes/com/sun/java/swing/plaf/motif/resources/motif_fr.properties	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/com/sun/java/swing/plaf/motif/resources/motif_fr.properties	Wed Oct 17 00:48:55 2012 +0100
@@ -26,11 +26,11 @@
 FileChooser.openDialogTitle.textAndMnemonic=Ouvrir
 FileChooser.updateButton.textAndMnemonic=Mettre \u00E0 jour
 FileChooser.helpButton.textAndMnemonic=Aide
-FileChooser.pathLabel.textAndMnemonic=Entrez le chemin ou le nom du dossier :
-FileChooser.filterLabel.textAndMnemonic=Filtre
-FileChooser.foldersLabel.textAndMnemonic=Dossiers
-FileChooser.filesLabel.textAndMnemonic=Fichiers
-FileChooser.enterFileNameLabel.textAndMnemonic=Entrez le nom du fichier :
+FileChooser.pathLabel.textAndMnemonic=Entrez le chemin ou le nom du dossier (&P):
+FileChooser.filterLabel.textAndMnemonic=Filt&re
+FileChooser.foldersLabel.textAndMnemonic=Dossiers(&L)
+FileChooser.filesLabel.textAndMnemonic=Fich&iers
+FileChooser.enterFileNameLabel.textAndMnemonic=E&ntrez le nom du fichier :
 FileChooser.enterFolderNameLabel.textAndMnemonic=Entrez le nom du dossier :
 
 FileChooser.cancelButtonToolTip.textAndMnemonic=Ferme la bo\u00EEte de dialogue du s\u00E9lecteur de fichiers.
--- a/src/share/classes/com/sun/java/swing/plaf/motif/resources/motif_it.properties	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/com/sun/java/swing/plaf/motif/resources/motif_it.properties	Wed Oct 17 00:48:55 2012 +0100
@@ -26,11 +26,11 @@
 FileChooser.openDialogTitle.textAndMnemonic=Apri
 FileChooser.updateButton.textAndMnemonic=Aggiorna
 FileChooser.helpButton.textAndMnemonic=?
-FileChooser.pathLabel.textAndMnemonic=Percorso o nome cartella:
-FileChooser.filterLabel.textAndMnemonic=Filtro
-FileChooser.foldersLabel.textAndMnemonic=Cartelle
-FileChooser.filesLabel.textAndMnemonic=File
-FileChooser.enterFileNameLabel.textAndMnemonic=Nome file:
+FileChooser.pathLabel.textAndMnemonic=&Percorso o nome cartella:
+FileChooser.filterLabel.textAndMnemonic=Filt&ro
+FileChooser.foldersLabel.textAndMnemonic=Carte&lle
+FileChooser.filesLabel.textAndMnemonic=F&ile
+FileChooser.enterFileNameLabel.textAndMnemonic=&Nome file:
 FileChooser.enterFolderNameLabel.textAndMnemonic=Nome cartella:
 
 FileChooser.cancelButtonToolTip.textAndMnemonic=Chiude la finestra di dialogo di selezione file.
--- a/src/share/classes/com/sun/java/swing/plaf/motif/resources/motif_ja.properties	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/com/sun/java/swing/plaf/motif/resources/motif_ja.properties	Wed Oct 17 00:48:55 2012 +0100
@@ -26,11 +26,11 @@
 FileChooser.openDialogTitle.textAndMnemonic=\u958B\u304F
 FileChooser.updateButton.textAndMnemonic=\u66F4\u65B0
 FileChooser.helpButton.textAndMnemonic=\u30D8\u30EB\u30D7
-FileChooser.pathLabel.textAndMnemonic=\u30D1\u30B9\u307E\u305F\u306F\u30D5\u30A9\u30EB\u30C0\u540D\u3092\u5165\u529B:
-FileChooser.filterLabel.textAndMnemonic=\u30D5\u30A3\u30EB\u30BF
-FileChooser.foldersLabel.textAndMnemonic=\u30D5\u30A9\u30EB\u30C0
-FileChooser.filesLabel.textAndMnemonic=\u30D5\u30A1\u30A4\u30EB
-FileChooser.enterFileNameLabel.textAndMnemonic=\u30D5\u30A1\u30A4\u30EB\u540D\u3092\u5165\u529B:
+FileChooser.pathLabel.textAndMnemonic=\u30D1\u30B9\u307E\u305F\u306F\u30D5\u30A9\u30EB\u30C0\u540D\u3092\u5165\u529B(&P):
+FileChooser.filterLabel.textAndMnemonic=\u30D5\u30A3\u30EB\u30BF(&R)
+FileChooser.foldersLabel.textAndMnemonic=\u30D5\u30A9\u30EB\u30C0(&L)
+FileChooser.filesLabel.textAndMnemonic=\u30D5\u30A1\u30A4\u30EB(&I)
+FileChooser.enterFileNameLabel.textAndMnemonic=\u30D5\u30A1\u30A4\u30EB\u540D\u3092\u5165\u529B(&N):
 FileChooser.enterFolderNameLabel.textAndMnemonic=\u30D5\u30A9\u30EB\u30C0\u540D\u3092\u5165\u529B:
 
 FileChooser.cancelButtonToolTip.textAndMnemonic=\u30D5\u30A1\u30A4\u30EB\u30FB\u30C1\u30E5\u30FC\u30B6\u30FB\u30C0\u30A4\u30A2\u30ED\u30B0\u3092\u7D42\u4E86\u3057\u307E\u3059\u3002
--- a/src/share/classes/com/sun/java/swing/plaf/motif/resources/motif_ko.properties	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/com/sun/java/swing/plaf/motif/resources/motif_ko.properties	Wed Oct 17 00:48:55 2012 +0100
@@ -26,11 +26,11 @@
 FileChooser.openDialogTitle.textAndMnemonic=\uC5F4\uAE30
 FileChooser.updateButton.textAndMnemonic=\uAC31\uC2E0
 FileChooser.helpButton.textAndMnemonic=\uB3C4\uC6C0\uB9D0
-FileChooser.pathLabel.textAndMnemonic=\uACBD\uB85C \uB610\uB294 \uD3F4\uB354 \uC774\uB984 \uC785\uB825:
-FileChooser.filterLabel.textAndMnemonic=\uD544\uD130
-FileChooser.foldersLabel.textAndMnemonic=\uD3F4\uB354
-FileChooser.filesLabel.textAndMnemonic=\uD30C\uC77C
-FileChooser.enterFileNameLabel.textAndMnemonic=\uD30C\uC77C \uC774\uB984 \uC785\uB825:
+FileChooser.pathLabel.textAndMnemonic=\uACBD\uB85C \uB610\uB294 \uD3F4\uB354 \uC774\uB984 \uC785\uB825(&P):
+FileChooser.filterLabel.textAndMnemonic=\uD544\uD130(&R)
+FileChooser.foldersLabel.textAndMnemonic=\uD3F4\uB354(&L)
+FileChooser.filesLabel.textAndMnemonic=\uD30C\uC77C(&I)
+FileChooser.enterFileNameLabel.textAndMnemonic=\uD30C\uC77C \uC774\uB984 \uC785\uB825(&N):
 FileChooser.enterFolderNameLabel.textAndMnemonic=\uD3F4\uB354 \uC774\uB984 \uC785\uB825:
 
 FileChooser.cancelButtonToolTip.textAndMnemonic=\uD30C\uC77C \uC120\uD0DD\uAE30 \uB300\uD654\uC0C1\uC790\uB97C \uC911\uB2E8\uD569\uB2C8\uB2E4.
--- a/src/share/classes/com/sun/java/swing/plaf/motif/resources/motif_pt_BR.properties	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/com/sun/java/swing/plaf/motif/resources/motif_pt_BR.properties	Wed Oct 17 00:48:55 2012 +0100
@@ -26,11 +26,11 @@
 FileChooser.openDialogTitle.textAndMnemonic=Abrir
 FileChooser.updateButton.textAndMnemonic=Atualizar
 FileChooser.helpButton.textAndMnemonic=Ajuda
-FileChooser.pathLabel.textAndMnemonic=Informar caminho ou nome da pasta:
-FileChooser.filterLabel.textAndMnemonic=Filtro
-FileChooser.foldersLabel.textAndMnemonic=Pastas
-FileChooser.filesLabel.textAndMnemonic=Arquivos
-FileChooser.enterFileNameLabel.textAndMnemonic=Informar nome do arquivo:
+FileChooser.pathLabel.textAndMnemonic=Informar caminho ou nome da &pasta:
+FileChooser.filterLabel.textAndMnemonic=Filt&ro
+FileChooser.foldersLabel.textAndMnemonic=Pastas(&L)
+FileChooser.filesLabel.textAndMnemonic=Arqu&ivos
+FileChooser.enterFileNameLabel.textAndMnemonic=I&nformar nome do arquivo:
 FileChooser.enterFolderNameLabel.textAndMnemonic=Informar nome da pasta:
 
 FileChooser.cancelButtonToolTip.textAndMnemonic=Abortar caixa de di\u00E1logo do seletor de arquivos.
--- a/src/share/classes/com/sun/java/swing/plaf/motif/resources/motif_sv.properties	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/com/sun/java/swing/plaf/motif/resources/motif_sv.properties	Wed Oct 17 00:48:55 2012 +0100
@@ -26,11 +26,11 @@
 FileChooser.openDialogTitle.textAndMnemonic=\u00D6ppna
 FileChooser.updateButton.textAndMnemonic=Uppdatera
 FileChooser.helpButton.textAndMnemonic=Hj\u00E4lp
-FileChooser.pathLabel.textAndMnemonic=Ange s\u00F6kv\u00E4g eller mappnamn:
-FileChooser.filterLabel.textAndMnemonic=Filter
-FileChooser.foldersLabel.textAndMnemonic=Mappar
-FileChooser.filesLabel.textAndMnemonic=Filer
-FileChooser.enterFileNameLabel.textAndMnemonic=Ange filnamn:
+FileChooser.pathLabel.textAndMnemonic=Ange s\u00F6kv\u00E4g eller mappnamn(&P):
+FileChooser.filterLabel.textAndMnemonic=Filte&r
+FileChooser.foldersLabel.textAndMnemonic=Mappar(&L)
+FileChooser.filesLabel.textAndMnemonic=F&iler
+FileChooser.enterFileNameLabel.textAndMnemonic=A&nge filnamn:
 FileChooser.enterFolderNameLabel.textAndMnemonic=Ange ett mappnamn:
 
 FileChooser.cancelButtonToolTip.textAndMnemonic=Avbryt dialogrutan Filv\u00E4ljare.
--- a/src/share/classes/com/sun/java/swing/plaf/motif/resources/motif_zh_CN.properties	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/com/sun/java/swing/plaf/motif/resources/motif_zh_CN.properties	Wed Oct 17 00:48:55 2012 +0100
@@ -26,11 +26,11 @@
 FileChooser.openDialogTitle.textAndMnemonic=\u6253\u5F00
 FileChooser.updateButton.textAndMnemonic=\u66F4\u65B0
 FileChooser.helpButton.textAndMnemonic=\u5E2E\u52A9
-FileChooser.pathLabel.textAndMnemonic=\u952E\u5165\u8DEF\u5F84\u6216\u6587\u4EF6\u5939\u540D: 
-FileChooser.filterLabel.textAndMnemonic=\u7B5B\u9009\u5668
-FileChooser.foldersLabel.textAndMnemonic=\u6587\u4EF6\u5939
-FileChooser.filesLabel.textAndMnemonic=\u6587\u4EF6
-FileChooser.enterFileNameLabel.textAndMnemonic=\u952E\u5165\u6587\u4EF6\u540D: 
+FileChooser.pathLabel.textAndMnemonic=\u952E\u5165\u8DEF\u5F84\u6216\u6587\u4EF6\u5939\u540D: (&P)
+FileChooser.filterLabel.textAndMnemonic=\u7B5B\u9009\u5668(&R)
+FileChooser.foldersLabel.textAndMnemonic=\u6587\u4EF6\u5939(&L)
+FileChooser.filesLabel.textAndMnemonic=\u6587\u4EF6(&I)
+FileChooser.enterFileNameLabel.textAndMnemonic=\u952E\u5165\u6587\u4EF6\u540D: (&N)
 FileChooser.enterFolderNameLabel.textAndMnemonic=\u8F93\u5165\u6587\u4EF6\u5939\u540D:
 
 FileChooser.cancelButtonToolTip.textAndMnemonic=\u4E2D\u6B62\u6587\u4EF6\u9009\u62E9\u5668\u5BF9\u8BDD\u6846\u3002
--- a/src/share/classes/com/sun/java/swing/plaf/motif/resources/motif_zh_TW.properties	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/com/sun/java/swing/plaf/motif/resources/motif_zh_TW.properties	Wed Oct 17 00:48:55 2012 +0100
@@ -26,11 +26,11 @@
 FileChooser.openDialogTitle.textAndMnemonic=\u958B\u555F
 FileChooser.updateButton.textAndMnemonic=\u66F4\u65B0
 FileChooser.helpButton.textAndMnemonic=\u8AAA\u660E
-FileChooser.pathLabel.textAndMnemonic=\u8F38\u5165\u8DEF\u5F91\u6216\u8CC7\u6599\u593E\u540D\u7A31:
-FileChooser.filterLabel.textAndMnemonic=\u7BE9\u9078
-FileChooser.foldersLabel.textAndMnemonic=\u8CC7\u6599\u593E
-FileChooser.filesLabel.textAndMnemonic=\u6A94\u6848
-FileChooser.enterFileNameLabel.textAndMnemonic=\u8F38\u5165\u6A94\u6848\u540D\u7A31:
+FileChooser.pathLabel.textAndMnemonic=\u8F38\u5165\u8DEF\u5F91\u6216\u8CC7\u6599\u593E\u540D\u7A31(&P):
+FileChooser.filterLabel.textAndMnemonic=\u7BE9\u9078(&R)
+FileChooser.foldersLabel.textAndMnemonic=\u8CC7\u6599\u593E(&L)
+FileChooser.filesLabel.textAndMnemonic=\u6A94\u6848(&I)
+FileChooser.enterFileNameLabel.textAndMnemonic=\u8F38\u5165\u6A94\u6848\u540D\u7A31(&N):
 FileChooser.enterFolderNameLabel.textAndMnemonic=\u8F38\u5165\u8CC7\u6599\u593E\u540D\u7A31:
 
 FileChooser.cancelButtonToolTip.textAndMnemonic=\u4E2D\u6B62\u6A94\u6848\u9078\u64C7\u5668\u5C0D\u8A71\u65B9\u584A\u3002
--- a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java	Wed Oct 17 00:48:55 2012 +0100
@@ -528,16 +528,16 @@
 
         Locale l = fc.getLocale();
 
-        lookInLabelMnemonic = UIManager.getInt("FileChooser.lookInLabelMnemonic");
+        lookInLabelMnemonic = getMnemonic("FileChooser.lookInLabelMnemonic", l);
         lookInLabelText = UIManager.getString("FileChooser.lookInLabelText",l);
         saveInLabelText = UIManager.getString("FileChooser.saveInLabelText",l);
 
-        fileNameLabelMnemonic = UIManager.getInt("FileChooser.fileNameLabelMnemonic");
+        fileNameLabelMnemonic = getMnemonic("FileChooser.fileNameLabelMnemonic", l);
         fileNameLabelText = UIManager.getString("FileChooser.fileNameLabelText",l);
-        folderNameLabelMnemonic = UIManager.getInt("FileChooser.folderNameLabelMnemonic");
+        folderNameLabelMnemonic = getMnemonic("FileChooser.folderNameLabelMnemonic", l);
         folderNameLabelText = UIManager.getString("FileChooser.folderNameLabelText",l);
 
-        filesOfTypeLabelMnemonic = UIManager.getInt("FileChooser.filesOfTypeLabelMnemonic");
+        filesOfTypeLabelMnemonic = getMnemonic("FileChooser.filesOfTypeLabelMnemonic", l);
         filesOfTypeLabelText = UIManager.getString("FileChooser.filesOfTypeLabelText",l);
 
         upFolderToolTipText =  UIManager.getString("FileChooser.upFolderToolTipText",l);
@@ -550,6 +550,10 @@
         viewMenuButtonAccessibleName = UIManager.getString("FileChooser.viewMenuButtonAccessibleName",l);
     }
 
+    private Integer getMnemonic(String key, Locale l) {
+        return SwingUtilities2.getUIDefaultsInt(key, l);
+    }
+
     protected void installListeners(JFileChooser fc) {
         super.installListeners(fc);
         ActionMap actionMap = getActionMap();
--- a/src/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/WindowsLookAndFeel.java	Wed Oct 17 00:48:55 2012 +0100
@@ -773,9 +773,6 @@
                                                                "icons/NewFolder.gif"),
             "FileChooser.useSystemExtensionHiding", Boolean.TRUE,
 
-            "FileChooser.lookInLabelMnemonic", Integer.valueOf(KeyEvent.VK_I),
-            "FileChooser.fileNameLabelMnemonic", Integer.valueOf(KeyEvent.VK_N),
-            "FileChooser.filesOfTypeLabelMnemonic", Integer.valueOf(KeyEvent.VK_T),
             "FileChooser.usesSingleFilePane", Boolean.TRUE,
             "FileChooser.noPlacesBar", new DesktopProperty("win.comdlg.noPlacesBar",
                                                            Boolean.FALSE),
--- a/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows.properties	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows.properties	Wed Oct 17 00:48:55 2012 +0100
@@ -18,11 +18,11 @@
 
 ############ FILE CHOOSER STRINGS #############
 
-FileChooser.lookInLabel.textAndMnemonic=Look in:
+FileChooser.lookInLabel.textAndMnemonic=Look &in:
 FileChooser.saveInLabel.textAndMnemonic=Save in:
-FileChooser.fileNameLabel.textAndMnemonic=File name:
-FileChooser.folderNameLabel.textAndMnemonic=Folder name:
-FileChooser.filesOfTypeLabel.textAndMnemonic=Files of type:
+FileChooser.fileNameLabel.textAndMnemonic=File &name:
+FileChooser.folderNameLabel.textAndMnemonic=Folder &name:
+FileChooser.filesOfTypeLabel.textAndMnemonic=Files of &type:
 FileChooser.upFolderToolTip.textAndMnemonic=Up One Level
 FileChooser.upFolderAccessibleName=Up
 FileChooser.homeFolderToolTip.textAndMnemonic=Home
--- a/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows_de.properties	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows_de.properties	Wed Oct 17 00:48:55 2012 +0100
@@ -18,11 +18,11 @@
 
 ############ FILE CHOOSER STRINGS #############
 
-FileChooser.lookInLabel.textAndMnemonic=Suchen in:
+FileChooser.lookInLabel.textAndMnemonic=Suchen &in:
 FileChooser.saveInLabel.textAndMnemonic=Speichern in:
-FileChooser.fileNameLabel.textAndMnemonic=Dateiname:
-FileChooser.folderNameLabel.textAndMnemonic=Ordnername:
-FileChooser.filesOfTypeLabel.textAndMnemonic=Dateityp:
+FileChooser.fileNameLabel.textAndMnemonic=Datei&name:
+FileChooser.folderNameLabel.textAndMnemonic=Ord&nername:
+FileChooser.filesOfTypeLabel.textAndMnemonic=Da&teityp:
 FileChooser.upFolderToolTip.textAndMnemonic=Eine Ebene h\u00F6her
 FileChooser.upFolderAccessibleName=Nach oben
 FileChooser.homeFolderToolTip.textAndMnemonic=Home
--- a/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows_es.properties	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows_es.properties	Wed Oct 17 00:48:55 2012 +0100
@@ -18,11 +18,11 @@
 
 ############ FILE CHOOSER STRINGS #############
 
-FileChooser.lookInLabel.textAndMnemonic=Buscar en:
+FileChooser.lookInLabel.textAndMnemonic=Buscar en(&I):
 FileChooser.saveInLabel.textAndMnemonic=Guardar en:
-FileChooser.fileNameLabel.textAndMnemonic=Nombre de Archivo:
-FileChooser.folderNameLabel.textAndMnemonic=Nombre de la Carpeta:
-FileChooser.filesOfTypeLabel.textAndMnemonic=Archivos de Tipo:
+FileChooser.fileNameLabel.textAndMnemonic=&Nombre de Archivo:
+FileChooser.folderNameLabel.textAndMnemonic=&Nombre de la Carpeta:
+FileChooser.filesOfTypeLabel.textAndMnemonic=Archivos de &Tipo:
 FileChooser.upFolderToolTip.textAndMnemonic=Subir un Nivel
 FileChooser.upFolderAccessibleName=Arriba
 FileChooser.homeFolderToolTip.textAndMnemonic=Inicio
--- a/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows_fr.properties	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows_fr.properties	Wed Oct 17 00:48:55 2012 +0100
@@ -18,11 +18,11 @@
 
 ############ FILE CHOOSER STRINGS #############
 
-FileChooser.lookInLabel.textAndMnemonic=Rechercher dans :
+FileChooser.lookInLabel.textAndMnemonic=Rechercher dans (&I):
 FileChooser.saveInLabel.textAndMnemonic=Enregistrer dans :
-FileChooser.fileNameLabel.textAndMnemonic=Nom du fichier :
-FileChooser.folderNameLabel.textAndMnemonic=Nom du dossier :
-FileChooser.filesOfTypeLabel.textAndMnemonic=Fichiers de type :
+FileChooser.fileNameLabel.textAndMnemonic=&Nom du fichier :
+FileChooser.folderNameLabel.textAndMnemonic=&Nom du dossier :
+FileChooser.filesOfTypeLabel.textAndMnemonic=Fichiers de &type :
 FileChooser.upFolderToolTip.textAndMnemonic=Remonte d'un niveau.
 FileChooser.upFolderAccessibleName=Monter
 FileChooser.homeFolderToolTip.textAndMnemonic=R\u00E9pertoire d'origine
--- a/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows_it.properties	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows_it.properties	Wed Oct 17 00:48:55 2012 +0100
@@ -18,11 +18,11 @@
 
 ############ FILE CHOOSER STRINGS #############
 
-FileChooser.lookInLabel.textAndMnemonic=Cerca in:
+FileChooser.lookInLabel.textAndMnemonic=Cerca &in:
 FileChooser.saveInLabel.textAndMnemonic=Salva in:
-FileChooser.fileNameLabel.textAndMnemonic=Nome file:
-FileChooser.folderNameLabel.textAndMnemonic=Nome della cartella:
-FileChooser.filesOfTypeLabel.textAndMnemonic=Tipo file:
+FileChooser.fileNameLabel.textAndMnemonic=&Nome file:
+FileChooser.folderNameLabel.textAndMnemonic=&Nome della cartella:
+FileChooser.filesOfTypeLabel.textAndMnemonic=&Tipo file:
 FileChooser.upFolderToolTip.textAndMnemonic=Cartella superiore
 FileChooser.upFolderAccessibleName=Superiore
 FileChooser.homeFolderToolTip.textAndMnemonic=Home
--- a/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows_ja.properties	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows_ja.properties	Wed Oct 17 00:48:55 2012 +0100
@@ -18,11 +18,11 @@
 
 ############ FILE CHOOSER STRINGS #############
 
-FileChooser.lookInLabel.textAndMnemonic=\u53C2\u7167:
+FileChooser.lookInLabel.textAndMnemonic=\u53C2\u7167(&I):
 FileChooser.saveInLabel.textAndMnemonic=\u4FDD\u5B58:
-FileChooser.fileNameLabel.textAndMnemonic=\u30D5\u30A1\u30A4\u30EB\u540D:
-FileChooser.folderNameLabel.textAndMnemonic=\u30D5\u30A9\u30EB\u30C0\u540D:
-FileChooser.filesOfTypeLabel.textAndMnemonic=\u30D5\u30A1\u30A4\u30EB\u306E\u30BF\u30A4\u30D7:
+FileChooser.fileNameLabel.textAndMnemonic=\u30D5\u30A1\u30A4\u30EB\u540D(&N):
+FileChooser.folderNameLabel.textAndMnemonic=\u30D5\u30A9\u30EB\u30C0\u540D(&N):
+FileChooser.filesOfTypeLabel.textAndMnemonic=\u30D5\u30A1\u30A4\u30EB\u306E\u30BF\u30A4\u30D7(&T):
 FileChooser.upFolderToolTip.textAndMnemonic=1\u30EC\u30D9\u30EB\u4E0A\u3078
 FileChooser.upFolderAccessibleName=\u4E0A\u3078
 FileChooser.homeFolderToolTip.textAndMnemonic=\u30DB\u30FC\u30E0
--- a/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows_ko.properties	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows_ko.properties	Wed Oct 17 00:48:55 2012 +0100
@@ -18,11 +18,11 @@
 
 ############ FILE CHOOSER STRINGS #############
 
-FileChooser.lookInLabel.textAndMnemonic=\uAC80\uC0C9 \uC704\uCE58:
+FileChooser.lookInLabel.textAndMnemonic=\uAC80\uC0C9 \uC704\uCE58(&I):
 FileChooser.saveInLabel.textAndMnemonic=\uC800\uC7A5 \uC704\uCE58:
-FileChooser.fileNameLabel.textAndMnemonic=\uD30C\uC77C \uC774\uB984:
-FileChooser.folderNameLabel.textAndMnemonic=\uD3F4\uB354 \uC774\uB984:
-FileChooser.filesOfTypeLabel.textAndMnemonic=\uD30C\uC77C \uC720\uD615:
+FileChooser.fileNameLabel.textAndMnemonic=\uD30C\uC77C \uC774\uB984(&N):
+FileChooser.folderNameLabel.textAndMnemonic=\uD3F4\uB354 \uC774\uB984(&N):
+FileChooser.filesOfTypeLabel.textAndMnemonic=\uD30C\uC77C \uC720\uD615(&T):
 FileChooser.upFolderToolTip.textAndMnemonic=\uD55C \uB808\uBCA8 \uC704\uB85C
 FileChooser.upFolderAccessibleName=\uC704\uB85C
 FileChooser.homeFolderToolTip.textAndMnemonic=\uD648
--- a/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows_pt_BR.properties	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows_pt_BR.properties	Wed Oct 17 00:48:55 2012 +0100
@@ -18,11 +18,11 @@
 
 ############ FILE CHOOSER STRINGS #############
 
-FileChooser.lookInLabel.textAndMnemonic=Consultar em:
+FileChooser.lookInLabel.textAndMnemonic=Consultar em(&I):
 FileChooser.saveInLabel.textAndMnemonic=Salvar em:
-FileChooser.fileNameLabel.textAndMnemonic=Nome do arquivo:
-FileChooser.folderNameLabel.textAndMnemonic=Nome da pasta:
-FileChooser.filesOfTypeLabel.textAndMnemonic=Arquivos do tipo:
+FileChooser.fileNameLabel.textAndMnemonic=&Nome do arquivo:
+FileChooser.folderNameLabel.textAndMnemonic=&Nome da pasta:
+FileChooser.filesOfTypeLabel.textAndMnemonic=Arquivos do &tipo:
 FileChooser.upFolderToolTip.textAndMnemonic=Um N\u00EDvel Acima
 FileChooser.upFolderAccessibleName=Acima
 FileChooser.homeFolderToolTip.textAndMnemonic=In\u00EDcio
--- a/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows_sv.properties	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows_sv.properties	Wed Oct 17 00:48:55 2012 +0100
@@ -18,11 +18,11 @@
 
 ############ FILE CHOOSER STRINGS #############
 
-FileChooser.lookInLabel.textAndMnemonic=Leta i:
+FileChooser.lookInLabel.textAndMnemonic=Leta &i:
 FileChooser.saveInLabel.textAndMnemonic=Spara i:
-FileChooser.fileNameLabel.textAndMnemonic=Filnamn:
-FileChooser.folderNameLabel.textAndMnemonic=Mapp:
-FileChooser.filesOfTypeLabel.textAndMnemonic=Filformat:
+FileChooser.fileNameLabel.textAndMnemonic=Fil&namn:
+FileChooser.folderNameLabel.textAndMnemonic=Mapp(&N):
+FileChooser.filesOfTypeLabel.textAndMnemonic=Filforma&t:
 FileChooser.upFolderToolTip.textAndMnemonic=Upp en niv\u00E5
 FileChooser.upFolderAccessibleName=Upp
 FileChooser.homeFolderToolTip.textAndMnemonic=Hem
--- a/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows_zh_CN.properties	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows_zh_CN.properties	Wed Oct 17 00:48:55 2012 +0100
@@ -18,11 +18,11 @@
 
 ############ FILE CHOOSER STRINGS #############
 
-FileChooser.lookInLabel.textAndMnemonic=\u67E5\u770B: 
+FileChooser.lookInLabel.textAndMnemonic=\u67E5\u770B: (&I)
 FileChooser.saveInLabel.textAndMnemonic=\u4FDD\u5B58: 
-FileChooser.fileNameLabel.textAndMnemonic=\u6587\u4EF6\u540D: 
-FileChooser.folderNameLabel.textAndMnemonic=\u6587\u4EF6\u5939\u540D: 
-FileChooser.filesOfTypeLabel.textAndMnemonic=\u6587\u4EF6\u7C7B\u578B: 
+FileChooser.fileNameLabel.textAndMnemonic=\u6587\u4EF6\u540D: (&N)
+FileChooser.folderNameLabel.textAndMnemonic=\u6587\u4EF6\u5939\u540D: (&N)
+FileChooser.filesOfTypeLabel.textAndMnemonic=\u6587\u4EF6\u7C7B\u578B: (&T)
 FileChooser.upFolderToolTip.textAndMnemonic=\u5411\u4E0A\u4E00\u7EA7
 FileChooser.upFolderAccessibleName=\u5411\u4E0A
 FileChooser.homeFolderToolTip.textAndMnemonic=\u4E3B\u76EE\u5F55
--- a/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows_zh_TW.properties	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows_zh_TW.properties	Wed Oct 17 00:48:55 2012 +0100
@@ -18,11 +18,11 @@
 
 ############ FILE CHOOSER STRINGS #############
 
-FileChooser.lookInLabel.textAndMnemonic=\u67E5\u8A62:
+FileChooser.lookInLabel.textAndMnemonic=\u67E5\u8A62(&I):
 FileChooser.saveInLabel.textAndMnemonic=\u5132\u5B58\u65BC: 
-FileChooser.fileNameLabel.textAndMnemonic=\u6A94\u6848\u540D\u7A31:
-FileChooser.folderNameLabel.textAndMnemonic=\u8CC7\u6599\u593E\u540D\u7A31:
-FileChooser.filesOfTypeLabel.textAndMnemonic=\u6A94\u6848\u985E\u578B:
+FileChooser.fileNameLabel.textAndMnemonic=\u6A94\u6848\u540D\u7A31(&N):
+FileChooser.folderNameLabel.textAndMnemonic=\u8CC7\u6599\u593E\u540D\u7A31(&N):
+FileChooser.filesOfTypeLabel.textAndMnemonic=\u6A94\u6848\u985E\u578B(&T):
 FileChooser.upFolderToolTip.textAndMnemonic=\u5F80\u4E0A\u4E00\u5C64
 FileChooser.upFolderAccessibleName=\u5F80\u4E0A
 FileChooser.homeFolderToolTip.textAndMnemonic=\u4E3B\u76EE\u9304
--- a/src/share/classes/com/sun/security/auth/module/Krb5LoginModule.java	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/com/sun/security/auth/module/Krb5LoginModule.java	Wed Oct 17 00:48:55 2012 +0100
@@ -1060,12 +1060,17 @@
 
             if (storeKey) {
                 if (encKeys == null) {
-                    if (!privCredSet.contains(ktab)) {
-                        privCredSet.add(ktab);
-                        // Compatibility; also add keys to privCredSet
-                        for (KerberosKey key: ktab.getKeys(kerbClientPrinc)) {
-                            privCredSet.add(new Krb5Util.KeysFromKeyTab(key));
+                    if (ktab != null) {
+                        if (!privCredSet.contains(ktab)) {
+                            privCredSet.add(ktab);
+                            // Compatibility; also add keys to privCredSet
+                            for (KerberosKey key: ktab.getKeys(kerbClientPrinc)) {
+                                privCredSet.add(new Krb5Util.KeysFromKeyTab(key));
+                            }
                         }
+                    } else {
+                        succeeded = false;
+                        throw new LoginException("No key to store");
                     }
                 } else {
                     for (int i = 0; i < kerbKeys.length; i ++) {
--- a/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal.properties	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal.properties	Wed Oct 17 00:48:55 2012 +0100
@@ -18,11 +18,11 @@
 
 ############ FILE CHOOSER STRINGS #############
 
-FileChooser.lookInLabel.textAndMnemonic=Look In:
+FileChooser.lookInLabel.textAndMnemonic=Look &In:
 FileChooser.saveInLabel.textAndMnemonic=Save In:
-FileChooser.fileNameLabel.textAndMnemonic=File Name:
-FileChooser.folderNameLabel.textAndMnemonic=Folder name:
-FileChooser.filesOfTypeLabel.textAndMnemonic=Files of Type:
+FileChooser.fileNameLabel.textAndMnemonic=File &Name:
+FileChooser.folderNameLabel.textAndMnemonic=Folder &name:
+FileChooser.filesOfTypeLabel.textAndMnemonic=Files of &Type:
 FileChooser.upFolderToolTip.textAndMnemonic=Up One Level
 FileChooser.upFolderAccessibleName=Up
 FileChooser.homeFolderToolTip.textAndMnemonic=Home
--- a/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_de.properties	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_de.properties	Wed Oct 17 00:48:55 2012 +0100
@@ -18,11 +18,11 @@
 
 ############ FILE CHOOSER STRINGS #############
 
-FileChooser.lookInLabel.textAndMnemonic=Suchen in:
+FileChooser.lookInLabel.textAndMnemonic=Suchen &in:
 FileChooser.saveInLabel.textAndMnemonic=Speichern in:
-FileChooser.fileNameLabel.textAndMnemonic=Dateiname:
-FileChooser.folderNameLabel.textAndMnemonic=Ordnername:
-FileChooser.filesOfTypeLabel.textAndMnemonic=Dateityp:
+FileChooser.fileNameLabel.textAndMnemonic=Datei&name:
+FileChooser.folderNameLabel.textAndMnemonic=Ord&nername:
+FileChooser.filesOfTypeLabel.textAndMnemonic=Da&teityp:
 FileChooser.upFolderToolTip.textAndMnemonic=Eine Ebene h\u00F6her
 FileChooser.upFolderAccessibleName=Nach oben
 FileChooser.homeFolderToolTip.textAndMnemonic=Home
--- a/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_es.properties	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_es.properties	Wed Oct 17 00:48:55 2012 +0100
@@ -18,11 +18,11 @@
 
 ############ FILE CHOOSER STRINGS #############
 
-FileChooser.lookInLabel.textAndMnemonic=Buscar en:
+FileChooser.lookInLabel.textAndMnemonic=Buscar en(&I):
 FileChooser.saveInLabel.textAndMnemonic=Guardar en:
-FileChooser.fileNameLabel.textAndMnemonic=Nombre de Archivo:
-FileChooser.folderNameLabel.textAndMnemonic=Nombre de la Carpeta:
-FileChooser.filesOfTypeLabel.textAndMnemonic=Archivos de Tipo:
+FileChooser.fileNameLabel.textAndMnemonic=&Nombre de Archivo:
+FileChooser.folderNameLabel.textAndMnemonic=&Nombre de la Carpeta:
+FileChooser.filesOfTypeLabel.textAndMnemonic=Archivos de &Tipo:
 FileChooser.upFolderToolTip.textAndMnemonic=Subir un Nivel
 FileChooser.upFolderAccessibleName=Arriba
 FileChooser.homeFolderToolTip.textAndMnemonic=Inicio
--- a/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_fr.properties	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_fr.properties	Wed Oct 17 00:48:55 2012 +0100
@@ -18,11 +18,11 @@
 
 ############ FILE CHOOSER STRINGS #############
 
-FileChooser.lookInLabel.textAndMnemonic=Rechercher dans :
+FileChooser.lookInLabel.textAndMnemonic=Rechercher dans (&I):
 FileChooser.saveInLabel.textAndMnemonic=Enregistrer dans :
-FileChooser.fileNameLabel.textAndMnemonic=Nom du fichier :
-FileChooser.folderNameLabel.textAndMnemonic=Nom du dossier :
-FileChooser.filesOfTypeLabel.textAndMnemonic=Fichiers de type :
+FileChooser.fileNameLabel.textAndMnemonic=&Nom du fichier :
+FileChooser.folderNameLabel.textAndMnemonic=&Nom du dossier :
+FileChooser.filesOfTypeLabel.textAndMnemonic=Fichiers de &type :
 FileChooser.upFolderToolTip.textAndMnemonic=Remonte d'un niveau.
 FileChooser.upFolderAccessibleName=Monter
 FileChooser.homeFolderToolTip.textAndMnemonic=R\u00E9pertoire d'origine
--- a/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_it.properties	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_it.properties	Wed Oct 17 00:48:55 2012 +0100
@@ -18,11 +18,11 @@
 
 ############ FILE CHOOSER STRINGS #############
 
-FileChooser.lookInLabel.textAndMnemonic=Cerca in:
+FileChooser.lookInLabel.textAndMnemonic=Cerca &in:
 FileChooser.saveInLabel.textAndMnemonic=Salva in:
-FileChooser.fileNameLabel.textAndMnemonic=Nome file:
-FileChooser.folderNameLabel.textAndMnemonic=Nome della cartella:
-FileChooser.filesOfTypeLabel.textAndMnemonic=Tipo file:
+FileChooser.fileNameLabel.textAndMnemonic=&Nome file:
+FileChooser.folderNameLabel.textAndMnemonic=&Nome della cartella:
+FileChooser.filesOfTypeLabel.textAndMnemonic=&Tipo file:
 FileChooser.upFolderToolTip.textAndMnemonic=Cartella superiore
 FileChooser.upFolderAccessibleName=Superiore
 FileChooser.homeFolderToolTip.textAndMnemonic=Home
--- a/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_ja.properties	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_ja.properties	Wed Oct 17 00:48:55 2012 +0100
@@ -18,11 +18,11 @@
 
 ############ FILE CHOOSER STRINGS #############
 
-FileChooser.lookInLabel.textAndMnemonic=\u53C2\u7167:
+FileChooser.lookInLabel.textAndMnemonic=\u53C2\u7167(&I):
 FileChooser.saveInLabel.textAndMnemonic=\u4FDD\u5B58:
-FileChooser.fileNameLabel.textAndMnemonic=\u30D5\u30A1\u30A4\u30EB\u540D:
-FileChooser.folderNameLabel.textAndMnemonic=\u30D5\u30A9\u30EB\u30C0\u540D:
-FileChooser.filesOfTypeLabel.textAndMnemonic=\u30D5\u30A1\u30A4\u30EB\u306E\u30BF\u30A4\u30D7:
+FileChooser.fileNameLabel.textAndMnemonic=\u30D5\u30A1\u30A4\u30EB\u540D(&N):
+FileChooser.folderNameLabel.textAndMnemonic=\u30D5\u30A9\u30EB\u30C0\u540D(&N):
+FileChooser.filesOfTypeLabel.textAndMnemonic=\u30D5\u30A1\u30A4\u30EB\u306E\u30BF\u30A4\u30D7(&T):
 FileChooser.upFolderToolTip.textAndMnemonic=1\u30EC\u30D9\u30EB\u4E0A\u3078
 FileChooser.upFolderAccessibleName=\u4E0A\u3078
 FileChooser.homeFolderToolTip.textAndMnemonic=\u30DB\u30FC\u30E0
--- a/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_ko.properties	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_ko.properties	Wed Oct 17 00:48:55 2012 +0100
@@ -18,11 +18,11 @@
 
 ############ FILE CHOOSER STRINGS #############
 
-FileChooser.lookInLabel.textAndMnemonic=\uAC80\uC0C9 \uC704\uCE58:
+FileChooser.lookInLabel.textAndMnemonic=\uAC80\uC0C9 \uC704\uCE58(&I):
 FileChooser.saveInLabel.textAndMnemonic=\uC800\uC7A5 \uC704\uCE58:
-FileChooser.fileNameLabel.textAndMnemonic=\uD30C\uC77C \uC774\uB984:
-FileChooser.folderNameLabel.textAndMnemonic=\uD3F4\uB354 \uC774\uB984:
-FileChooser.filesOfTypeLabel.textAndMnemonic=\uD30C\uC77C \uC720\uD615:
+FileChooser.fileNameLabel.textAndMnemonic=\uD30C\uC77C \uC774\uB984(&N):
+FileChooser.folderNameLabel.textAndMnemonic=\uD3F4\uB354 \uC774\uB984(&N):
+FileChooser.filesOfTypeLabel.textAndMnemonic=\uD30C\uC77C \uC720\uD615(&T):
 FileChooser.upFolderToolTip.textAndMnemonic=\uD55C \uB808\uBCA8 \uC704\uB85C
 FileChooser.upFolderAccessibleName=\uC704\uB85C
 FileChooser.homeFolderToolTip.textAndMnemonic=\uD648
--- a/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_pt_BR.properties	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_pt_BR.properties	Wed Oct 17 00:48:55 2012 +0100
@@ -18,11 +18,11 @@
 
 ############ FILE CHOOSER STRINGS #############
 
-FileChooser.lookInLabel.textAndMnemonic=Consultar Em:
+FileChooser.lookInLabel.textAndMnemonic=Consultar Em(&I):
 FileChooser.saveInLabel.textAndMnemonic=Salvar Em:
-FileChooser.fileNameLabel.textAndMnemonic=Nome do Arquivo:
-FileChooser.folderNameLabel.textAndMnemonic=Nome da pasta:
-FileChooser.filesOfTypeLabel.textAndMnemonic=Arquivos do Tipo:
+FileChooser.fileNameLabel.textAndMnemonic=&Nome do Arquivo:
+FileChooser.folderNameLabel.textAndMnemonic=&Nome da pasta:
+FileChooser.filesOfTypeLabel.textAndMnemonic=Arquivos do &Tipo:
 FileChooser.upFolderToolTip.textAndMnemonic=Um N\u00EDvel Acima
 FileChooser.upFolderAccessibleName=Acima
 FileChooser.homeFolderToolTip.textAndMnemonic=In\u00EDcio
--- a/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_sv.properties	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_sv.properties	Wed Oct 17 00:48:55 2012 +0100
@@ -18,11 +18,11 @@
 
 ############ FILE CHOOSER STRINGS #############
 
-FileChooser.lookInLabel.textAndMnemonic=Leta i:
+FileChooser.lookInLabel.textAndMnemonic=Leta &i:
 FileChooser.saveInLabel.textAndMnemonic=Spara i:
-FileChooser.fileNameLabel.textAndMnemonic=Filnamn:
-FileChooser.folderNameLabel.textAndMnemonic=Mapp:
-FileChooser.filesOfTypeLabel.textAndMnemonic=Filformat:
+FileChooser.fileNameLabel.textAndMnemonic=Fil&namn:
+FileChooser.folderNameLabel.textAndMnemonic=Mapp(&N):
+FileChooser.filesOfTypeLabel.textAndMnemonic=Filforma&t:
 FileChooser.upFolderToolTip.textAndMnemonic=Upp en niv\u00E5
 FileChooser.upFolderAccessibleName=Upp
 FileChooser.homeFolderToolTip.textAndMnemonic=Hem
--- a/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_zh_CN.properties	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_zh_CN.properties	Wed Oct 17 00:48:55 2012 +0100
@@ -18,11 +18,11 @@
 
 ############ FILE CHOOSER STRINGS #############
 
-FileChooser.lookInLabel.textAndMnemonic=\u67E5\u770B: 
+FileChooser.lookInLabel.textAndMnemonic=\u67E5\u770B(&I): 
 FileChooser.saveInLabel.textAndMnemonic=\u4FDD\u5B58: 
-FileChooser.fileNameLabel.textAndMnemonic=\u6587\u4EF6\u540D: 
-FileChooser.folderNameLabel.textAndMnemonic=\u6587\u4EF6\u5939\u540D: 
-FileChooser.filesOfTypeLabel.textAndMnemonic=\u6587\u4EF6\u7C7B\u578B: 
+FileChooser.fileNameLabel.textAndMnemonic=\u6587\u4EF6\u540D(&N): 
+FileChooser.folderNameLabel.textAndMnemonic=\u6587\u4EF6\u5939\u540D(&N): 
+FileChooser.filesOfTypeLabel.textAndMnemonic=\u6587\u4EF6\u7C7B\u578B(&T): 
 FileChooser.upFolderToolTip.textAndMnemonic=\u5411\u4E0A\u4E00\u7EA7
 FileChooser.upFolderAccessibleName=\u5411\u4E0A
 FileChooser.homeFolderToolTip.textAndMnemonic=\u4E3B\u76EE\u5F55
--- a/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_zh_TW.properties	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_zh_TW.properties	Wed Oct 17 00:48:55 2012 +0100
@@ -18,11 +18,11 @@
 
 ############ FILE CHOOSER STRINGS #############
 
-FileChooser.lookInLabel.textAndMnemonic=\u67E5\u8A62:
+FileChooser.lookInLabel.textAndMnemonic=\u67E5\u8A62(&I):
 FileChooser.saveInLabel.textAndMnemonic=\u5132\u5B58\u65BC: 
-FileChooser.fileNameLabel.textAndMnemonic=\u6A94\u6848\u540D\u7A31:
-FileChooser.folderNameLabel.textAndMnemonic=\u8CC7\u6599\u593E\u540D\u7A31:
-FileChooser.filesOfTypeLabel.textAndMnemonic=\u6A94\u6848\u985E\u578B:
+FileChooser.fileNameLabel.textAndMnemonic=\u6A94\u6848\u540D\u7A31(&N):
+FileChooser.folderNameLabel.textAndMnemonic=\u8CC7\u6599\u593E\u540D\u7A31(&N):
+FileChooser.filesOfTypeLabel.textAndMnemonic=\u6A94\u6848\u985E\u578B(&T):
 FileChooser.upFolderToolTip.textAndMnemonic=\u5F80\u4E0A\u4E00\u5C64
 FileChooser.upFolderAccessibleName=\u5F80\u4E0A
 FileChooser.homeFolderToolTip.textAndMnemonic=\u4E3B\u76EE\u9304
--- a/src/share/classes/java/util/WeakHashMap.java	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/java/util/WeakHashMap.java	Wed Oct 17 00:48:55 2012 +0100
@@ -90,7 +90,8 @@
  * from being discarded.  Note that a value object may refer indirectly to its
  * key via the <tt>WeakHashMap</tt> itself; that is, a value object may
  * strongly refer to some other key object whose associated value object, in
- * turn, strongly refers to the key of the first value object.  One way
+ * turn, strongly refers to the key of the first value object.  If the values
+ * in the map do not rely on the map holding strong references to them, one way
  * to deal with this is to wrap values themselves within
  * <tt>WeakReferences</tt> before
  * inserting, as in: <tt>m.put(key, new WeakReference(value))</tt>,
--- a/src/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java	Wed Oct 17 00:48:55 2012 +0100
@@ -461,16 +461,16 @@
 
         Locale l = fc.getLocale();
 
-        lookInLabelMnemonic = UIManager.getInt("FileChooser.lookInLabelMnemonic");
+        lookInLabelMnemonic = getMnemonic("FileChooser.lookInLabelMnemonic", l);
         lookInLabelText = UIManager.getString("FileChooser.lookInLabelText",l);
         saveInLabelText = UIManager.getString("FileChooser.saveInLabelText",l);
 
-        fileNameLabelMnemonic = UIManager.getInt("FileChooser.fileNameLabelMnemonic");
+        fileNameLabelMnemonic = getMnemonic("FileChooser.fileNameLabelMnemonic", l);
         fileNameLabelText = UIManager.getString("FileChooser.fileNameLabelText",l);
-        folderNameLabelMnemonic = UIManager.getInt("FileChooser.folderNameLabelMnemonic");
+        folderNameLabelMnemonic = getMnemonic("FileChooser.folderNameLabelMnemonic", l);
         folderNameLabelText = UIManager.getString("FileChooser.folderNameLabelText",l);
 
-        filesOfTypeLabelMnemonic = UIManager.getInt("FileChooser.filesOfTypeLabelMnemonic");
+        filesOfTypeLabelMnemonic = getMnemonic("FileChooser.filesOfTypeLabelMnemonic", l);
         filesOfTypeLabelText = UIManager.getString("FileChooser.filesOfTypeLabelText",l);
 
         upFolderToolTipText =  UIManager.getString("FileChooser.upFolderToolTipText",l);
@@ -489,6 +489,10 @@
         detailsViewButtonAccessibleName = UIManager.getString("FileChooser.detailsViewButtonAccessibleName",l);
     }
 
+    private Integer getMnemonic(String key, Locale l) {
+        return SwingUtilities2.getUIDefaultsInt(key, l);
+    }
+
     protected void installListeners(JFileChooser fc) {
         super.installListeners(fc);
         ActionMap actionMap = getActionMap();
--- a/src/share/classes/javax/swing/plaf/metal/MetalLookAndFeel.java	Thu Aug 23 15:42:23 2012 +0100
+++ b/src/share/classes/javax/swing/plaf/metal/MetalLookAndFeel.java	Wed Oct 17 00:48:55 2012 +0100
@@ -844,9 +844,6 @@
             "FileChooser.newFolderIcon", new SwingLazyValue("javax.swing.plaf.metal.MetalIconFactory", "getFileChooserNewFolderIcon"),
             "FileChooser.upFolderIcon", new SwingLazyValue("javax.swing.plaf.metal.MetalIconFactory", "getFileChooserUpFolderIcon"),
 
-            "FileChooser.lookInLabelMnemonic", new Integer(KeyEvent.VK_I),
-            "FileChooser.fileNameLabelMnemonic", new Integer(KeyEvent.VK_N),
-            "FileChooser.filesOfTypeLabelMnemonic", new Integer(KeyEvent.VK_T),
             "FileChooser.usesSingleFilePane", Boolean.TRUE,
             "FileChooser.ancestorInputMap",
                new UIDefaults.LazyInputMap(new Object[] {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/event/KeyEvent/DeadKey/DeadKeyMacOSX.java	Wed Oct 17 00:48:55 2012 +0100
@@ -0,0 +1,138 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 7196547
+ * @summary Dead Key implementation for KeyEvent on Mac OS X
+ * @author alexandr.scherbatiy area=awt.event
+ * @run main DeadKeyMacOSX
+ */
+
+import java.awt.*;
+import java.awt.event.*;
+import java.awt.event.KeyEvent;
+import sun.awt.OSInfo;
+import sun.awt.SunToolkit;
+
+public class DeadKeyMacOSX {
+
+    private static SunToolkit toolkit;
+    private static volatile int state = 0;
+
+    public static void main(String[] args) throws Exception {
+
+        if (OSInfo.getOSType() != OSInfo.OSType.MACOSX) {
+            return;
+        }
+
+        toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+        Robot robot = new Robot();
+        robot.setAutoDelay(50);
+
+        createAndShowGUI();
+
+        // Pressed keys: Alt + E + A
+        // Results:  ALT + VK_DEAD_ACUTE + a with accute accent
+        robot.keyPress(KeyEvent.VK_ALT);
+        robot.keyPress(KeyEvent.VK_E);
+        robot.keyRelease(KeyEvent.VK_E);
+        robot.keyRelease(KeyEvent.VK_ALT);
+
+        robot.keyPress(KeyEvent.VK_A);
+        robot.keyRelease(KeyEvent.VK_A);
+
+        if (state != 3) {
+            throw new RuntimeException("Wrong number of key events.");
+        }
+    }
+
+    static void createAndShowGUI() {
+        Frame frame = new Frame();
+        frame.setSize(300, 300);
+        Panel panel = new Panel();
+        panel.addKeyListener(new DeadKeyListener());
+        frame.add(panel);
+        frame.setVisible(true);
+        toolkit.realSync();
+
+        panel.requestFocusInWindow();
+        toolkit.realSync();
+    }
+
+    static class DeadKeyListener extends KeyAdapter {
+
+        @Override
+        public void keyPressed(KeyEvent e) {
+            int keyCode = e.getKeyCode();
+            char keyChar = e.getKeyChar();
+
+            switch (state) {
+                case 0:
+                    if (keyCode != KeyEvent.VK_ALT) {
+                        throw new RuntimeException("Alt is not pressed.");
+                    }
+                    state++;
+                    break;
+                case 1:
+                    if (keyCode != KeyEvent.VK_DEAD_ACUTE) {
+                        throw new RuntimeException("Dead ACUTE is not pressed.");
+                    }
+                    if (keyChar != 0xB4) {
+                        throw new RuntimeException("Pressed char is not dead acute.");
+                    }
+
+                    state++;
+                    break;
+                case 2:
+                    if (keyCode != KeyEvent.VK_A) {
+                        throw new RuntimeException("A is not pressed.");
+                    }
+                    if (keyChar != 0xE1) {
+                        throw new RuntimeException("A char does not have ACCUTE accent");
+                    }
+                    state++;
+                    break;
+                default:
+                    throw new RuntimeException("Excessive keyPressed event.");
+            }
+        }
+
+        @Override
+        public void keyTyped(KeyEvent e) {
+            int keyCode = e.getKeyCode();
+            char keyChar = e.getKeyChar();
+
+            if (state == 3) {
+                if (keyCode != 0) {
+                    throw new RuntimeException("Key code should be undefined.");
+                }
+                if (keyChar != 0xE1) {
+                    throw new RuntimeException("A char does not have ACCUTE accent");
+                }
+            } else {
+                throw new RuntimeException("Wron number of keyTyped events.");
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/awt/event/KeyEvent/DeadKey/DeadKeyMacOSXInputText.java	Wed Oct 17 00:48:55 2012 +0100
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 7199180
+ * @summary [macosx] Dead keys handling for input methods
+ * @author alexandr.scherbatiy area=awt.event
+ * @run main DeadKeyMacOSXInputText
+ */
+import java.awt.*;
+import java.awt.event.*;
+import java.awt.event.KeyEvent;
+import javax.swing.JTextField;
+import sun.awt.OSInfo;
+import sun.awt.SunToolkit;
+
+public class DeadKeyMacOSXInputText {
+
+    private static SunToolkit toolkit;
+    private static volatile int state = 0;
+
+    public static void main(String[] args) throws Exception {
+
+        if (OSInfo.getOSType() != OSInfo.OSType.MACOSX) {
+            return;
+        }
+
+        toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+        Robot robot = new Robot();
+        robot.setAutoDelay(50);
+
+        createAndShowGUI();
+
+        // Pressed keys: Alt + E + A
+        // Results:  ALT + VK_DEAD_ACUTE + a with accute accent
+        robot.keyPress(KeyEvent.VK_ALT);
+        robot.keyPress(KeyEvent.VK_E);
+        robot.keyRelease(KeyEvent.VK_E);
+        robot.keyRelease(KeyEvent.VK_ALT);
+
+        robot.keyPress(KeyEvent.VK_A);
+        robot.keyRelease(KeyEvent.VK_A);
+        toolkit.realSync();
+
+        if (state != 3) {
+            throw new RuntimeException("Wrong number of key events.");
+        }
+    }
+
+    static void createAndShowGUI() {
+        Frame frame = new Frame();
+        frame.setSize(300, 300);
+        Panel panel = new Panel(new BorderLayout());
+        JTextField textField = new JTextField();
+        textField.addKeyListener(new DeadKeyListener());
+        panel.add(textField, BorderLayout.CENTER);
+        frame.add(panel);
+        frame.setVisible(true);
+        toolkit.realSync();
+
+        textField.requestFocusInWindow();
+        toolkit.realSync();
+
+    }
+
+    static class DeadKeyListener extends KeyAdapter {
+
+        @Override
+        public void keyPressed(KeyEvent e) {
+            int keyCode = e.getKeyCode();
+            char keyChar = e.getKeyChar();
+
+            switch (state) {
+                case 0:
+                    if (keyCode != KeyEvent.VK_ALT) {
+                        throw new RuntimeException("Alt is not pressed.");
+                    }
+                    state++;
+                    break;
+                case 1:
+                    if (keyCode != KeyEvent.VK_DEAD_ACUTE) {
+                        throw new RuntimeException("Dead ACUTE is not pressed.");
+                    }
+                    if (keyChar != 0xB4) {
+                        throw new RuntimeException("Pressed char is not dead acute.");
+                    }
+                    state++;
+                    break;
+            }
+        }
+
+        @Override
+        public void keyTyped(KeyEvent e) {
+            int keyCode = e.getKeyCode();
+            char keyChar = e.getKeyChar();
+
+            if (state == 2) {
+                if (keyCode != 0) {
+                    throw new RuntimeException("Key code should be undefined.");
+                }
+                if (keyChar != 0xE1) {
+                    throw new RuntimeException("A char does not have ACCUTE accent");
+                }
+                state++;
+            } else {
+                throw new RuntimeException("Wron number of keyTyped events.");
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/sun/security/krb5/auto/UseCacheAndStoreKey.java	Wed Oct 17 00:48:55 2012 +0100
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 7201053
+ * @summary Krb5LoginModule shows NPE when both useTicketCache and storeKey
+ *          are set to true
+ * @compile -XDignore.symbol.file UseCacheAndStoreKey.java
+ * @run main/othervm UseCacheAndStoreKey
+ */
+
+import java.io.FileOutputStream;
+import javax.security.auth.login.LoginException;
+
+// The basic krb5 test skeleton you can copy from
+public class UseCacheAndStoreKey {
+
+    public static void main(String[] args) throws Exception {
+
+        new OneKDC(null).writeJAASConf();
+
+        // KDC would save ccache for client
+        System.setProperty("test.kdc.save.ccache", "cache.here");
+        try (FileOutputStream fos = new FileOutputStream(OneKDC.JAAS_CONF)) {
+            fos.write((
+                "me {\n" +
+                "    com.sun.security.auth.module.Krb5LoginModule required\n" +
+                "    principal=\"" + OneKDC.USER + "\"\n" +
+                "    useTicketCache=true\n" +
+                "    ticketCache=cache.here\n" +
+                "    isInitiator=true\n" +
+                "    storeKey=true;\n};\n"
+                ).getBytes());
+        }
+
+        // The first login will use default callback and succeed
+        Context.fromJAAS("me");
+
+        // The second login uses ccache and won't be able to store the keys
+        try {
+            Context.fromJAAS("me");
+            throw new Exception("Should fail");
+        } catch (LoginException le) {
+            if (le.getMessage().indexOf("NullPointerException") >= 0
+                    || le.getCause() instanceof NullPointerException) {
+                throw new Exception("NPE");
+            }
+        }
+    }
+}