Merge
authorlana
Thu, 26 Sep 2013 17:18:12 -0700
changeset 20173 7d2dbee4296a
parent 20093 747806976e71 (current diff)
parent 20172 f48935a247ec (diff)
child 20200 291f4653b384
Merge
jdk/src/macosx/classes/sun/lwawt/SelectionClearListener.java
jdk/src/macosx/classes/sun/lwawt/macosx/CMouseInfoPeer.java
--- a/jdk/make/bridge/AccessBridgeJava/Makefile	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/make/bridge/AccessBridgeJava/Makefile	Thu Sep 26 17:18:12 2013 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 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
@@ -51,7 +51,7 @@
 #
 # Java files to compile.
 #
-FILES_java = com/sun/java/accessibility/AccessBridge.java
+FILES_java = com/sun/java/accessibility/AccessBridgeLoader.java com/sun/java/accessibility/AccessBridge.java
 
 #
 # Location for the newly built classfiles.
@@ -61,14 +61,13 @@
 #
 # Rules
 #
-CLASSDESTDIR = $(TEMPDIR)/classes
 
 FILES_class = $(FILES_java:%.java=$(CLASSDESTDIR)/%.class)
 
 build: prebuild
 
 prebuild:
-	$(CP) $(CLOSED_PLATFORM_SRC)/classes/com/sun/java/accessibility/$(ABPLATFORM)/AccessBridge.java \
+	$(CP) $(CLOSED_PLATFORM_SRC)/classes/com/sun/java/accessibility/$(ABPLATFORM)/AccessBridgeLoader.java \
 		$(CLOSED_PLATFORM_SRC)/classes/com/sun/java/accessibility
 
 all : build $(JARFILE) 
--- a/jdk/make/sun/lwawt/FILES_export_macosx.gmk	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/make/sun/lwawt/FILES_export_macosx.gmk	Thu Sep 26 17:18:12 2013 -0700
@@ -110,7 +110,6 @@
         sun/lwawt/LWWindowPeer.java \
         sun/lwawt/PlatformWindow.java \
         sun/lwawt/SecurityWarningWindow.java \
-        sun/lwawt/SelectionClearListener.java \
         sun/lwawt/macosx/CPrinterDevice.java \
         sun/lwawt/macosx/CPrinterDialog.java \
         sun/lwawt/macosx/CPrinterDialogPeer.java \
@@ -141,7 +140,6 @@
         sun/lwawt/macosx/CMenuBar.java \
         sun/lwawt/macosx/CMenuComponent.java \
         sun/lwawt/macosx/CMenuItem.java \
-        sun/lwawt/macosx/CMouseInfoPeer.java \
         sun/lwawt/macosx/CPlatformView.java \
         sun/lwawt/macosx/CPlatformWindow.java \
         sun/lwawt/macosx/CWarningWindow.java \
--- a/jdk/make/sun/xawt/mapfile-vers	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/make/sun/xawt/mapfile-vers	Thu Sep 26 17:18:12 2013 -0700
@@ -305,6 +305,7 @@
         Java_sun_awt_X11_XlibWrapper_XkbGetUpdatedMap;
         Java_sun_awt_X11_XlibWrapper_XkbFreeKeyboard;
         Java_sun_awt_X11_XlibWrapper_XkbTranslateKeyCode;
+        Java_sun_awt_X11_XlibWrapper_XkbSetDetectableAutoRepeat;
         Java_sun_awt_X11_XlibWrapper_XGetModifierMapping;
         Java_sun_awt_X11_XlibWrapper_XFreeModifiermap;
         Java_sun_awt_X11_XlibWrapper_XRefreshKeyboardMapping;
--- a/jdk/makefiles/CompileDemos.gmk	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/makefiles/CompileDemos.gmk	Thu Sep 26 17:18:12 2013 -0700
@@ -65,14 +65,10 @@
 $(eval $(call SetupAppletDemo,DrawTest))
 $(eval $(call SetupAppletDemo,Fractal))
 $(eval $(call SetupAppletDemo,GraphicsTest))
-$(eval $(call SetupAppletDemo,MoleculeViewer))
 $(eval $(call SetupAppletDemo,NervousText))
 $(eval $(call SetupAppletDemo,SimpleGraph))
 $(eval $(call SetupAppletDemo,SortDemo))
 $(eval $(call SetupAppletDemo,SpreadSheet))
-# Build WireFrame without a server since it
-# has a class Matrix3D that also exists in MoleculeViewer.
-$(eval $(call SetupAppletDemo,WireFrame,true))
 
 ifndef OPENJDK
     $(eval $(call SetupAppletDemo,Animator,,closed/))
@@ -83,7 +79,7 @@
 
 ##################################################################################################
 
-PATTERNS_TO_COPY=.html .txt .properties .js .gif .jpg .theme .data .opt README .c .h .png .ttf
+PATTERNS_TO_COPY=.html .txt .properties .js .gif .jpg .theme .data .opt README .c .h .png .ttf .xyz .obj
 
 define SetupDemo
     # Param 1 = Name of the demo
@@ -161,6 +157,8 @@
 
 BUILD_DEMOS+=$(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.services
 
+$(eval $(call SetupDemo,MoleculeViewer,applets,,XYZChemModel,,,example*.html XYZApp.java))
+$(eval $(call SetupDemo,WireFrame,applets,,ThreeD,,,example*.html ThreeD.java))
 $(eval $(call SetupDemo,FileChooserDemo,jfc,,FileChooserDemo,,,README*))
 $(eval $(call SetupDemo,Font2DTest,jfc,,Font2DTest,,,*.html *.txt))
 $(eval $(call SetupDemo,Metalworks,jfc,,Metalworks,,,README*))
--- a/jdk/makefiles/CompileJavaClasses.gmk	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/makefiles/CompileJavaClasses.gmk	Thu Sep 26 17:18:12 2013 -0700
@@ -62,6 +62,7 @@
 
       # AccessBridge is compiled separately below.
       EXFILES += AccessBridge.java \
+		 AccessBridgeLoader.java \
 		 com/sun/java/accessibility/util/java/awt/ChoiceTranslator.java
       # This seems to never be built
       EXCLUDES += com/sun/java/accessibility/extensions
--- a/jdk/makefiles/CreateJars.gmk	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/makefiles/CreateJars.gmk	Thu Sep 26 17:18:12 2013 -0700
@@ -953,13 +953,13 @@
 
     ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
         $(eval $(call SetupArchive,BUILD_ACCESSBRIDGE_32_JAR,,\
-		SRCS:=$(JDK_OUTPUTDIR)/classes_ab/32bit $(JDK_OUTPUTDIR)/classes,\
+		SRCS:=$(JDK_OUTPUTDIR)/classes_ab/32bit,\
 		INCLUDES:=com/sun/java/accessibility,\
 		JAR:=$(IMAGES_OUTPUTDIR)/lib/ext/access-bridge-32.jar,\
 		SKIP_METAINF:=true))
 
         $(eval $(call SetupArchive,BUILD_ACCESSBRIDGE_LEGACY_JAR,,\
-		SRCS:=$(JDK_OUTPUTDIR)/classes_ab/legacy $(JDK_OUTPUTDIR)/classes,\
+		SRCS:=$(JDK_OUTPUTDIR)/classes_ab/legacy,\
 		INCLUDES:=com/sun/java/accessibility,\
 		JAR:=$(IMAGES_OUTPUTDIR)/lib/ext/access-bridge.jar,\
 		SKIP_METAINF:=true))
@@ -968,9 +968,8 @@
 		$(IMAGES_OUTPUTDIR)/lib/ext/access-bridge.jar
     else
         $(eval $(call SetupArchive,BUILD_ACCESSBRIDGE_64_JAR,,\
-		SRCS:=$(JDK_OUTPUTDIR)/classes_ab/64bit $(JDK_OUTPUTDIR)/classes,\
+		SRCS:=$(JDK_OUTPUTDIR)/classes_ab/64bit,\
 		INCLUDES:=com/sun/java/accessibility,\
-		EXCLUDES:=com/sun/java/accessibility/util/java,\
 		JAR:=$(IMAGES_OUTPUTDIR)/lib/ext/access-bridge-64.jar,\
 		SKIP_METAINF:=true))
 
--- a/jdk/makefiles/GensrcMisc.gmk	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/makefiles/GensrcMisc.gmk	Thu Sep 26 17:18:12 2013 -0700
@@ -200,26 +200,42 @@
     AB_SRC_DIR := $(JDK_TOPDIR)/src/closed/windows/classes/com/sun/java/accessibility
 
     ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
+         $(AB_GENSRC_DIR)/32bit/com/sun/java/accessibility/AccessBridgeLoader.java: \
+			$(AB_SRC_DIR)/32bit/AccessBridgeLoader.java
+		$(install-file)
+
          $(AB_GENSRC_DIR)/32bit/com/sun/java/accessibility/AccessBridge.java: \
-			$(AB_SRC_DIR)/32bit/AccessBridge.java
+			$(AB_SRC_DIR)/AccessBridge.java
+		$(install-file)
+
+         $(AB_GENSRC_DIR)/legacy/com/sun/java/accessibility/AccessBridgeLoader.java: \
+			$(AB_SRC_DIR)/legacy/AccessBridgeLoader.java
 		$(install-file)
 
          $(AB_GENSRC_DIR)/legacy/com/sun/java/accessibility/AccessBridge.java: \
-			$(AB_SRC_DIR)/legacy/AccessBridge.java
+			$(AB_SRC_DIR)/AccessBridge.java
 		$(install-file)
 
-        GENSRC_MISC += $(AB_GENSRC_DIR)/32bit/com/sun/java/accessibility/AccessBridge.java \
-		       $(AB_GENSRC_DIR)/legacy/com/sun/java/accessibility/AccessBridge.java
+        GENSRC_MISC += $(AB_GENSRC_DIR)/32bit/com/sun/java/accessibility/AccessBridgeLoader.java \
+		       $(AB_GENSRC_DIR)/legacy/com/sun/java/accessibility/AccessBridgeLoader.java \
+			   $(AB_GENSRC_DIR)/32bit/com/sun/java/accessibility/AccessBridge.java \
+			   $(AB_GENSRC_DIR)/legacy/com/sun/java/accessibility/AccessBridge.java
 
     else
-         $(AB_GENSRC_DIR)/64bit/com/sun/java/accessibility/AccessBridge.java: \
-			$(AB_SRC_DIR)/64bit/AccessBridge.java
+         $(AB_GENSRC_DIR)/64bit/com/sun/java/accessibility/AccessBridgeLoader.java: \
+			$(AB_SRC_DIR)/64bit/AccessBridgeLoader.java
 		$(install-file)
 
-         GENSRC_MISC += $(AB_GENSRC_DIR)/64bit/com/sun/java/accessibility/AccessBridge.java
+         $(AB_GENSRC_DIR)/64bit/com/sun/java/accessibility/AccessBridge.java: \
+			$(AB_SRC_DIR)/AccessBridge.java
+		$(install-file)
+
+         GENSRC_MISC += $(AB_GENSRC_DIR)/64bit/com/sun/java/accessibility/AccessBridgeLoader.java \
+			$(AB_GENSRC_DIR)/64bit/com/sun/java/accessibility/AccessBridge.java
 
     endif
+
 endif
 endif
 
-##########################################################################################
\ No newline at end of file
+##########################################################################################
--- a/jdk/makefiles/GensrcProperties.gmk	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/makefiles/GensrcProperties.gmk	Thu Sep 26 17:18:12 2013 -0700
@@ -253,6 +253,13 @@
 	$(call CacheFind,$(JDK_TOPDIR)/src/windows/classes/sun/awt/windows)),\
 	ListResourceBundle,%zh_TW,%zh_HK))
 endif
+# os x specific awt properties
+ifeq ($(OPENJDK_TARGET_OS),macosx)
+$(eval $(call add_properties_to_compile,SUN_AWT,\
+	$(filter $(JDK_TOPDIR)/src/macosx/classes/sun/awt/resources/%.properties,\
+	$(call CacheFind,$(JDK_TOPDIR)/src/macosx/classes/sun/awt/resources)),\
+	ListResourceBundle))
+endif
 
 #sun/launcher/resources
 $(eval $(call add_properties_to_compile,SUN_LAUNCHER,\
--- a/jdk/makefiles/mapfiles/libawt_xawt/mapfile-vers	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/makefiles/mapfiles/libawt_xawt/mapfile-vers	Thu Sep 26 17:18:12 2013 -0700
@@ -305,6 +305,7 @@
         Java_sun_awt_X11_XlibWrapper_XkbGetUpdatedMap;
         Java_sun_awt_X11_XlibWrapper_XkbFreeKeyboard;
         Java_sun_awt_X11_XlibWrapper_XkbTranslateKeyCode;
+        Java_sun_awt_X11_XlibWrapper_XkbSetDetectableAutoRepeat;
         Java_sun_awt_X11_XlibWrapper_XGetModifierMapping;
         Java_sun_awt_X11_XlibWrapper_XFreeModifiermap;
         Java_sun_awt_X11_XlibWrapper_XRefreshKeyboardMapping;
--- a/jdk/src/macosx/classes/apple/applescript/AppleScriptEngineFactory.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/macosx/classes/apple/applescript/AppleScriptEngineFactory.java	Thu Sep 26 17:18:12 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, 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
@@ -30,14 +30,9 @@
 import javax.script.*;
 
 public class AppleScriptEngineFactory implements ScriptEngineFactory {
-    private static native void initNative();
+    private static volatile boolean initialized = false;
 
-    static {
-        java.awt.Toolkit.getDefaultToolkit();
-        System.loadLibrary("AppleScriptEngine");
-        initNative();
-        TRACE("<static-init>");
-    }
+    private static native void initNative();
 
     static void TRACE(final String str) {
 //        System.out.println(AppleScriptEngineFactory.class.getName() + "." + str);
@@ -80,6 +75,7 @@
      *
      * @return full name of the ScriptEngine
      */
+    @Override
     public String getEngineName() {
         TRACE("getEngineName()");
         return ENGINE_NAME;
@@ -90,6 +86,7 @@
      *
      * @return version of the ScriptEngine
      */
+    @Override
     public String getEngineVersion() {
         TRACE("getEngineVersion()");
         return ENGINE_VERSION;
@@ -100,6 +97,7 @@
      *
      * @return name of the language supported by the ScriptEngine(Factory)
      */
+    @Override
     public String getLanguageName() {
         TRACE("getLanguageName()");
         return LANGUAGE;
@@ -110,11 +108,12 @@
      *
      * @return language version supported by the ScriptEngine(Factory)
      */
+    @Override
     public String getLanguageVersion() {
         TRACE("getLanguageVersion()");
         return AccessController.doPrivileged(new PrivilegedAction<String>() {
             public String run() {
-                final AppleScriptEngine engine = new AppleScriptEngine(AppleScriptEngineFactory.this);
+                final AppleScriptEngine engine = getScriptEngine();
                 return engine.getLanguageVersion();
             }
         });
@@ -126,6 +125,7 @@
      *
      * @return ArrayList of file extensions AppleScript associates with
      */
+    @Override
     public List<String> getExtensions() {
         TRACE("getExtensions()");
         return Arrays.asList("scpt", "applescript", "app");
@@ -137,6 +137,7 @@
      *
      * @return ArrayList of mimetypes that AppleScript associates with
      */
+    @Override
     public List<String> getMimeTypes() {
         TRACE("getMimeTypes()");
         return Arrays.asList("application/x-applescript", "text/plain", "text/applescript");
@@ -148,6 +149,7 @@
      *
      * @return
      */
+    @Override
     public List<String> getNames() {
         TRACE("getNames()");
         return Arrays.asList("AppleScriptEngine", "AppleScript", "OSA");
@@ -165,6 +167,7 @@
      *            arguments to the function
      * @return the AppleScript string calling the method
      */
+    @Override
     public String getMethodCallSyntax(final String obj, final String fname, final String ... args) {
 //        StringBuilder builder = new StringBuilder();
 //        builder.append("my " + fname + "(");
@@ -181,6 +184,7 @@
      * @param toDisplay
      * @return
      */
+    @Override
     public String getOutputStatement(final String toDisplay) {
         // TODO -- this might even be good enough? XD
         return getMethodCallSyntax(null, "print", toDisplay);
@@ -193,8 +197,9 @@
      *            the key to look up
      * @return the static preseeded value for the key in the ScriptEngine, if it exists, otherwise <code>null</code>
      */
+    @Override
     public Object getParameter(final String key) {
-        final AppleScriptEngine engine = new AppleScriptEngine(this);
+        final AppleScriptEngine engine = getScriptEngine();
         if (!engine.getBindings(ScriptContext.ENGINE_SCOPE).containsKey(key)) return null;
         return engine.getBindings(ScriptContext.ENGINE_SCOPE).get(key);
     }
@@ -205,6 +210,7 @@
      * @param statements
      * @return
      */
+    @Override
     public String getProgram(final String ... statements) {
         final StringBuilder program = new StringBuilder();
         for (final String statement : statements) {
@@ -218,8 +224,21 @@
      *
      * @return new AppleScriptEngine with this factory as it's parent
      */
-    public ScriptEngine getScriptEngine() {
+    @Override
+    public AppleScriptEngine getScriptEngine() {
         AppleScriptEngine.checkSecurity();
+        ensureInitialized();
+
         return new AppleScriptEngine(this);
     }
+
+    private static synchronized void ensureInitialized() {
+        if (!initialized) {
+            initialized = true;
+
+            java.awt.Toolkit.getDefaultToolkit();
+            System.loadLibrary("AppleScriptEngine");
+            initNative();
+        }
+    }
 }
--- a/jdk/src/macosx/classes/com/apple/laf/AquaFileChooserUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/macosx/classes/com/apple/laf/AquaFileChooserUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -42,6 +42,7 @@
 import javax.swing.plaf.*;
 import javax.swing.table.*;
 
+import sun.swing.AbstractFilterComboBoxModel;
 import sun.swing.SwingUtilities2;
 
 public class AquaFileChooserUI extends FileChooserUI {
@@ -1266,64 +1267,9 @@
     /**
      * Data model for a type-face selection combo-box.
      */
-    protected class FilterComboBoxModel extends DefaultListModel implements ComboBoxModel, PropertyChangeListener {
-        int selectedIndex = -1;
-
-        protected FilterComboBoxModel() {
-            super();
-            final FileFilter filters[] = getFileChooser().getChoosableFileFilters();
-            for (int i = 0; i < filters.length; i++) {
-                this.add(i, filters[i]);
-            }
-        }
-
-        public void propertyChange(final PropertyChangeEvent e) {
-            final String prop = e.getPropertyName();
-            if (prop == JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY) {
-                this.clear();
-                final FileFilter filters[] = (FileFilter[])e.getNewValue();
-
-                for (int i = 0; i < filters.length; i++) {
-                    this.add(i, filters[i]);
-                }
-
-                fireContentsChanged(this, -1, -1);
-            } else if (prop == JFileChooser.FILE_FILTER_CHANGED_PROPERTY) {
-                final FileFilter currentFilter = (FileFilter)e.getNewValue();
-                FileFilter filters[] = getFileChooser().getChoosableFileFilters();
-
-                boolean found = false;
-                if (currentFilter != null) {
-                    for (final FileFilter element : filters) {
-                        if (element == currentFilter) {
-                            found = true;
-                        }
-                    }
-                    if (found == false) {
-                        getFileChooser().addChoosableFileFilter(currentFilter);
-                    }
-                }
-
-                filters = getFileChooser().getChoosableFileFilters();
-                setSelectedItem(e.getNewValue());
-            }
-        }
-
-        public void setSelectedItem(final Object filter) {
-            if (filter != null) {
-                selectedIndex = this.indexOf(filter);
-                fireContentsChanged(this, -1, -1);
-            }
-        }
-
-        public Object getSelectedItem() {
-            final Object returnValue = null;
-
-            if (this.size() > 0) {
-                if ((selectedIndex != -1) && (selectedIndex < size())) { return this.get(selectedIndex); }
-            }
-
-            return returnValue;
+    protected class FilterComboBoxModel extends AbstractFilterComboBoxModel {
+        protected JFileChooser getFileChooser() {
+            return AquaFileChooserUI.this.getFileChooser();
         }
     }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/macosx/classes/sun/awt/resources/awtosx.properties	Thu Sep 26 17:18:12 2013 -0700
@@ -0,0 +1,71 @@
+#
+# OS X specific AWT properties
+#
+
+# Modifier names
+AWT.shift=\u21e7
+AWT.control=\u2303
+AWT.alt=\u2325
+AWT.meta=\u2318
+AWT.altGraph=\u2325
+
+# Key names
+AWT.enter=\u23ce
+AWT.backSpace=\u232b
+AWT.tab=\u21e5
+AWT.cancel=\u238b
+AWT.clear=\u2327
+AWT.capsLock=\u21ea
+AWT.escape=\u238b
+AWT.space=\u2423
+AWT.pgup=\u21de
+AWT.pgdn=\u21df
+AWT.end=\u2198
+AWT.home=\u2196
+AWT.left=\u2190
+AWT.up=\u2191
+AWT.right=\u2192
+AWT.down=\u2193
+AWT.comma=,
+AWT.period=.
+AWT.slash=/
+AWT.semicolon=;
+AWT.equals=\u003d
+AWT.openBracket=[
+AWT.backSlash=\\
+AWT.closeBracket=]
+AWT.multiply=\u2328 *
+AWT.add=\u2328 +
+AWT.separator=\u2328 ,
+AWT.separater=\u2328 ,
+AWT.subtract=\u2328 -
+AWT.decimal=\u2328 .
+AWT.divide=\u2328 /
+AWT.delete=\u2326
+AWT.printScreen=\u2399
+AWT.backQuote=`
+AWT.quote='
+AWT.ampersand=&
+AWT.asterisk=*
+AWT.quoteDbl="
+AWT.Less=<
+AWT.greater=>
+AWT.braceLeft=[
+AWT.braceRight=]
+AWT.at=@
+AWT.colon=:
+AWT.circumflex=^
+AWT.dollar=$
+AWT.euro=\u20ac
+AWT.exclamationMark=!
+AWT.invertedExclamationMark=\u00a1
+AWT.leftParenthesis=(
+AWT.numberSign=#
+AWT.plus=+
+AWT.minus=-
+AWT.rightParenthesis=)
+AWT.underscore=_
+
+# Numeric Keypad
+AWT.numpad=\u2328
+
--- a/jdk/src/macosx/classes/sun/lwawt/LWButtonPeer.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/macosx/classes/sun/lwawt/LWButtonPeer.java	Thu Sep 26 17:18:12 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, 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
@@ -33,6 +33,10 @@
 
 import javax.swing.JButton;
 
+/**
+ * Lightweight implementation of {@link ButtonPeer}. Delegates most of the work
+ * to the {@link JButton}.
+ */
 final class LWButtonPeer extends LWComponentPeer<Button, JButton>
         implements ButtonPeer, ActionListener {
 
@@ -42,7 +46,7 @@
     }
 
     @Override
-    protected JButton createDelegate() {
+    JButton createDelegate() {
         return new JButtonDelegate();
     }
 
@@ -74,6 +78,7 @@
         return true;
     }
 
+    @SuppressWarnings("serial")// Safe: outer class is non-serializable.
     private final class JButtonDelegate extends JButton {
 
         // Empty non private constructor was added because access to this
--- a/jdk/src/macosx/classes/sun/lwawt/LWCanvasPeer.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/macosx/classes/sun/lwawt/LWCanvasPeer.java	Thu Sep 26 17:18:12 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, 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
@@ -33,6 +33,10 @@
 
 import javax.swing.JComponent;
 
+/**
+ * Lightweight implementation of {@link CanvasPeer}. This peer is empty, because
+ * all the components in lwawt use graphic object from the top level window.
+ */
 class LWCanvasPeer<T extends Component, D extends JComponent>
         extends LWComponentPeer<T, D> implements CanvasPeer {
 
--- a/jdk/src/macosx/classes/sun/lwawt/LWCheckboxPeer.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/macosx/classes/sun/lwawt/LWCheckboxPeer.java	Thu Sep 26 17:18:12 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, 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
@@ -41,6 +41,11 @@
 import javax.swing.JToggleButton;
 import javax.swing.SwingUtilities;
 
+/**
+ * Lightweight implementation of {@link CheckboxPeer}. Delegates most of the
+ * work to the {@link JCheckBox} and {@link JRadioButton}, which are placed
+ * inside an empty {@link JComponent}.
+ */
 final class LWCheckboxPeer
         extends LWComponentPeer<Checkbox, LWCheckboxPeer.CheckboxDelegate>
         implements CheckboxPeer, ItemListener {
@@ -51,12 +56,12 @@
     }
 
     @Override
-    protected CheckboxDelegate createDelegate() {
+    CheckboxDelegate createDelegate() {
         return new CheckboxDelegate();
     }
 
     @Override
-    protected Component getDelegateFocusOwner() {
+    Component getDelegateFocusOwner() {
         return getDelegate().getCurrentButton();
     }
 
@@ -137,6 +142,7 @@
         return true;
     }
 
+    @SuppressWarnings("serial")// Safe: outer class is non-serializable.
     final class CheckboxDelegate extends JComponent {
 
         private final JCheckBox cb;
--- a/jdk/src/macosx/classes/sun/lwawt/LWChoicePeer.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/macosx/classes/sun/lwawt/LWChoicePeer.java	Thu Sep 26 17:18:12 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, 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
@@ -26,14 +26,18 @@
 
 package sun.lwawt;
 
-import java.awt.Choice;
-import java.awt.Point;
+import java.awt.*;
 import java.awt.event.ItemEvent;
 import java.awt.event.ItemListener;
 import java.awt.peer.ChoicePeer;
 
-import javax.swing.JComboBox;
+import javax.accessibility.Accessible;
+import javax.swing.*;
 
+/**
+ * Lightweight implementation of {@link ChoicePeer}. Delegates most of the work
+ * to the {@link JComboBox}.
+ */
 final class LWChoicePeer extends LWComponentPeer<Choice, JComboBox<String>>
         implements ChoicePeer, ItemListener {
 
@@ -50,7 +54,7 @@
     }
 
     @Override
-    protected JComboBox<String> createDelegate() {
+    JComboBox<String> createDelegate() {
         return new JComboBoxDelegate();
     }
 
@@ -128,6 +132,7 @@
         return true;
     }
 
+    @SuppressWarnings("serial")// Safe: outer class is non-serializable.
     private final class JComboBoxDelegate extends JComboBox<String> {
 
         // Empty non private constructor was added because access to this
@@ -159,5 +164,32 @@
             }
             super.setSelectedItem(anObject);
         }
+
+        @Override
+        public void firePopupMenuWillBecomeVisible() {
+            super.firePopupMenuWillBecomeVisible();
+            SwingUtilities.invokeLater(new Runnable() {
+                @Override
+                public void run() {
+                    JPopupMenu popupMenu = getPopupMenu();
+                    if (popupMenu != null) {
+                        if (popupMenu.getInvoker() != LWChoicePeer.this.getTarget()) {
+                            popupMenu.setVisible(false);
+                            popupMenu.show(LWChoicePeer.this.getTarget(), 0, 0);
+                        }
+                    }
+                }
+            });
+        }
+
+        private JPopupMenu getPopupMenu() {
+            for (int i = 0; i < getAccessibleContext().getAccessibleChildrenCount(); i++) {
+                Accessible child = getAccessibleContext().getAccessibleChild(i);
+                if (child instanceof JPopupMenu) {
+                    return  (JPopupMenu) child;
+                }
+            }
+            return null;
+        }
     }
 }
--- a/jdk/src/macosx/classes/sun/lwawt/LWComponentPeer.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/macosx/classes/sun/lwawt/LWComponentPeer.java	Thu Sep 26 17:18:12 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, 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
@@ -72,19 +72,23 @@
 {
     private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.lwawt.focus.LWComponentPeer");
 
-    // State lock is to be used for modifications to this
-    // peer's fields (e.g. bounds, background, font, etc.)
-    // It should be the last lock in the lock chain
-    private final Object stateLock =
-            new StringBuilder("LWComponentPeer.stateLock");
+    /**
+     * State lock is to be used for modifications to this peer's fields (e.g.
+     * bounds, background, font, etc.) It should be the last lock in the lock
+     * chain
+     */
+    private final Object stateLock = new Object();
 
-    // The lock to operate with the peers hierarchy. AWT tree
-    // lock is not used as there are many peers related ops
-    // to be done on the toolkit thread, and we don't want to
-    // depend on a public lock on this thread
-    private static final Object peerTreeLock =
-            new StringBuilder("LWComponentPeer.peerTreeLock");
+    /**
+     * The lock to operate with the peers hierarchy. AWT tree lock is not used
+     * as there are many peers related ops to be done on the toolkit thread, and
+     * we don't want to depend on a public lock on this thread
+     */
+    private static final Object peerTreeLock = new Object();
 
+    /**
+     * The associated AWT object.
+     */
     private final T target;
 
     /**
@@ -95,7 +99,7 @@
      * the hierarchy. The exception is LWWindowPeers: their containers are
      * always null
      */
-    private final LWContainerPeer containerPeer;
+    private final LWContainerPeer<?, ?> containerPeer;
 
     /**
      * Handy reference to the top-level window peer. Window peer is borrowed
@@ -147,11 +151,18 @@
      */
     private Image backBuffer;
 
+    /**
+     * All Swing delegates use delegateContainer as a parent. This container
+     * intentionally do not use parent of the peer.
+     */
+    @SuppressWarnings("serial")// Safe: outer class is non-serializable.
     private final class DelegateContainer extends Container {
         {
             enableEvents(0xFFFFFFFF);
         }
 
+        // Empty non private constructor was added because access to this
+        // class shouldn't be emulated by a synthetic accessor method.
         DelegateContainer() {
             super();
         }
@@ -182,7 +193,7 @@
         }
     }
 
-    public LWComponentPeer(T target, PlatformComponent platformComponent) {
+    LWComponentPeer(final T target, final PlatformComponent platformComponent) {
         targetPaintArea = new LWRepaintArea();
         this.target = target;
         this.platformComponent = platformComponent;
@@ -276,15 +287,18 @@
      * This method is called under getDelegateLock().
      * Overridden in subclasses.
      */
-    protected D createDelegate() {
+    D createDelegate() {
         return null;
     }
 
-    protected final D getDelegate() {
+    final D getDelegate() {
         return delegate;
     }
 
-    protected Component getDelegateFocusOwner() {
+    /**
+     * This method should be called under getDelegateLock().
+     */
+    Component getDelegateFocusOwner() {
         return getDelegate();
     }
 
@@ -356,7 +370,7 @@
     }
 
     // Just a helper method
-    protected final LWContainerPeer getContainerPeer() {
+    protected final LWContainerPeer<?, ?> getContainerPeer() {
         return containerPeer;
     }
 
@@ -390,7 +404,7 @@
 
     protected void disposeImpl() {
         destroyBuffers();
-        LWContainerPeer cp = getContainerPeer();
+        LWContainerPeer<?, ?> cp = getContainerPeer();
         if (cp != null) {
             cp.removeChildPeer(this);
         }
@@ -462,12 +476,13 @@
         sg2d.constrain(size.x, size.y, size.width, size.height, getVisibleRegion());
     }
 
-    public Region getVisibleRegion() {
+    Region getVisibleRegion() {
         return computeVisibleRect(this, getRegion());
     }
 
-    static final Region computeVisibleRect(LWComponentPeer c, Region region) {
-        final LWContainerPeer p = c.getContainerPeer();
+    static final Region computeVisibleRect(final LWComponentPeer<?, ?> c,
+                                           Region region) {
+        final LWContainerPeer<?, ?> p = c.getContainerPeer();
         if (p != null) {
             final Rectangle r = c.getBounds();
             region = region.getTranslatedRegion(r.x, r.y);
@@ -612,7 +627,7 @@
      * @param p Point relative to the peer.
      * @return Cursor of the peer or null if default cursor should be used.
      */
-    protected Cursor getCursor(final Point p) {
+    Cursor getCursor(final Point p) {
         return getTarget().getCursor();
     }
 
@@ -717,7 +732,7 @@
     @Override
     public void setEnabled(final boolean e) {
         boolean status = e;
-        final LWComponentPeer cp = getContainerPeer();
+        final LWComponentPeer<?, ?> cp = getContainerPeer();
         if (cp != null) {
             status &= cp.isEnabled();
         }
@@ -802,12 +817,12 @@
     }
 
     @Override
-    public void setZOrder(ComponentPeer above) {
-        LWContainerPeer cp = getContainerPeer();
+    public void setZOrder(final ComponentPeer above) {
+        LWContainerPeer<?, ?> cp = getContainerPeer();
         // Don't check containerPeer for null as it can only happen
         // for windows, but this method is overridden in
         // LWWindowPeer and doesn't call super()
-        cp.setChildPeerZOrder(this, (LWComponentPeer) above);
+        cp.setChildPeerZOrder(this, (LWComponentPeer<?, ?>) above);
     }
 
     @Override
@@ -923,7 +938,9 @@
                     LWKeyboardFocusManagerPeer.removeLastFocusRequest(getTarget());
                     return false;
                 }
-                LWWindowPeer parentPeer = (LWWindowPeer) parentWindow.getPeer();
+                final LWWindowPeer parentPeer =
+                        (LWWindowPeer) AWTAccessor.getComponentAccessor()
+                                                  .getPeer(parentWindow);
                 if (parentPeer == null) {
                     focusLog.fine("request rejected, parentPeer is null");
                     LWKeyboardFocusManagerPeer.removeLastFocusRequest(getTarget());
@@ -1138,7 +1155,7 @@
     }
 
     protected final void repaintParent(final Rectangle oldB) {
-        final LWContainerPeer cp = getContainerPeer();
+        final LWContainerPeer<?, ?> cp = getContainerPeer();
         if (cp != null) {
             // Repaint unobscured part of the parent
             cp.repaintPeer(cp.getContentSize().intersection(oldB));
@@ -1254,6 +1271,8 @@
             KeyEvent ke = (KeyEvent) e;
             delegateEvent = new KeyEvent(getDelegateFocusOwner(), ke.getID(), ke.getWhen(),
                     ke.getModifiers(), ke.getKeyCode(), ke.getKeyChar(), ke.getKeyLocation());
+            AWTAccessor.getKeyEventAccessor().setExtendedKeyCode((KeyEvent) delegateEvent,
+                    ke.getExtendedKeyCode());
         } else if (e instanceof FocusEvent) {
             FocusEvent fe = (FocusEvent) e;
             delegateEvent = new FocusEvent(getDelegateFocusOwner(), fe.getID(), fe.isTemporary());
@@ -1273,7 +1292,7 @@
     /**
      * Handler for FocusEvents.
      */
-    protected void handleJavaFocusEvent(FocusEvent e) {
+    void handleJavaFocusEvent(final FocusEvent e) {
         // Note that the peer receives all the FocusEvents from
         // its lightweight children as well
         KeyboardFocusManagerPeer kfmPeer = LWKeyboardFocusManagerPeer.getInstance();
@@ -1309,7 +1328,7 @@
      * Finds a top-most visible component for the given point. The location is
      * specified relative to the peer's parent.
      */
-    public LWComponentPeer findPeerAt(final int x, final int y) {
+    LWComponentPeer<?, ?> findPeerAt(final int x, final int y) {
         final Rectangle r = getBounds();
         final Region sh = getRegion();
         final boolean found = isVisible() && sh.contains(x - r.x, y - r.y);
@@ -1326,7 +1345,7 @@
     }
 
     public Point windowToLocal(Point p, LWWindowPeer wp) {
-        LWComponentPeer cp = this;
+        LWComponentPeer<?, ?> cp = this;
         while (cp != wp) {
             Rectangle cpb = cp.getBounds();
             p.x -= cpb.x;
@@ -1347,7 +1366,7 @@
     }
 
     public Point localToWindow(Point p) {
-        LWComponentPeer cp = getContainerPeer();
+        LWComponentPeer<?, ?> cp = getContainerPeer();
         Rectangle r = getBounds();
         while (cp != null) {
             p.x += r.x;
@@ -1368,7 +1387,7 @@
         repaintPeer(getSize());
     }
 
-    public void repaintPeer(final Rectangle r) {
+    void repaintPeer(final Rectangle r) {
         final Rectangle toPaint = getSize().intersection(r);
         if (!isShowing() || toPaint.isEmpty()) {
             return;
@@ -1387,7 +1406,7 @@
     protected final boolean isShowing() {
         synchronized (getPeerTreeLock()) {
             if (isVisible()) {
-                final LWContainerPeer container = getContainerPeer();
+                final LWContainerPeer<?, ?> container = getContainerPeer();
                 return (container == null) || container.isShowing();
             }
         }
@@ -1395,8 +1414,7 @@
     }
 
     /**
-     * Paints the peer. Overridden in subclasses to delegate the actual painting
-     * to Swing components.
+     * Paints the peer. Delegate the actual painting to Swing components.
      */
     protected final void paintPeer(final Graphics g) {
         final D delegate = getDelegate();
--- a/jdk/src/macosx/classes/sun/lwawt/LWContainerPeer.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/macosx/classes/sun/lwawt/LWContainerPeer.java	Thu Sep 26 17:18:12 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, 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
@@ -41,32 +41,25 @@
 import javax.swing.JComponent;
 
 abstract class LWContainerPeer<T extends Container, D extends JComponent>
-    extends LWCanvasPeer<T, D>
-    implements ContainerPeer
-{
-    // List of child peers sorted by z-order from bottom-most
-    // to top-most
-    private List<LWComponentPeer> childPeers =
-        new LinkedList<LWComponentPeer>();
+        extends LWCanvasPeer<T, D> implements ContainerPeer {
 
-    LWContainerPeer(T target, PlatformComponent platformComponent) {
+    /**
+     * List of child peers sorted by z-order from bottom-most to top-most.
+     */
+    private final List<LWComponentPeer<?, ?>> childPeers = new LinkedList<>();
+
+    LWContainerPeer(final T target, final PlatformComponent platformComponent) {
         super(target, platformComponent);
     }
 
-    void addChildPeer(LWComponentPeer child) {
+    final void addChildPeer(final LWComponentPeer<?, ?> child) {
         synchronized (getPeerTreeLock()) {
-            addChildPeer(child, childPeers.size());
+            childPeers.add(childPeers.size(), child);
+            // TODO: repaint
         }
     }
 
-    void addChildPeer(LWComponentPeer child, int index) {
-        synchronized (getPeerTreeLock()) {
-            childPeers.add(index, child);
-        }
-        // TODO: repaint
-    }
-
-    void removeChildPeer(LWComponentPeer child) {
+    final void removeChildPeer(final LWComponentPeer<?, ?> child) {
         synchronized (getPeerTreeLock()) {
             childPeers.remove(child);
         }
@@ -74,7 +67,8 @@
     }
 
     // Used by LWComponentPeer.setZOrder()
-    void setChildPeerZOrder(LWComponentPeer peer, LWComponentPeer above) {
+    final void setChildPeerZOrder(final LWComponentPeer<?, ?> peer,
+                                  final LWComponentPeer<?, ?> above) {
         synchronized (getPeerTreeLock()) {
             childPeers.remove(peer);
             int index = (above != null) ? childPeers.indexOf(above) : childPeers.size();
@@ -98,25 +92,27 @@
     }
 
     @Override
-    public void beginValidate() {
-        // TODO: it seems that begin/endValidate() is only useful
-        // for heavyweight windows, when a batch movement for
-        // child windows  occurs. That's why no-op
-    }
-    @Override
-    public void endValidate() {
+    public final void beginValidate() {
         // TODO: it seems that begin/endValidate() is only useful
         // for heavyweight windows, when a batch movement for
         // child windows  occurs. That's why no-op
     }
 
     @Override
-    public void beginLayout() {
+    public final void endValidate() {
+        // TODO: it seems that begin/endValidate() is only useful
+        // for heavyweight windows, when a batch movement for
+        // child windows  occurs. That's why no-op
+    }
+
+    @Override
+    public final void beginLayout() {
         // Skip all painting till endLayout()
         setLayouting(true);
     }
+
     @Override
-    public void endLayout() {
+    public final void endLayout() {
         setLayouting(false);
 
         // Post an empty event to flush all the pending target paints
@@ -125,18 +121,19 @@
 
     // ---- PEER NOTIFICATIONS ---- //
 
-    /*
+    /**
      * Returns a copy of the childPeer collection.
      */
-    protected List<LWComponentPeer> getChildren() {
+    @SuppressWarnings("unchecked")
+    final List<LWComponentPeer<?, ?>> getChildren() {
         synchronized (getPeerTreeLock()) {
-            Object copy = ((LinkedList)childPeers).clone();
-            return (List<LWComponentPeer>)copy;
+            Object copy = ((LinkedList<?>) childPeers).clone();
+            return (List<LWComponentPeer<?, ?>>) copy;
         }
     }
 
     @Override
-    public final Region getVisibleRegion() {
+    final Region getVisibleRegion() {
         return cutChildren(super.getVisibleRegion(), null);
     }
 
@@ -144,9 +141,9 @@
      * Removes bounds of children above specific child from the region. If above
      * is null removes all bounds of children.
      */
-    protected final Region cutChildren(Region r, final LWComponentPeer above) {
+    final Region cutChildren(Region r, final LWComponentPeer<?, ?> above) {
         boolean aboveFound = above == null;
-        for (final LWComponentPeer child : getChildren()) {
+        for (final LWComponentPeer<?, ?> child : getChildren()) {
             if (!aboveFound && child == above) {
                 aboveFound = true;
                 continue;
@@ -170,8 +167,8 @@
      * specified relative to the peer's parent.
      */
     @Override
-    public final LWComponentPeer findPeerAt(int x, int y) {
-        LWComponentPeer peer = super.findPeerAt(x, y);
+    final LWComponentPeer<?, ?> findPeerAt(int x, int y) {
+        LWComponentPeer<?, ?> peer = super.findPeerAt(x, y);
         final Rectangle r = getBounds();
         // Translate to this container's coordinates to pass to children
         x -= r.x;
@@ -179,7 +176,7 @@
         if (peer != null && getContentSize().contains(x, y)) {
             synchronized (getPeerTreeLock()) {
                 for (int i = childPeers.size() - 1; i >= 0; --i) {
-                    LWComponentPeer p = childPeers.get(i).findPeerAt(x, y);
+                    LWComponentPeer<?, ?> p = childPeers.get(i).findPeerAt(x, y);
                     if (p != null) {
                         peer = p;
                         break;
@@ -195,7 +192,7 @@
     * peers should be repainted
     */
     @Override
-    public final void repaintPeer(final Rectangle r) {
+    final void repaintPeer(final Rectangle r) {
         final Rectangle toPaint = getSize().intersection(r);
         if (!isShowing() || toPaint.isEmpty()) {
             return;
@@ -208,13 +205,13 @@
         repaintChildren(toPaint);
     }
 
-    /*
-    * Paints all the child peers in the straight z-order, so the
-    * bottom-most ones are painted first.
-    */
+    /**
+     * Paints all the child peers in the straight z-order, so the
+     * bottom-most ones are painted first.
+     */
     private void repaintChildren(final Rectangle r) {
         final Rectangle content = getContentSize();
-        for (final LWComponentPeer child : getChildren()) {
+        for (final LWComponentPeer<?, ?> child : getChildren()) {
             final Rectangle childBounds = child.getBounds();
             Rectangle toPaint = r.intersection(childBounds);
             toPaint = toPaint.intersection(content);
@@ -223,21 +220,21 @@
         }
     }
 
-    protected Rectangle getContentSize() {
+    Rectangle getContentSize() {
         return getSize();
     }
 
     @Override
     public void setEnabled(final boolean e) {
         super.setEnabled(e);
-        for (final LWComponentPeer child : getChildren()) {
+        for (final LWComponentPeer<?, ?> child : getChildren()) {
             child.setEnabled(e && child.getTarget().isEnabled());
         }
     }
 
     @Override
     public void setBackground(final Color c) {
-        for (final LWComponentPeer child : getChildren()) {
+        for (final LWComponentPeer<?, ?> child : getChildren()) {
             if (!child.getTarget().isBackgroundSet()) {
                 child.setBackground(c);
             }
@@ -247,7 +244,7 @@
 
     @Override
     public void setForeground(final Color c) {
-        for (final LWComponentPeer child : getChildren()) {
+        for (final LWComponentPeer<?, ?> child : getChildren()) {
             if (!child.getTarget().isForegroundSet()) {
                 child.setForeground(c);
             }
@@ -257,7 +254,7 @@
 
     @Override
     public void setFont(final Font f) {
-        for (final LWComponentPeer child : getChildren()) {
+        for (final LWComponentPeer<?, ?> child : getChildren()) {
             if (!child.getTarget().isFontSet()) {
                 child.setFont(f);
             }
--- a/jdk/src/macosx/classes/sun/lwawt/LWCursorManager.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/macosx/classes/sun/lwawt/LWCursorManager.java	Thu Sep 26 17:18:12 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, 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
@@ -32,6 +32,7 @@
 
 import java.util.concurrent.atomic.AtomicBoolean;
 
+import sun.awt.AWTAccessor;
 import sun.awt.SunToolkit;
 
 public abstract class LWCursorManager {
@@ -105,11 +106,13 @@
             c = peer.getTarget();
             if (c instanceof Container) {
                 final Point p = peer.getLocationOnScreen();
-                c = ((Container) c).findComponentAt(cursorPos.x - p.x,
-                                                    cursorPos.y - p.y);
+                c = AWTAccessor.getContainerAccessor().findComponentAt(
+                    (Container) c, cursorPos.x - p.x, cursorPos.y - p.y, false);
+
             }
             while (c != null) {
-                if (c.isVisible() && c.isEnabled() && (c.getPeer() != null)) {
+                final Object p = AWTAccessor.getComponentAccessor().getPeer(c);
+                if (c.isVisible() && c.isEnabled() && p != null) {
                     break;
                 }
                 c = c.getParent();
--- a/jdk/src/macosx/classes/sun/lwawt/LWLabelPeer.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/macosx/classes/sun/lwawt/LWLabelPeer.java	Thu Sep 26 17:18:12 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, 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
@@ -44,7 +44,7 @@
     }
 
     @Override
-    protected JLabel createDelegate() {
+    JLabel createDelegate() {
         return new JLabel();
     }
 
--- a/jdk/src/macosx/classes/sun/lwawt/LWLightweightFramePeer.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/macosx/classes/sun/lwawt/LWLightweightFramePeer.java	Thu Sep 26 17:18:12 2013 -0700
@@ -34,6 +34,8 @@
 
 import sun.awt.CausedFocusEvent;
 import sun.awt.LightweightFrame;
+import sun.swing.JLightweightFrame;
+import sun.swing.SwingAccessor;
 
 public class LWLightweightFramePeer extends LWWindowPeer {
 
@@ -91,11 +93,6 @@
     }
 
     @Override
-    public void updateCursorImmediately() {
-        // TODO: tries to switch to the awt/fx toolkit thread and causes a deadlock on macosx
-    }
-
-    @Override
     public void addDropTarget(DropTarget dt) {
     }
 
@@ -112,4 +109,9 @@
     public void ungrab() {
         getLwTarget().ungrabFocus();
     }
+
+    @Override
+    public void updateCursorImmediately() {
+        SwingAccessor.getJLightweightFrameAccessor().updateCursor((JLightweightFrame)getLwTarget());
+    }
 }
--- a/jdk/src/macosx/classes/sun/lwawt/LWListPeer.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/macosx/classes/sun/lwawt/LWListPeer.java	Thu Sep 26 17:18:12 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, 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
@@ -33,7 +33,8 @@
 import java.util.Arrays;
 
 /**
- * Lightweight implementation of {@link ListPeer}.
+ * Lightweight implementation of {@link ListPeer}. Delegates most of the work to
+ * the {@link JList}, which is placed inside {@link JScrollPane}.
  */
 final class LWListPeer extends LWComponentPeer<List, LWListPeer.ScrollableJList>
         implements ListPeer {
@@ -56,7 +57,7 @@
     }
 
     @Override
-    protected ScrollableJList createDelegate() {
+    ScrollableJList createDelegate() {
         return new ScrollableJList();
     }
 
@@ -78,7 +79,7 @@
     }
 
     @Override
-    protected Component getDelegateFocusOwner() {
+    Component getDelegateFocusOwner() {
         return getDelegate().getView();
     }
 
@@ -193,6 +194,7 @@
         }
     }
 
+    @SuppressWarnings("serial")// Safe: outer class is non-serializable.
     final class ScrollableJList extends JScrollPane implements ListSelectionListener {
 
         private boolean skipStateChangedEvent;
@@ -234,9 +236,10 @@
         }
 
         @Override
+        @SuppressWarnings("unchecked")
         public void valueChanged(final ListSelectionEvent e) {
             if (!e.getValueIsAdjusting() && !isSkipStateChangedEvent()) {
-                final JList source = (JList) e.getSource();
+                final JList<?> source = (JList<?>) e.getSource();
                 for(int i = 0 ; i < source.getModel().getSize(); i++) {
 
                     final boolean wasSelected = Arrays.binarySearch(oldSelectedIndices, i) >= 0;
@@ -255,6 +258,7 @@
             }
         }
 
+        @SuppressWarnings("unchecked")
         public JList<String> getView() {
             return (JList<String>) getViewport().getView();
         }
@@ -289,7 +293,7 @@
         private final class JListDelegate extends JList<String> {
 
             JListDelegate() {
-                super(ScrollableJList.this.model);
+                super(model);
             }
 
             @Override
--- a/jdk/src/macosx/classes/sun/lwawt/LWMouseInfoPeer.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/macosx/classes/sun/lwawt/LWMouseInfoPeer.java	Thu Sep 26 17:18:12 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, 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
@@ -30,10 +30,9 @@
 
 import java.awt.peer.MouseInfoPeer;
 
-public class LWMouseInfoPeer implements MouseInfoPeer {
+import sun.awt.AWTAccessor;
 
-    public LWMouseInfoPeer() {
-    }
+public class LWMouseInfoPeer implements MouseInfoPeer {
 
     @Override
     public int fillPointWithCoords(Point point) {
@@ -52,7 +51,7 @@
             return false;
         }
 
-        LWWindowPeer windowPeer = (LWWindowPeer)w.getPeer();
+        final Object windowPeer = AWTAccessor.getComponentAccessor().getPeer(w);
         return LWWindowPeer.getWindowUnderCursor() == windowPeer;
     }
 
--- a/jdk/src/macosx/classes/sun/lwawt/LWPanelPeer.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/macosx/classes/sun/lwawt/LWPanelPeer.java	Thu Sep 26 17:18:12 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, 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
@@ -31,6 +31,10 @@
 
 import javax.swing.JPanel;
 
+/**
+ * Lightweight implementation of {@link PanelPeer}. Delegates most of the work
+ * to the {@link JPanel}.
+ */
 final class LWPanelPeer extends LWContainerPeer<Panel, JPanel>
         implements PanelPeer {
 
@@ -39,7 +43,7 @@
     }
 
     @Override
-    public JPanel createDelegate() {
+    JPanel createDelegate() {
         return new JPanel();
     }
 }
--- a/jdk/src/macosx/classes/sun/lwawt/LWRepaintArea.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/macosx/classes/sun/lwawt/LWRepaintArea.java	Thu Sep 26 17:18:12 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, 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
@@ -26,39 +26,38 @@
 
 package sun.lwawt;
 
-import sun.awt.RepaintArea;
-
 import java.awt.Component;
 import java.awt.Graphics;
 
+import sun.awt.AWTAccessor;
+import sun.awt.RepaintArea;
+
 /**
+ * Emulates appearance of heavyweight components before call of the user code.
+ *
  * @author Sergey Bylokhov
  */
 final class LWRepaintArea extends RepaintArea {
 
     @Override
     protected void updateComponent(final Component comp, final Graphics g) {
+        // We shouldn't paint native component as a result of UPDATE events,
+        // just flush onscreen back-buffer.
         if (comp != null) {
             super.updateComponent(comp, g);
-            flushBuffers((LWComponentPeer) comp.getPeer());
+            LWComponentPeer.flushOnscreenGraphics();
         }
     }
 
     @Override
     protected void paintComponent(final Component comp, final Graphics g) {
         if (comp != null) {
-            final LWComponentPeer peer = (LWComponentPeer) comp.getPeer();
+            Object peer = AWTAccessor.getComponentAccessor().getPeer(comp);
             if (peer != null) {
-                peer.paintPeer(g);
+                ((LWComponentPeer<?, ?>) peer).paintPeer(g);
             }
             super.paintComponent(comp, g);
-            flushBuffers(peer);
-        }
-    }
-
-    private static void flushBuffers(final LWComponentPeer peer) {
-        if (peer != null) {
-            peer.flushOnscreenGraphics();
+            LWComponentPeer.flushOnscreenGraphics();
         }
     }
 }
--- a/jdk/src/macosx/classes/sun/lwawt/LWScrollBarPeer.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/macosx/classes/sun/lwawt/LWScrollBarPeer.java	Thu Sep 26 17:18:12 2013 -0700
@@ -34,10 +34,14 @@
 
 import javax.swing.JScrollBar;
 
+/**
+ * Lightweight implementation of {@link ScrollbarPeer}. Delegates most of the
+ * work to the {@link JScrollBar}.
+ */
 final class LWScrollBarPeer extends LWComponentPeer<Scrollbar, JScrollBar>
         implements ScrollbarPeer, AdjustmentListener {
 
-    //JScrollBar fires two changes with firePropertyChange (one for old value
+    // JScrollBar fires two changes with firePropertyChange (one for old value
     // and one for new one.
     // We save the last value and don't fire event if not changed.
     private int currentValue;
@@ -48,7 +52,7 @@
     }
 
     @Override
-    protected JScrollBar createDelegate() {
+    JScrollBar createDelegate() {
         return new JScrollBar();
     }
 
--- a/jdk/src/macosx/classes/sun/lwawt/LWScrollPanePeer.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/macosx/classes/sun/lwawt/LWScrollPanePeer.java	Thu Sep 26 17:18:12 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, 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
@@ -33,6 +33,10 @@
 import java.awt.peer.ScrollPanePeer;
 import java.util.List;
 
+/**
+ * Lightweight implementation of {@link ScrollPanePeer}. Delegates most of the
+ * work to the {@link JScrollPane}.
+ */
 final class LWScrollPanePeer extends LWContainerPeer<ScrollPane, JScrollPane>
         implements ScrollPanePeer, ChangeListener {
 
@@ -41,7 +45,8 @@
         super(target, platformComponent);
     }
 
-    protected JScrollPane createDelegate() {
+    @Override
+    JScrollPane createDelegate() {
         final JScrollPane sp = new JScrollPane();
         final JPanel panel = new JPanel();
         panel.setOpaque(false);
@@ -72,7 +77,7 @@
         SwingUtilities.invokeLater(new Runnable() {
             @Override
             public void run() {
-                final LWComponentPeer viewPeer = getViewPeer();
+                final LWComponentPeer<?, ?> viewPeer = getViewPeer();
                 if (viewPeer != null) {
                     final Rectangle r;
                     synchronized (getDelegateLock()) {
@@ -96,14 +101,13 @@
         }
     }
 
-    LWComponentPeer getViewPeer() {
-        List<LWComponentPeer> peerList = getChildren();
+    LWComponentPeer<?, ?> getViewPeer() {
+        final List<LWComponentPeer<?, ?>> peerList = getChildren();
         return peerList.isEmpty() ? null : peerList.get(0);
     }
 
-
     @Override
-    protected Rectangle getContentSize() {
+    Rectangle getContentSize() {
         Rectangle viewRect = getDelegate().getViewport().getViewRect();
         return new Rectangle(viewRect.width, viewRect.height);
     }
@@ -112,7 +116,7 @@
     public void layout() {
         super.layout();
         synchronized (getDelegateLock()) {
-            LWComponentPeer viewPeer = getViewPeer();
+            final LWComponentPeer<?, ?> viewPeer = getViewPeer();
             if (viewPeer != null) {
                 Component view = getDelegate().getViewport().getView();
                 view.setBounds(viewPeer.getBounds());
--- a/jdk/src/macosx/classes/sun/lwawt/LWTextAreaPeer.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/macosx/classes/sun/lwawt/LWTextAreaPeer.java	Thu Sep 26 17:18:12 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, 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
@@ -44,7 +44,7 @@
 
 /**
  * Lightweight implementation of {@link TextAreaPeer}. Delegates most of the
- * work to the {@link JTextArea} inside JScrollPane.
+ * work to the {@link JTextArea} inside {@link JScrollPane}.
  */
 final class LWTextAreaPeer
         extends LWTextComponentPeer<TextArea, LWTextAreaPeer.ScrollableJTextArea>
@@ -66,7 +66,7 @@
     }
 
     @Override
-    protected ScrollableJTextArea createDelegate() {
+    ScrollableJTextArea createDelegate() {
         return new ScrollableJTextArea();
     }
 
@@ -85,7 +85,7 @@
     }
 
     @Override
-    protected Cursor getCursor(final Point p) {
+    Cursor getCursor(final Point p) {
         final boolean isContains;
         synchronized (getDelegateLock()) {
             isContains = getDelegate().getViewport().getBounds().contains(p);
@@ -94,7 +94,7 @@
     }
 
     @Override
-    protected Component getDelegateFocusOwner() {
+    Component getDelegateFocusOwner() {
         return getTextComponent();
     }
 
@@ -200,7 +200,7 @@
         }
     }
 
-    @SuppressWarnings("serial")
+    @SuppressWarnings("serial")// Safe: outer class is non-serializable.
     final class ScrollableJTextArea extends JScrollPane {
 
         ScrollableJTextArea() {
@@ -218,7 +218,6 @@
             super.setEnabled(enabled);
         }
 
-        @SuppressWarnings("serial")
         private final class JTextAreaDelegate extends JTextArea {
 
             // Empty non private constructor was added because access to this
--- a/jdk/src/macosx/classes/sun/lwawt/LWTextComponentPeer.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/macosx/classes/sun/lwawt/LWTextComponentPeer.java	Thu Sep 26 17:18:12 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, 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
@@ -44,11 +44,14 @@
 import javax.swing.text.Document;
 import javax.swing.text.JTextComponent;
 
+/**
+ * Lightweight implementation of {@link TextComponentPeer}. Provides useful
+ * methods for {@link LWTextAreaPeer} and {@link LWTextFieldPeer}
+ */
 abstract class LWTextComponentPeer<T extends TextComponent, D extends JComponent>
         extends LWComponentPeer<T, D>
         implements DocumentListener, TextComponentPeer, InputMethodListener {
 
-
     private volatile boolean firstChangeSkipped;
 
     LWTextComponentPeer(final T target,
@@ -218,14 +221,14 @@
     }
 
     @Override
-    public void inputMethodTextChanged(InputMethodEvent event) {
+    public void inputMethodTextChanged(final InputMethodEvent event) {
         synchronized (getDelegateLock()) {
             AWTAccessor.getComponentAccessor().processEvent(getTextComponent(), event);
         }
     }
 
     @Override
-    public void caretPositionChanged(InputMethodEvent event) {
+    public void caretPositionChanged(final InputMethodEvent event) {
         synchronized (getDelegateLock()) {
             AWTAccessor.getComponentAccessor().processEvent(getTextComponent(), event);
         }
--- a/jdk/src/macosx/classes/sun/lwawt/LWTextFieldPeer.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/macosx/classes/sun/lwawt/LWTextFieldPeer.java	Thu Sep 26 17:18:12 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, 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
@@ -37,6 +37,10 @@
 import javax.swing.*;
 import javax.swing.text.JTextComponent;
 
+/**
+ * Lightweight implementation of {@link TextFieldPeer}. Delegates most of the
+ * work to the {@link JPasswordField}.
+ */
 final class LWTextFieldPeer
         extends LWTextComponentPeer<TextField, JPasswordField>
         implements TextFieldPeer, ActionListener {
@@ -47,7 +51,7 @@
     }
 
     @Override
-    protected JPasswordField createDelegate() {
+    JPasswordField createDelegate() {
         return new JPasswordFieldDelegate();
     }
 
@@ -107,7 +111,7 @@
      * @param e the focus event
      */
     @Override
-    protected void handleJavaFocusEvent(final FocusEvent e) {
+    void handleJavaFocusEvent(final FocusEvent e) {
         if (e.getID() == FocusEvent.FOCUS_LOST) {
             // In order to de-select the selection
             setCaretPosition(0);
@@ -115,6 +119,7 @@
         super.handleJavaFocusEvent(e);
     }
 
+    @SuppressWarnings("serial")// Safe: outer class is non-serializable.
     private final class JPasswordFieldDelegate extends JPasswordField {
 
         // Empty non private constructor was added because access to this
--- a/jdk/src/macosx/classes/sun/lwawt/LWToolkit.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/macosx/classes/sun/lwawt/LWToolkit.java	Thu Sep 26 17:18:12 2013 -0700
@@ -557,16 +557,18 @@
     }
 
     @Override
-    public void grab(Window w) {
-        if (w.getPeer() != null) {
-            ((LWWindowPeer)w.getPeer()).grab();
+    public void grab(final Window w) {
+        final Object peer = AWTAccessor.getComponentAccessor().getPeer(w);
+        if (peer != null) {
+            ((LWWindowPeer) peer).grab();
         }
     }
 
     @Override
-    public void ungrab(Window w) {
-        if (w.getPeer() != null) {
-            ((LWWindowPeer)w.getPeer()).ungrab(false);
+    public void ungrab(final Window w) {
+        final Object peer = AWTAccessor.getComponentAccessor().getPeer(w);
+        if (peer != null) {
+            ((LWWindowPeer) peer).ungrab(false);
         }
     }
 
--- a/jdk/src/macosx/classes/sun/lwawt/LWWindowPeer.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/macosx/classes/sun/lwawt/LWWindowPeer.java	Thu Sep 26 17:18:12 2013 -0700
@@ -43,7 +43,7 @@
     extends LWContainerPeer<Window, JComponent>
     implements FramePeer, DialogPeer, FullScreenCapable, DisplayChangedListener, PlatformEventNotifier
 {
-    public static enum PeerType {
+    public enum PeerType {
         SIMPLEWINDOW,
         FRAME,
         DIALOG,
@@ -83,15 +83,15 @@
 
     // A peer where the last mouse event came to. Used by cursor manager to
     // find the component under cursor
-    private static volatile LWComponentPeer lastCommonMouseEventPeer = null;
+    private static volatile LWComponentPeer<?, ?> lastCommonMouseEventPeer;
 
     // A peer where the last mouse event came to. Used to generate
     // MOUSE_ENTERED/EXITED notifications
-    private volatile LWComponentPeer lastMouseEventPeer;
+    private volatile LWComponentPeer<?, ?> lastMouseEventPeer;
 
     // Peers where all dragged/released events should come to,
     // depending on what mouse button is being dragged according to Cocoa
-    private static LWComponentPeer mouseDownTarget[] = new LWComponentPeer[3];
+    private static final LWComponentPeer<?, ?>[] mouseDownTarget = new LWComponentPeer<?, ?>[3];
 
     // A bitmask that indicates what mouse buttons produce MOUSE_CLICKED events
     // on MOUSE_RELEASE. Click events are only generated if there were no drag
@@ -129,7 +129,8 @@
         this.peerType = peerType;
 
         Window owner = target.getOwner();
-        LWWindowPeer ownerPeer = (owner != null) ? (LWWindowPeer)owner.getPeer() : null;
+        LWWindowPeer ownerPeer = owner == null ? null :
+             (LWWindowPeer) AWTAccessor.getComponentAccessor().getPeer(owner);
         PlatformWindow ownerDelegate = (ownerPeer != null) ? ownerPeer.getPlatformWindow() : null;
 
         // The delegate.initialize() needs a non-null GC on X11.
@@ -163,10 +164,10 @@
 
         // Init warning window(for applets)
         SecurityWarningWindow warn = null;
-        if (((Window)target).getWarningString() != null) {
+        if (target.getWarningString() != null) {
             // accessSystemTray permission allows to display TrayIcon, TrayIcon tooltip
             // and TrayIcon balloon windows without a warning window.
-            if (!AWTAccessor.getWindowAccessor().isTrayIconWindow((Window)target)) {
+            if (!AWTAccessor.getWindowAccessor().isTrayIconWindow(target)) {
                 LWToolkit toolkit = (LWToolkit)Toolkit.getDefaultToolkit();
                 warn = toolkit.createSecurityWarning(target, this);
             }
@@ -210,6 +211,7 @@
     }
 
     // Just a helper method
+    @Override
     public PlatformWindow getPlatformWindow() {
         return platformWindow;
     }
@@ -391,7 +393,8 @@
     @Override
     public void setModalBlocked(Dialog blocker, boolean blocked) {
         synchronized (getPeerTreeLock()) {
-            this.blocker = blocked ? (LWWindowPeer)blocker.getPeer() : null;
+            this.blocker = !blocked ? null :
+            (LWWindowPeer) AWTAccessor.getComponentAccessor().getPeer(blocker);
         }
 
         platformWindow.setModalBlocked(blocked);
@@ -458,6 +461,7 @@
         textured = isTextured;
     }
 
+    @Override
     public final boolean isTranslucent() {
         synchronized (getStateLock()) {
             /*
@@ -537,7 +541,8 @@
     public void blockWindows(List<Window> windows) {
         //TODO: LWX will probably need some collectJavaToplevels to speed this up
         for (Window w : windows) {
-            WindowPeer wp = (WindowPeer)w.getPeer();
+            WindowPeer wp =
+                    (WindowPeer) AWTAccessor.getComponentAccessor().getPeer(w);
             if (wp != null) {
                 wp.setModalBlocked((Dialog)getTarget(), true);
             }
@@ -694,7 +699,7 @@
         // TODO: fill "bdata" member of AWTEvent
         Rectangle r = getBounds();
         // findPeerAt() expects parent coordinates
-        LWComponentPeer targetPeer = findPeerAt(r.x + x, r.y + y);
+        LWComponentPeer<?, ?> targetPeer = findPeerAt(r.x + x, r.y + y);
 
         if (id == MouseEvent.MOUSE_EXITED) {
             isMouseOver = false;
@@ -743,7 +748,7 @@
                         screenX, screenY, modifiers, clickCount, popupTrigger,
                         targetPeer);
             } else {
-                LWComponentPeer topmostTargetPeer =
+                LWComponentPeer<?, ?> topmostTargetPeer =
                         topmostWindowPeer != null ? topmostWindowPeer.findPeerAt(r.x + x, r.y + y) : null;
                 topmostWindowPeer.generateMouseEnterExitEventsForComponents(when, button, x, y,
                         screenX, screenY, modifiers, clickCount, popupTrigger,
@@ -840,7 +845,7 @@
     private void generateMouseEnterExitEventsForComponents(long when,
             int button, int x, int y, int screenX, int screenY,
             int modifiers, int clickCount, boolean popupTrigger,
-            LWComponentPeer targetPeer) {
+            final LWComponentPeer<?, ?> targetPeer) {
 
         if (!isMouseOver || targetPeer == lastMouseEventPeer) {
             return;
@@ -899,7 +904,7 @@
         // TODO: could we just use the last mouse event target here?
         Rectangle r = getBounds();
         // findPeerAt() expects parent coordinates
-        final LWComponentPeer targetPeer = findPeerAt(r.x + x, r.y + y);
+        final LWComponentPeer<?, ?> targetPeer = findPeerAt(r.x + x, r.y + y);
         if (targetPeer == null || !targetPeer.isEnabled()) {
             return;
         }
@@ -933,7 +938,12 @@
                 focusOwner = this.getTarget();
             }
         }
-        postEvent(new KeyEvent(focusOwner, id, when, modifiers, keyCode, keyChar, keyLocation));
+
+        KeyEvent keyEvent = new KeyEvent(focusOwner, id, when, modifiers,
+            keyCode, keyChar, keyLocation);
+        AWTAccessor.getKeyEventAccessor().setExtendedKeyCode(keyEvent,
+            ExtendedKeyCodes.getExtendedKeyCodeForChar(keyChar));
+        postEvent(keyEvent);
     }
 
     // ---- UTILITY METHODS ---- //
@@ -1152,8 +1162,9 @@
                 if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
                     focusLog.fine("requesting native focus to the owner " + owner);
                 }
-                LWWindowPeer currentActivePeer = (currentActive != null ?
-                    (LWWindowPeer)currentActive.getPeer() : null);
+                LWWindowPeer currentActivePeer = currentActive == null ? null :
+                (LWWindowPeer) AWTAccessor.getComponentAccessor().getPeer(
+                        currentActive);
 
                 // Ensure the opposite is natively active and suppress sending events.
                 if (currentActivePeer != null && currentActivePeer.platformWindow.isActive()) {
@@ -1265,7 +1276,8 @@
         while (owner != null && !(owner instanceof Frame || owner instanceof Dialog)) {
             owner = owner.getOwner();
         }
-        return owner != null ? (LWWindowPeer)owner.getPeer() : null;
+        return owner == null ? null :
+               (LWWindowPeer) AWTAccessor.getComponentAccessor().getPeer(owner);
     }
 
     /**
@@ -1284,11 +1296,13 @@
         }
     }
 
+    @Override
     public void enterFullScreenMode() {
         platformWindow.enterFullScreenMode();
         updateSecurityWarningVisibility();
     }
 
+    @Override
     public void exitFullScreenMode() {
         platformWindow.exitFullScreenMode();
         updateSecurityWarningVisibility();
--- a/jdk/src/macosx/classes/sun/lwawt/SelectionClearListener.java	Thu Sep 26 17:13:39 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2011, 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.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * 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.
- */
-
-package sun.lwawt;
-
-/*
- * Every time the TextField (or TextArea) change selection, every other text components
- * must immediately clear their selections.
- */
-interface SelectionClearListener {
-   void clearSelection();
-}
--- a/jdk/src/macosx/classes/sun/lwawt/macosx/CMenu.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/macosx/classes/sun/lwawt/macosx/CMenu.java	Thu Sep 26 17:18:12 2013 -0700
@@ -26,9 +26,11 @@
 package sun.lwawt.macosx;
 
 import java.awt.*;
+import java.awt.peer.MenuItemPeer;
 import java.awt.peer.MenuPeer;
 
 public class CMenu extends CMenuItem implements MenuPeer {
+
     public CMenu(Menu target) {
         super(target);
     }
@@ -41,6 +43,20 @@
     }
 
     @Override
+    public final void setEnabled(final boolean b) {
+        super.setEnabled(b);
+        final Menu target = (Menu) getTarget();
+        final int count = target.getItemCount();
+        for (int i = 0; i < count; ++i) {
+            MenuItem item = target.getItem(i);
+            MenuItemPeer p = (MenuItemPeer) LWCToolkit.targetToPeer(item);
+            if (p != null) {
+                p.setEnabled(b && item.isEnabled());
+            }
+        }
+    }
+
+    @Override
     protected long createModel() {
         CMenuComponent parent = (CMenuComponent)
             LWCToolkit.targetToPeer(getTarget().getParent());
--- a/jdk/src/macosx/classes/sun/lwawt/macosx/CMenuItem.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/macosx/classes/sun/lwawt/macosx/CMenuItem.java	Thu Sep 26 17:18:12 2013 -0700
@@ -28,17 +28,20 @@
 import sun.awt.SunToolkit;
 import sun.lwawt.LWToolkit;
 
+import java.awt.MenuContainer;
 import java.awt.MenuItem;
 import java.awt.MenuShortcut;
 import java.awt.event.*;
 import java.awt.peer.MenuItemPeer;
+import java.util.concurrent.atomic.AtomicBoolean;
 
 public class CMenuItem extends CMenuComponent implements MenuItemPeer {
 
+    private final AtomicBoolean enabled = new AtomicBoolean(true);
+
     public CMenuItem(MenuItem target) {
         super(target);
         initialize(target);
-
     }
 
     // This way we avoiding invocation of the setters twice
@@ -124,9 +127,19 @@
         setEnabled(false);
     }
 
+    public final boolean isEnabled() {
+        return enabled.get();
+    }
+
     @Override
     public void setEnabled(boolean b) {
-        nativeSetEnabled(getModel(), b);
+        final Object parent = LWToolkit.targetToPeer(getTarget().getParent());
+        if (parent instanceof CMenuItem) {
+            b &= ((CMenuItem) parent).isEnabled();
+        }
+        if (enabled.compareAndSet(!b, b)) {
+            nativeSetEnabled(getModel(), b);
+        }
     }
 
     private native long nativeCreate(long parentMenu, boolean isSeparator);
--- a/jdk/src/macosx/classes/sun/lwawt/macosx/CMouseInfoPeer.java	Thu Sep 26 17:13:39 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2011, 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.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * 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.
- */
-
-package sun.lwawt.macosx;
-
-import java.awt.Window;
-import sun.lwawt.LWMouseInfoPeer;
-import sun.lwawt.LWWindowPeer;
-
-public class CMouseInfoPeer extends LWMouseInfoPeer
-{
-    //If a new window is to appear under the cursor,
-    //we get wrong window.
-    //This is a workaround for macosx.
-    @Override
-    public boolean isWindowUnderMouse(Window w) {
-        if (w == null) {
-            return false;
-        }
-
-        return ((LWWindowPeer)w.getPeer()).getPlatformWindow().isUnderMouse();
-    }
-}
--- a/jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Thu Sep 26 17:18:12 2013 -0700
@@ -820,6 +820,7 @@
         }
 
         nativeSetEnabled(getNSWindowPtr(), !blocked);
+        checkBlockingAndOrder();
     }
 
     public final void invalidateShadow(){
@@ -984,7 +985,7 @@
         setStyleBits(SHOULD_BECOME_KEY | SHOULD_BECOME_MAIN, isFocusable); // set both bits at once
     }
 
-    private boolean checkBlocking() {
+    private boolean checkBlockingAndOrder() {
         LWWindowPeer blocker = (peer == null)? null : peer.getBlocker();
         if (blocker == null) {
             return false;
@@ -1040,7 +1041,7 @@
     private void windowDidBecomeMain() {
         assert CThreading.assertAppKit();
 
-        if (checkBlocking()) return;
+        if (checkBlockingAndOrder()) return;
         // If it's not blocked, make sure it's above its siblings
         orderAboveSiblings();
     }
--- a/jdk/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java	Thu Sep 26 17:18:12 2013 -0700
@@ -44,6 +44,8 @@
 import sun.lwawt.LWWindowPeer.PeerType;
 import sun.security.action.GetBooleanAction;
 
+import sun.util.CoreResourceBundleControl;
+
 class NamedCursor extends Cursor {
     NamedCursor(String name) {
         super(name);
@@ -67,13 +69,28 @@
 
     static {
         System.err.flush();
-        java.security.AccessController.doPrivileged(new java.security.PrivilegedAction<Object>() {
-            public Object run() {
+
+        ResourceBundle platformResources = java.security.AccessController.doPrivileged(
+                new java.security.PrivilegedAction<ResourceBundle>() {
+            public ResourceBundle run() {
+                ResourceBundle platformResources = null;
+                try {
+                    platformResources =
+                            ResourceBundle.getBundle("sun.awt.resources.awtosx",
+                                    CoreResourceBundleControl.getRBControlInstance());
+                } catch (MissingResourceException e) {
+                    // No resource file; defaults will be used.
+                }
+
                 System.loadLibrary("awt");
                 System.loadLibrary("fontmanager");
-                return null;
+
+                return platformResources;
             }
         });
+
+        AWTAccessor.getToolkitAccessor().setPlatformResources(platformResources);
+
         if (!GraphicsEnvironment.isHeadless()) {
             initIDs();
         }
@@ -207,9 +224,9 @@
 
     @Override
     public MenuBarPeer createMenuBar(MenuBar target) {
-         MenuBarPeer peer = new CMenuBar(target);
-         targetCreatedPeer(target, peer);
-             return peer;
+        MenuBarPeer peer = new CMenuBar(target);
+        targetCreatedPeer(target, peer);
+        return peer;
     }
 
     @Override
@@ -303,11 +320,6 @@
     }
 
     @Override
-    protected MouseInfoPeer createMouseInfoPeerImpl() {
-        return new CMouseInfoPeer();
-    }
-
-    @Override
     protected int getScreenHeight() {
         return GraphicsEnvironment.getLocalGraphicsEnvironment()
                 .getDefaultScreenDevice().getDefaultConfiguration().getBounds().height;
--- a/jdk/src/macosx/native/sun/awt/AWTEvent.m	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/macosx/native/sun/awt/AWTEvent.m	Thu Sep 26 17:18:12 2013 -0700
@@ -759,7 +759,7 @@
  */
 JNIEXPORT jint JNICALL
 Java_sun_lwawt_macosx_event_NSEvent_nsToJavaChar
-(JNIEnv *env, jclass cls, char nsChar, jint modifierFlags)
+(JNIEnv *env, jclass cls, jchar nsChar, jint modifierFlags)
 {
     jchar javaChar = 0;
 
--- a/jdk/src/macosx/native/sun/awt/AWTView.m	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/macosx/native/sun/awt/AWTView.m	Thu Sep 26 17:18:12 2013 -0700
@@ -126,7 +126,7 @@
 
     self.cglLayer = nil;
 
-    JNIEnv *env = [ThreadUtilities getJNIEnv];
+    JNIEnv *env = [ThreadUtilities getJNIEnvUncached];
     (*env)->DeleteGlobalRef(env, m_cPlatformView);
     m_cPlatformView = NULL;
 
@@ -387,7 +387,7 @@
         [rolloverTrackingArea release];
     }
 
-    int options = (NSTrackingActiveInActiveApp | NSTrackingMouseEnteredAndExited |
+    int options = (NSTrackingActiveAlways | NSTrackingMouseEnteredAndExited |
                    NSTrackingMouseMoved | NSTrackingEnabledDuringMouseDrag);
 
     rolloverTrackingArea = [[NSTrackingArea alloc] initWithRect:[self visibleRect]
--- a/jdk/src/macosx/native/sun/awt/AWTWindow.m	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/macosx/native/sun/awt/AWTWindow.m	Thu Sep 26 17:18:12 2013 -0700
@@ -350,7 +350,7 @@
 - (void) dealloc {
 AWT_ASSERT_APPKIT_THREAD;
 
-    JNIEnv *env = [ThreadUtilities getJNIEnv];
+    JNIEnv *env = [ThreadUtilities getJNIEnvUncached];
     [self.javaPlatformWindow setJObject:nil withEnv:env];
 
     self.nsWindow = nil;
@@ -366,6 +366,22 @@
 
 - (BOOL) canBecomeMainWindow {
 AWT_ASSERT_APPKIT_THREAD;
+    if(!self.isEnabled){
+        // Native system can bring up the NSWindow to
+        // the top even if the window is not main.
+        // We should bring up the modal dialog manually
+        [AWTToolkit eventCountPlusPlus];
+
+        JNIEnv *env = [ThreadUtilities getJNIEnv];
+        jobject platformWindow = [self.javaPlatformWindow jObjectWithEnv:env];
+        if (platformWindow != NULL) {
+            static JNF_MEMBER_CACHE(jm_checkBlockingAndOrder, jc_CPlatformWindow,
+                                    "checkBlockingAndOrder", "()Z");
+            JNFCallVoidMethod(env, platformWindow, jm_checkBlockingAndOrder);
+            (*env)->DeleteLocalRef(env, platformWindow);
+        }
+    }
+
     return self.isEnabled && IS(self.styleBits, SHOULD_BECOME_MAIN);
 }
 
--- a/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGMetadata.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGMetadata.java	Thu Sep 26 17:18:12 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2013, 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
@@ -278,10 +278,11 @@
                         (JFIFMarkerSegment) findMarkerSegment
                         (JFIFMarkerSegment.class, true);
                     if (jfif == null) {
-                        throw new IIOException
-                            ("ICC APP2 encountered without prior JFIF!");
+                        newGuy = new MarkerSegment(buffer);
+                        newGuy.loadData(buffer);
+                    } else {
+                        jfif.addICC(buffer);
                     }
-                    jfif.addICC(buffer);
                     // newGuy remains null
                 } else {
                     newGuy = new MarkerSegment(buffer);
--- a/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -41,6 +41,7 @@
 import javax.swing.table.*;
 import javax.accessibility.*;
 
+import sun.swing.AbstractFilterComboBoxModel;
 import sun.swing.SwingUtilities2;
 
 import sun.swing.plaf.synth.*;
@@ -1328,71 +1329,9 @@
     /**
      * Data model for filter combo-box.
      */
-    protected class FilterComboBoxModel extends AbstractListModel
-            implements ComboBoxModel, PropertyChangeListener {
-        protected FileFilter[] filters;
-
-        protected FilterComboBoxModel() {
-            super();
-            filters = getFileChooser().getChoosableFileFilters();
-        }
-
-        public void propertyChange(PropertyChangeEvent e) {
-            String prop = e.getPropertyName();
-            if (prop == JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY) {
-                filters = (FileFilter[]) e.getNewValue();
-                fireContentsChanged(this, -1, -1);
-            } else if (prop == JFileChooser.FILE_FILTER_CHANGED_PROPERTY) {
-                fireContentsChanged(this, -1, -1);
-            }
-        }
-
-        public void setSelectedItem(Object filter) {
-            if (filter != null) {
-                getFileChooser().setFileFilter((FileFilter) filter);
-                fireContentsChanged(this, -1, -1);
-            }
-        }
-
-        public Object getSelectedItem() {
-            // Ensure that the current filter is in the list.
-            // NOTE: we shouldnt' have to do this, since JFileChooser adds
-            // the filter to the choosable filters list when the filter
-            // is set. Lets be paranoid just in case someone overrides
-            // setFileFilter in JFileChooser.
-            FileFilter currentFilter = getFileChooser().getFileFilter();
-            boolean found = false;
-            if (currentFilter != null) {
-                for (FileFilter filter : filters) {
-                    if (filter == currentFilter) {
-                        found = true;
-                    }
-                }
-                if (found == false) {
-                    getFileChooser().addChoosableFileFilter(currentFilter);
-                }
-            }
-            return getFileChooser().getFileFilter();
-        }
-
-        public int getSize() {
-            if (filters != null) {
-                return filters.length;
-            } else {
-                return 0;
-            }
-        }
-
-        public Object getElementAt(int index) {
-            if (index > getSize() - 1) {
-                // This shouldn't happen. Try to recover gracefully.
-                return getFileChooser().getFileFilter();
-            }
-            if (filters != null) {
-                return filters[index];
-            } else {
-                return null;
-            }
+    protected class FilterComboBoxModel extends AbstractFilterComboBoxModel {
+        protected JFileChooser getFileChooser() {
+            return GTKFileChooserUI.this.getFileChooser();
         }
     }
 }
--- a/jdk/src/share/classes/com/sun/java/swing/plaf/motif/MotifFileChooserUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/com/sun/java/swing/plaf/motif/MotifFileChooserUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -38,6 +38,7 @@
 import java.io.IOException;
 import java.util.*;
 import sun.awt.shell.ShellFolder;
+import sun.swing.AbstractFilterComboBoxModel;
 import sun.swing.SwingUtilities2;
 
 /**
@@ -777,70 +778,9 @@
     /**
      * Data model for a type-face selection combo-box.
      */
-    protected class FilterComboBoxModel extends AbstractListModel<FileFilter> implements ComboBoxModel<FileFilter>,
-            PropertyChangeListener {
-        protected FileFilter[] filters;
-        protected FilterComboBoxModel() {
-            super();
-            filters = getFileChooser().getChoosableFileFilters();
-        }
-
-        public void propertyChange(PropertyChangeEvent e) {
-            String prop = e.getPropertyName();
-            if(prop.equals(JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY)) {
-                filters = (FileFilter[]) e.getNewValue();
-                fireContentsChanged(this, -1, -1);
-            } else if (prop.equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY)) {
-                fireContentsChanged(this, -1, -1);
-            }
-        }
-
-        public void setSelectedItem(Object filter) {
-            if(filter != null) {
-                getFileChooser().setFileFilter((FileFilter) filter);
-                fireContentsChanged(this, -1, -1);
-            }
-        }
-
-        public Object getSelectedItem() {
-            // Ensure that the current filter is in the list.
-            // NOTE: we shouldnt' have to do this, since JFileChooser adds
-            // the filter to the choosable filters list when the filter
-            // is set. Lets be paranoid just in case someone overrides
-            // setFileFilter in JFileChooser.
-            FileFilter currentFilter = getFileChooser().getFileFilter();
-            boolean found = false;
-            if(currentFilter != null) {
-                for (FileFilter filter : filters) {
-                    if (filter == currentFilter) {
-                        found = true;
-                    }
-                }
-                if (!found) {
-                    getFileChooser().addChoosableFileFilter(currentFilter);
-                }
-            }
-            return getFileChooser().getFileFilter();
-        }
-
-        public int getSize() {
-            if(filters != null) {
-                return filters.length;
-            } else {
-                return 0;
-            }
-        }
-
-        public FileFilter getElementAt(int index) {
-            if(index > getSize() - 1) {
-                // This shouldn't happen. Try to recover gracefully.
-                return getFileChooser().getFileFilter();
-            }
-            if(filters != null) {
-                return filters[index];
-            } else {
-                return null;
-            }
+    protected class FilterComboBoxModel extends AbstractFilterComboBoxModel {
+        protected JFileChooser getFileChooser() {
+            return MotifFileChooserUI.this.getFileChooser();
         }
     }
 
--- a/jdk/src/share/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/com/sun/java/swing/plaf/windows/WindowsFileChooserUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -1193,70 +1193,9 @@
     /**
      * Data model for a type-face selection combo-box.
      */
-    protected class FilterComboBoxModel extends AbstractListModel<FileFilter> implements ComboBoxModel<FileFilter>,
-            PropertyChangeListener {
-        protected FileFilter[] filters;
-        protected FilterComboBoxModel() {
-            super();
-            filters = getFileChooser().getChoosableFileFilters();
-        }
-
-        public void propertyChange(PropertyChangeEvent e) {
-            String prop = e.getPropertyName();
-            if(prop == JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY) {
-                filters = (FileFilter[]) e.getNewValue();
-                fireContentsChanged(this, -1, -1);
-            } else if (prop == JFileChooser.FILE_FILTER_CHANGED_PROPERTY) {
-                fireContentsChanged(this, -1, -1);
-            }
-        }
-
-        public void setSelectedItem(Object filter) {
-            if(filter != null) {
-                getFileChooser().setFileFilter((FileFilter) filter);
-                fireContentsChanged(this, -1, -1);
-            }
-        }
-
-        public Object getSelectedItem() {
-            // Ensure that the current filter is in the list.
-            // NOTE: we shouldnt' have to do this, since JFileChooser adds
-            // the filter to the choosable filters list when the filter
-            // is set. Lets be paranoid just in case someone overrides
-            // setFileFilter in JFileChooser.
-            FileFilter currentFilter = getFileChooser().getFileFilter();
-            boolean found = false;
-            if(currentFilter != null) {
-                for (FileFilter filter : filters) {
-                    if (filter == currentFilter) {
-                        found = true;
-                    }
-                }
-                if(found == false) {
-                    getFileChooser().addChoosableFileFilter(currentFilter);
-                }
-            }
-            return getFileChooser().getFileFilter();
-        }
-
-        public int getSize() {
-            if(filters != null) {
-                return filters.length;
-            } else {
-                return 0;
-            }
-        }
-
-        public FileFilter getElementAt(int index) {
-            if(index > getSize() - 1) {
-                // This shouldn't happen. Try to recover gracefully.
-                return getFileChooser().getFileFilter();
-            }
-            if(filters != null) {
-                return filters[index];
-            } else {
-                return null;
-            }
+    protected class FilterComboBoxModel extends AbstractFilterComboBoxModel {
+        protected JFileChooser getFileChooser() {
+            return WindowsFileChooserUI.this.getFileChooser();
         }
     }
 
--- a/jdk/src/share/classes/java/awt/AWTKeyStroke.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/AWTKeyStroke.java	Thu Sep 26 17:18:12 2013 -0700
@@ -67,7 +67,7 @@
 public class AWTKeyStroke implements Serializable {
     static final long serialVersionUID = -6430539691155161871L;
 
-    private static Map modifierKeywords;
+    private static Map<String, Integer> modifierKeywords;
     /**
      * Associates VK_XXX (as a String) with code (as Integer). This is
      * done to avoid the overhead of the reflective call to find the
@@ -85,8 +85,8 @@
      * AWTKeyStroke class.
      * Must be called under locked AWTKeyStro
      */
-    private static Class getAWTKeyStrokeClass() {
-        Class clazz = (Class)AppContext.getAppContext().get(AWTKeyStroke.class);
+    private static Class<AWTKeyStroke> getAWTKeyStrokeClass() {
+        Class<AWTKeyStroke> clazz = (Class)AppContext.getAppContext().get(AWTKeyStroke.class);
         if (clazz == null) {
             clazz = AWTKeyStroke.class;
             AppContext.getAppContext().put(AWTKeyStroke.class, AWTKeyStroke.class);
@@ -182,7 +182,7 @@
             throw new IllegalArgumentException("subclass cannot be null");
         }
         synchronized (AWTKeyStroke.class) {
-            Class keyStrokeClass = (Class)AppContext.getAppContext().get(AWTKeyStroke.class);
+            Class<AWTKeyStroke> keyStrokeClass = (Class)AppContext.getAppContext().get(AWTKeyStroke.class);
             if (keyStrokeClass != null && keyStrokeClass.equals(subclass)){
                 // Already registered
                 return;
@@ -229,8 +229,8 @@
      */
     private static Constructor getCtor(final Class clazz)
     {
-        Object ctor = AccessController.doPrivileged(new PrivilegedAction() {
-            public Object run() {
+        Constructor ctor = AccessController.doPrivileged(new PrivilegedAction<Constructor>() {
+            public Constructor run() {
                 try {
                     Constructor ctor = clazz.getDeclaredConstructor((Class[]) null);
                     if (ctor != null) {
@@ -249,17 +249,17 @@
     private static synchronized AWTKeyStroke getCachedStroke
         (char keyChar, int keyCode, int modifiers, boolean onKeyRelease)
     {
-        Map cache = (Map)AppContext.getAppContext().get(APP_CONTEXT_CACHE_KEY);
+        Map<AWTKeyStroke, AWTKeyStroke> cache = (Map)AppContext.getAppContext().get(APP_CONTEXT_CACHE_KEY);
         AWTKeyStroke cacheKey = (AWTKeyStroke)AppContext.getAppContext().get(APP_CONTEXT_KEYSTROKE_KEY);
 
         if (cache == null) {
-            cache = new HashMap();
+            cache = new HashMap<>();
             AppContext.getAppContext().put(APP_CONTEXT_CACHE_KEY, cache);
         }
 
         if (cacheKey == null) {
             try {
-                Class clazz = getAWTKeyStrokeClass();
+                Class<AWTKeyStroke> clazz = getAWTKeyStrokeClass();
                 cacheKey = (AWTKeyStroke)getCtor(clazz).newInstance((Object[]) null);
                 AppContext.getAppContext().put(APP_CONTEXT_KEYSTROKE_KEY, cacheKey);
             } catch (InstantiationException e) {
@@ -485,11 +485,11 @@
      * If typed, pressed or released is not specified, pressed is assumed. Here
      * are some examples:
      * <pre>
-     *     "INSERT" => getAWTKeyStroke(KeyEvent.VK_INSERT, 0);
-     *     "control DELETE" => getAWTKeyStroke(KeyEvent.VK_DELETE, InputEvent.CTRL_MASK);
-     *     "alt shift X" => getAWTKeyStroke(KeyEvent.VK_X, InputEvent.ALT_MASK | InputEvent.SHIFT_MASK);
-     *     "alt shift released X" => getAWTKeyStroke(KeyEvent.VK_X, InputEvent.ALT_MASK | InputEvent.SHIFT_MASK, true);
-     *     "typed a" => getAWTKeyStroke('a');
+     *     "INSERT" =&gt; getAWTKeyStroke(KeyEvent.VK_INSERT, 0);
+     *     "control DELETE" =&gt; getAWTKeyStroke(KeyEvent.VK_DELETE, InputEvent.CTRL_MASK);
+     *     "alt shift X" =&gt; getAWTKeyStroke(KeyEvent.VK_X, InputEvent.ALT_MASK | InputEvent.SHIFT_MASK);
+     *     "alt shift released X" =&gt; getAWTKeyStroke(KeyEvent.VK_X, InputEvent.ALT_MASK | InputEvent.SHIFT_MASK, true);
+     *     "typed a" =&gt; getAWTKeyStroke('a');
      * </pre>
      *
      * @param s a String formatted as described above
@@ -513,7 +513,7 @@
 
         synchronized (AWTKeyStroke.class) {
             if (modifierKeywords == null) {
-                Map uninitializedMap = new HashMap(8, 1.0f);
+                Map<String, Integer> uninitializedMap = new HashMap<>(8, 1.0f);
                 uninitializedMap.put("shift",
                                      Integer.valueOf(InputEvent.SHIFT_DOWN_MASK
                                                      |InputEvent.SHIFT_MASK));
@@ -861,12 +861,12 @@
 }
 
 class VKCollection {
-    Map code2name;
-    Map name2code;
+    Map<Integer, String> code2name;
+    Map<String, Integer> name2code;
 
     public VKCollection() {
-        code2name = new HashMap();
-        name2code = new HashMap();
+        code2name = new HashMap<>();
+        name2code = new HashMap<>();
     }
 
     public synchronized void put(String name, Integer code) {
--- a/jdk/src/share/classes/java/awt/CardLayout.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/CardLayout.java	Thu Sep 26 17:18:12 2013 -0700
@@ -66,7 +66,7 @@
      * pairs of components and their names.
      * @see java.util.Vector
      */
-    Vector vector = new Vector();
+    Vector<Card> vector = new Vector<>();
 
     /*
      * A pair of Component and String that represents its name.
@@ -570,10 +570,10 @@
 
         if (f.defaulted("vector")) {
             //  pre-1.4 stream
-            Hashtable tab = (Hashtable)f.get("tab", null);
-            vector = new Vector();
+            Hashtable<String, Component> tab = (Hashtable)f.get("tab", null);
+            vector = new Vector<>();
             if (tab != null && !tab.isEmpty()) {
-                for (Enumeration e = tab.keys() ; e.hasMoreElements() ; ) {
+                for (Enumeration<String> e = tab.keys() ; e.hasMoreElements() ; ) {
                     String key = (String)e.nextElement();
                     Component comp = (Component)tab.get(key);
                     vector.add(new Card(key, comp));
@@ -594,7 +594,7 @@
     private void writeObject(ObjectOutputStream s)
         throws IOException
     {
-        Hashtable tab = new Hashtable();
+        Hashtable<String, Component> tab = new Hashtable<>();
         int ncomponents = vector.size();
         for (int i = 0; i < ncomponents; i++) {
             Card card = (Card)vector.get(i);
--- a/jdk/src/share/classes/java/awt/Component.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/Component.java	Thu Sep 26 17:18:12 2013 -0700
@@ -972,6 +972,10 @@
             public AccessControlContext getAccessControlContext(Component comp) {
                 return comp.getAccessControlContext();
             }
+
+            public void revalidateSynchronously(Component comp) {
+                comp.revalidateSynchronously();
+            }
         });
     }
 
@@ -2022,7 +2026,7 @@
      * @return an instance of <code>Point</code> representing
      *          the top-left corner of the component's bounds in the
      *          coordinate space of the screen
-     * @throws <code>IllegalComponentStateException</code> if the
+     * @throws IllegalComponentStateException if the
      *          component is not showing on the screen
      * @see #setLocation
      * @see #getLocation
@@ -2977,6 +2981,13 @@
      * @since 1.7
      */
     public void revalidate() {
+        revalidateSynchronously();
+    }
+
+    /**
+     * Revalidates the component synchronously.
+     */
+    final void revalidateSynchronously() {
         synchronized (getTreeLock()) {
             invalidate();
 
--- a/jdk/src/share/classes/java/awt/Container.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/Container.java	Thu Sep 26 17:18:12 2013 -0700
@@ -258,6 +258,12 @@
             public void validateUnconditionally(Container cont) {
                 cont.validateUnconditionally();
             }
+
+            @Override
+            public Component findComponentAt(Container cont, int x, int y,
+                    boolean ignoreEnabled) {
+                return cont.findComponentAt(x, y, ignoreEnabled);
+            }
         });
     }
 
@@ -2651,7 +2657,6 @@
      * behavior. Setting 'ignoreEnabled' to 'false' bypasses disabled
      * Components during the search. This behavior is used by the
      * lightweight cursor support in sun.awt.GlobalCursorManager.
-     * The cursor code calls this function directly via native code.
      *
      * The addition of this feature is temporary, pending the
      * adoption of new, public API which exports this feature.
--- a/jdk/src/share/classes/java/awt/ContainerOrderFocusTraversalPolicy.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/ContainerOrderFocusTraversalPolicy.java	Thu Sep 26 17:18:12 2013 -0700
@@ -85,7 +85,7 @@
      * list should be reused if possible.
      */
     transient private Container cachedRoot;
-    transient private List cachedCycle;
+    transient private List<Component> cachedCycle;
 
     /*
      * We suppose to use getFocusTraversalCycle & getComponentIndex methods in order
@@ -111,7 +111,7 @@
         return cycle.indexOf(aComponent);
     }
 
-    private void enumerateCycle(Container container, List cycle) {
+    private void enumerateCycle(Container container, List<Component> cycle) {
         if (!(container.isVisible() && container.isDisplayable())) {
             return;
         }
--- a/jdk/src/share/classes/java/awt/DefaultKeyboardFocusManager.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/DefaultKeyboardFocusManager.java	Thu Sep 26 17:18:12 2013 -0700
@@ -808,13 +808,13 @@
             }
         }
         boolean stopPostProcessing = false;
-        java.util.List processors = getKeyEventPostProcessors();
+        java.util.List<KeyEventPostProcessor> processors = getKeyEventPostProcessors();
         if (processors != null) {
-            for (java.util.Iterator iter = processors.iterator();
+            for (java.util.Iterator<KeyEventPostProcessor> iter = processors.iterator();
                  !stopPostProcessing && iter.hasNext(); )
             {
-                stopPostProcessing = (((KeyEventPostProcessor)(iter.next())).
-                            postProcessKeyEvent(e));
+                stopPostProcessing = iter.next().
+                            postProcessKeyEvent(e);
             }
         }
         if (!stopPostProcessing) {
@@ -1059,12 +1059,12 @@
             return true;
         }
 
-        java.util.List dispatchers = getKeyEventDispatchers();
+        java.util.List<KeyEventDispatcher> dispatchers = getKeyEventDispatchers();
         if (dispatchers != null) {
-            for (java.util.Iterator iter = dispatchers.iterator();
+            for (java.util.Iterator<KeyEventDispatcher> iter = dispatchers.iterator();
                  iter.hasNext(); )
              {
-                 if (((KeyEventDispatcher)(iter.next())).
+                 if (iter.next().
                      dispatchKeyEvent(ke))
                  {
                      return true;
@@ -1131,7 +1131,7 @@
                 oppStroke = AWTKeyStroke.getAWTKeyStroke(stroke.getKeyCode(),
                                                  stroke.getModifiers(),
                                                  !stroke.isOnKeyRelease());
-            Set toTest;
+            Set<AWTKeyStroke> toTest;
             boolean contains, containsOpp;
 
             toTest = focusedComponent.getFocusTraversalKeys(
@@ -1246,7 +1246,7 @@
      * any) should be cancelled.
      *
      * @param after the timestamp specified in the call to
-     *        <code>enqueueKeyEvents</code>, or any value < 0
+     *        <code>enqueueKeyEvents</code>, or any value &lt; 0
      * @param untilFocused the Component specified in the call to
      *        <code>enqueueKeyEvents</code>
      * @see #enqueueKeyEvents
--- a/jdk/src/share/classes/java/awt/Dialog.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/Dialog.java	Thu Sep 26 17:18:12 2013 -0700
@@ -61,7 +61,7 @@
  * <p>
  * The default layout for a dialog is <code>BorderLayout</code>.
  * <p>
- * A dialog may have its native decorations (i.e. Frame & Titlebar) turned off
+ * A dialog may have its native decorations (i.e. Frame &amp; Titlebar) turned off
  * with <code>setUndecorated</code>.  This can only be done while the dialog
  * is not {@link Component#isDisplayable() displayable}.
  * <p>
--- a/jdk/src/share/classes/java/awt/Event.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/Event.java	Thu Sep 26 17:18:12 2013 -0700
@@ -524,7 +524,7 @@
      * This field has been replaced by MouseEvent.getClickCount().
      *
      * @serial
-     * @see java.awt.event.MouseEvent#getClickCount().
+     * @see java.awt.event.MouseEvent#getClickCount()
      */
     public int clickCount;
 
--- a/jdk/src/share/classes/java/awt/EventQueue.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/EventQueue.java	Thu Sep 26 17:18:12 2013 -0700
@@ -690,7 +690,10 @@
         final Object src = event.getSource();
         final PrivilegedAction<Void> action = new PrivilegedAction<Void>() {
             public Void run() {
-                if (fwDispatcher == null) {
+                // In case fwDispatcher is installed and we're already on the
+                // dispatch thread (e.g. performing DefaultKeyboardFocusManager.sendMessage),
+                // dispatch the event straight away.
+                if (fwDispatcher == null || isDispatchThreadImpl()) {
                     dispatchEventImpl(event, src);
                 } else {
                     fwDispatcher.scheduleDispatch(new Runnable() {
--- a/jdk/src/share/classes/java/awt/Frame.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/Frame.java	Thu Sep 26 17:18:12 2013 -0700
@@ -265,12 +265,12 @@
      *
      * <p>Note that the correct test for frame being fully maximized is
      * <pre>
-     *     (state & Frame.MAXIMIZED_BOTH) == Frame.MAXIMIZED_BOTH
+     *     (state &amp; Frame.MAXIMIZED_BOTH) == Frame.MAXIMIZED_BOTH
      * </pre>
      *
      * <p>To test is frame is maximized in <em>some</em> direction use
      * <pre>
-     *     (state & Frame.MAXIMIZED_BOTH) != 0
+     *     (state &amp; Frame.MAXIMIZED_BOTH) != 0
      * </pre>
      *
      * @see #setExtendedState(int)
--- a/jdk/src/share/classes/java/awt/GradientPaintContext.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/GradientPaintContext.java	Thu Sep 26 17:18:12 2013 -0700
@@ -41,7 +41,7 @@
         new DirectColorModel(24, 0x000000ff, 0x0000ff00, 0x00ff0000);
 
     static ColorModel cachedModel;
-    static WeakReference cached;
+    static WeakReference<Raster> cached;
 
     static synchronized Raster getCachedRaster(ColorModel cm, int w, int h) {
         if (cm == cachedModel) {
@@ -76,7 +76,7 @@
             }
         }
         cachedModel = cm;
-        cached = new WeakReference(ras);
+        cached = new WeakReference<>(ras);
     }
 
     double x1;
--- a/jdk/src/share/classes/java/awt/GraphicsEnvironment.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/GraphicsEnvironment.java	Thu Sep 26 17:18:12 2013 -0700
@@ -95,18 +95,18 @@
         String nm = AccessController.doPrivileged(new GetPropertyAction("java.awt.graphicsenv", null));
         try {
 //          long t0 = System.currentTimeMillis();
-            Class geCls;
+            Class<GraphicsEnvironment> geCls;
             try {
                 // First we try if the bootclassloader finds the requested
                 // class. This way we can avoid to run in a privileged block.
-                geCls = Class.forName(nm);
+                geCls = (Class<GraphicsEnvironment>)Class.forName(nm);
             } catch (ClassNotFoundException ex) {
                 // If the bootclassloader fails, we try again with the
                 // application classloader.
                 ClassLoader cl = ClassLoader.getSystemClassLoader();
-                geCls = Class.forName(nm, true, cl);
+                geCls = (Class<GraphicsEnvironment>)Class.forName(nm, true, cl);
             }
-            ge = (GraphicsEnvironment) geCls.newInstance();
+            ge = geCls.newInstance();
 //          long t1 = System.currentTimeMillis();
 //          System.out.println("GE creation took " + (t1-t0)+ "ms.");
             if (isHeadless()) {
@@ -161,7 +161,7 @@
     private static boolean getHeadlessProperty() {
         if (headless == null) {
             java.security.AccessController.doPrivileged(
-            new java.security.PrivilegedAction() {
+            new java.security.PrivilegedAction<Object>() {
                 public Object run() {
                     String nm = System.getProperty("java.awt.headless");
 
--- a/jdk/src/share/classes/java/awt/GridBagConstraints.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/GridBagConstraints.java	Thu Sep 26 17:18:12 2013 -0700
@@ -30,7 +30,7 @@
  * <code>GridBagLayout</code> class.
  *
  * @author Doug Stein
- * @author Bill Spitzak (orignial NeWS & OLIT implementation)
+ * @author Bill Spitzak (orignial NeWS &amp; OLIT implementation)
  * @see java.awt.GridBagLayout
  * @since JDK1.0
  */
--- a/jdk/src/share/classes/java/awt/GridBagLayout.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/GridBagLayout.java	Thu Sep 26 17:18:12 2013 -0700
@@ -120,9 +120,9 @@
  * Orientation relative values are interpreted relative to the container's
  * <code>ComponentOrientation</code> property while absolute values
  * are not.  Baseline relative values are calculated relative to the
- * baseline.  Valid values are:</dd>
+ * baseline.  Valid values are:
  * <p>
- * <center><table BORDER=0 COLS=3 WIDTH=800
+ * <center><table BORDER=0 WIDTH=800
  *        SUMMARY="absolute, relative and baseline values as described above">
  * <tr>
  * <th><P ALIGN="LEFT">Absolute Values</th>
@@ -131,6 +131,7 @@
  * </tr>
  * <tr>
  * <td>
+ * <ul style="list-style-type:none">
  * <li><code>GridBagConstraints.NORTH</code></li>
  * <li><code>GridBagConstraints.SOUTH</code></li>
  * <li><code>GridBagConstraints.WEST</code></li>
@@ -140,8 +141,10 @@
  * <li><code>GridBagConstraints.SOUTHWEST</code></li>
  * <li><code>GridBagConstraints.SOUTHEAST</code></li>
  * <li><code>GridBagConstraints.CENTER</code> (the default)</li>
+ * </ul>
  * </td>
  * <td>
+ * <ul style="list-style-type:none">
  * <li><code>GridBagConstraints.PAGE_START</code></li>
  * <li><code>GridBagConstraints.PAGE_END</code></li>
  * <li><code>GridBagConstraints.LINE_START</code></li>
@@ -150,8 +153,10 @@
  * <li><code>GridBagConstraints.FIRST_LINE_END</code></li>
  * <li><code>GridBagConstraints.LAST_LINE_START</code></li>
  * <li><code>GridBagConstraints.LAST_LINE_END</code></li>
+ * </ul>
  * </td>
  * <td>
+ * <ul style="list-style-type:none">
  * <li><code>GridBagConstraints.BASELINE</code></li>
  * <li><code>GridBagConstraints.BASELINE_LEADING</code></li>
  * <li><code>GridBagConstraints.BASELINE_TRAILING</code></li>
@@ -161,9 +166,10 @@
  * <li><code>GridBagConstraints.BELOW_BASELINE</code></li>
  * <li><code>GridBagConstraints.BELOW_BASELINE_LEADING</code></li>
  * <li><code>GridBagConstraints.BELOW_BASELINE_TRAILING</code></li>
+ * </ul>
  * </td>
  * </tr>
- * </table></center><p>
+ * </table></center>
  * <dt>{@link GridBagConstraints#weightx},
  * {@link GridBagConstraints#weighty}
  * <dd>Used to determine how to distribute space, which is
@@ -246,7 +252,7 @@
  * left-to-right container and Figure 3 shows the layout for a horizontal,
  * right-to-left container.
  * <p>
- * <center><table COLS=2 WIDTH=600 summary="layout">
+ * <center><table WIDTH=600 summary="layout">
  * <tr ALIGN=CENTER>
  * <td>
  * <img src="doc-files/GridBagLayout-1.gif" alt="The preceeding text describes this graphic (Figure 1)." ALIGN=center HSPACE=10 VSPACE=7>
@@ -349,7 +355,7 @@
  * </pre></blockquote><hr>
  * <p>
  * @author Doug Stein
- * @author Bill Spitzak (orignial NeWS & OLIT implementation)
+ * @author Bill Spitzak (orignial NeWS &amp; OLIT implementation)
  * @see       java.awt.GridBagConstraints
  * @see       java.awt.GridBagLayoutInfo
  * @see       java.awt.ComponentOrientation
--- a/jdk/src/share/classes/java/awt/GridLayout.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/GridLayout.java	Thu Sep 26 17:18:12 2013 -0700
@@ -55,7 +55,7 @@
  * If the container's <code>ComponentOrientation</code> property is horizontal
  * and right-to-left, the example produces the output shown in Figure 2.
  * <p>
- * <center><table COLS=2 WIDTH=600 summary="layout">
+ * <center><table WIDTH=600 summary="layout">
  * <tr ALIGN=CENTER>
  * <td><img SRC="doc-files/GridLayout-1.gif"
  *      alt="Shows 6 buttons in rows of 2. Row 1 shows buttons 1 then 2.
--- a/jdk/src/share/classes/java/awt/KeyboardFocusManager.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/KeyboardFocusManager.java	Thu Sep 26 17:18:12 2013 -0700
@@ -348,7 +348,7 @@
      * Component of those Windows that has no such array of its own explicitly
      * set.
      */
-    private Set[] defaultFocusTraversalKeys = new Set[4];
+    private Set<AWTKeyStroke>[] defaultFocusTraversalKeys = new Set[4];
 
     /**
      * The current focus cycle root. If the focus owner is itself a focus cycle
@@ -376,7 +376,7 @@
      * KeyEventDispatchers are registered, this field may be null or refer to
      * a List of length 0.
      */
-    private java.util.LinkedList keyEventDispatchers;
+    private java.util.LinkedList<KeyEventDispatcher> keyEventDispatchers;
 
     /**
      * This KeyboardFocusManager's KeyEventPostProcessor chain. The List does
@@ -385,12 +385,12 @@
      * If no other KeyEventPostProcessors are registered, this field may be
      * null or refer to a List of length 0.
      */
-    private java.util.LinkedList keyEventPostProcessors;
+    private java.util.LinkedList<KeyEventPostProcessor> keyEventPostProcessors;
 
     /**
      * Maps Windows to those Windows' most recent focus owners.
      */
-    private static java.util.Map mostRecentFocusOwners = new WeakHashMap();
+    private static java.util.Map<Window, WeakReference<Component>> mostRecentFocusOwners = new WeakHashMap<>();
 
     /**
      * We cache the permission used to verify that the calling thread is
@@ -431,7 +431,7 @@
      */
     public KeyboardFocusManager() {
         for (int i = 0; i < TRAVERSAL_KEY_LENGTH; i++) {
-            Set work_set = new HashSet();
+            Set<AWTKeyStroke> work_set = new HashSet<>();
             for (int j = 0; j < defaultFocusTraversalKeyStrokes[i].length; j++) {
                 work_set.add(defaultFocusTraversalKeyStrokes[i][j]);
             }
@@ -1125,7 +1125,7 @@
             throw new IllegalArgumentException("cannot set null Set of default focus traversal keys");
         }
 
-        Set oldKeys;
+        Set<AWTKeyStroke> oldKeys;
 
         synchronized (this) {
             for (AWTKeyStroke keystroke : keystrokes) {
@@ -1153,7 +1153,7 @@
 
             oldKeys = defaultFocusTraversalKeys[id];
             defaultFocusTraversalKeys[id] =
-                Collections.unmodifiableSet(new HashSet(keystrokes));
+                Collections.unmodifiableSet(new HashSet<>(keystrokes));
         }
 
         firePropertyChange(defaultFocusTraversalKeyPropertyNames[id],
@@ -1699,7 +1699,7 @@
         if (dispatcher != null) {
             synchronized (this) {
                 if (keyEventDispatchers == null) {
-                    keyEventDispatchers = new java.util.LinkedList();
+                    keyEventDispatchers = new java.util.LinkedList<>();
                 }
                 keyEventDispatchers.add(dispatcher);
             }
@@ -1787,7 +1787,7 @@
         if (processor != null) {
             synchronized (this) {
                 if (keyEventPostProcessors == null) {
-                    keyEventPostProcessors = new java.util.LinkedList();
+                    keyEventPostProcessors = new java.util.LinkedList<>();
                 }
                 keyEventPostProcessors.add(processor);
             }
@@ -1865,9 +1865,9 @@
         // of Component.parent fields.  Since WeakHasMap refers to its
         // values strongly, we need to break the strong link from the
         // value (component) back to its key (window).
-        WeakReference weakValue = null;
+        WeakReference<Component> weakValue = null;
         if (component != null) {
-            weakValue = new WeakReference(component);
+            weakValue = new WeakReference<>(component);
         }
         mostRecentFocusOwners.put(window, weakValue);
     }
@@ -1906,7 +1906,7 @@
      * javax.swing.JComponent.runInputVerifier() using reflection.
      */
     static synchronized Component getMostRecentFocusOwner(Window window) {
-        WeakReference weakValue =
+        WeakReference<Component> weakValue =
             (WeakReference)mostRecentFocusOwners.get(window);
         return weakValue == null ? null : (Component)weakValue.get();
     }
@@ -2034,7 +2034,7 @@
      * oldest</b> timestamp (if any) should be cancelled.
      *
      * @param after the timestamp specified in the call to
-     *        <code>enqueueKeyEvents</code>, or any value < 0
+     *        <code>enqueueKeyEvents</code>, or any value &lt; 0
      * @param untilFocused the Component specified in the call to
      *        <code>enqueueKeyEvents</code>
      * @see #enqueueKeyEvents
@@ -2649,11 +2649,11 @@
                 Component lastFocusOwner = null;
                 Component currentFocusOwner = null;
 
-                for (Iterator iter = localLightweightRequests.iterator(); iter.hasNext(); ) {
+                for (Iterator<KeyboardFocusManager.LightweightFocusRequest> iter = localLightweightRequests.iterator(); iter.hasNext(); ) {
 
                     currentFocusOwner = manager.getGlobalFocusOwner();
                     LightweightFocusRequest lwFocusRequest =
-                        (LightweightFocusRequest)iter.next();
+                        iter.next();
 
                     /*
                      * WARNING: This is based on DKFM's logic solely!
@@ -2978,12 +2978,12 @@
             if (hwFocusRequest != null) {
                 heavyweightRequests.removeFirst();
                 if (hwFocusRequest.lightweightRequests != null) {
-                    for (Iterator lwIter = hwFocusRequest.lightweightRequests.
+                    for (Iterator<KeyboardFocusManager.LightweightFocusRequest> lwIter = hwFocusRequest.lightweightRequests.
                              iterator();
                          lwIter.hasNext(); )
                     {
                         manager.dequeueKeyEvents
-                            (-1, ((LightweightFocusRequest)lwIter.next()).
+                            (-1, lwIter.next().
                              component);
                     }
                 }
@@ -3063,8 +3063,8 @@
     // Accessor to private field isProxyActive of KeyEvent
     private static boolean isProxyActiveImpl(KeyEvent e) {
         if (proxyActive == null) {
-            proxyActive = (Field) AccessController.doPrivileged(new PrivilegedAction() {
-                    public Object run() {
+            proxyActive =  AccessController.doPrivileged(new PrivilegedAction<Field>() {
+                    public Field run() {
                         Field field = null;
                         try {
                             field = KeyEvent.class.getDeclaredField("isProxyActive");
--- a/jdk/src/share/classes/java/awt/MenuBar.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/MenuBar.java	Thu Sep 26 17:18:12 2013 -0700
@@ -43,7 +43,7 @@
  * This is what a menu bar might look like:
  * <p>
  * <img src="doc-files/MenuBar-1.gif"
- * <alt="Diagram of MenuBar containing 2 menus: Examples and Options.
+ * alt="Diagram of MenuBar containing 2 menus: Examples and Options.
  * Examples menu is expanded showing items: Basic, Simple, Check, and More Examples."
  * ALIGN=center HSPACE=10 VSPACE=7>
  * <p>
--- a/jdk/src/share/classes/java/awt/ScrollPane.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/ScrollPane.java	Thu Sep 26 17:18:12 2013 -0700
@@ -247,7 +247,7 @@
      * component is removed and the new one is added.
      * @param comp the component to be added
      * @param constraints  not applicable
-     * @param index position of child component (must be <= 0)
+     * @param index position of child component (must be &lt;= 0)
      */
     protected final void addImpl(Component comp, Object constraints, int index) {
         synchronized (getTreeLock()) {
--- a/jdk/src/share/classes/java/awt/ScrollPaneAdjustable.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/ScrollPaneAdjustable.java	Thu Sep 26 17:18:12 2013 -0700
@@ -220,7 +220,7 @@
      * This method is public for this class to properly implement
      * <code>Adjustable</code> interface.
      *
-     * @throws <code>AWTError</code>  Always throws an error when called.
+     * @throws AWTError Always throws an error when called.
      */
     public void setMinimum(int min) {
         throw new AWTError(SCROLLPANE_ONLY);
@@ -237,7 +237,7 @@
      * This method is public for this class to properly implement
      * <code>Adjustable</code> interface.
      *
-     * @throws <code>AWTError</code>  Always throws an error when called.
+     * @throws AWTError Always throws an error when called.
      */
     public void setMaximum(int max) {
         throw new AWTError(SCROLLPANE_ONLY);
@@ -274,7 +274,7 @@
      * This method is public for this class to properly implement
      * <code>Adjustable</code> interface.
      *
-     * @throws <code>AWTError</code>  Always throws an error when called.
+     * @throws AWTError Always throws an error when called.
      */
     public void setVisibleAmount(int v) {
         throw new AWTError(SCROLLPANE_ONLY);
--- a/jdk/src/share/classes/java/awt/Scrollbar.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/Scrollbar.java	Thu Sep 26 17:18:12 2013 -0700
@@ -715,6 +715,9 @@
      * The unit increment must be greater than zero.
      * Attepts to set the unit increment to a value lower than 1
      * will result in a value of 1 being set.
+     * <p>
+     * In some operating systems, this property
+     * can be ignored by the underlying controls.
      *
      * @param        v  the amount by which to increment or decrement
      *                         the scroll bar's value
@@ -752,6 +755,9 @@
      * scroll bar, generally through a mouse or keyboard gesture
      * that the scroll bar receives as an adjustment event.
      * The unit increment must be greater than zero.
+     * <p>
+     * In some operating systems, this property
+     * can be ignored by the underlying controls.
      *
      * @return      the unit increment of this scroll bar
      * @see         java.awt.Scrollbar#setUnitIncrement
--- a/jdk/src/share/classes/java/awt/SequencedEvent.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/SequencedEvent.java	Thu Sep 26 17:18:12 2013 -0700
@@ -49,7 +49,7 @@
 
     private static final int ID =
         java.awt.event.FocusEvent.FOCUS_LAST + 1;
-    private static final LinkedList list = new LinkedList();
+    private static final LinkedList<SequencedEvent> list = new LinkedList<>();
 
     private final AWTEvent nested;
     private AppContext appContext;
--- a/jdk/src/share/classes/java/awt/SystemTray.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/SystemTray.java	Thu Sep 26 17:18:12 2013 -0700
@@ -63,8 +63,8 @@
  *
  * <p>The following code snippet demonstrates how to access
  * and customize the system tray:
+ * <pre>
  * <code>
- * <pre>
  *     {@link TrayIcon} trayIcon = null;
  *     if (SystemTray.isSupported()) {
  *         // get the SystemTray instance
@@ -109,8 +109,8 @@
  *         trayIcon.{@link TrayIcon#setImage(java.awt.Image) setImage}(updatedImage);
  *     }
  *     // ...
+ * </code>
  * </pre>
- * </code>
  *
  * @since 1.6
  * @see TrayIcon
--- a/jdk/src/share/classes/java/awt/TextComponent.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/TextComponent.java	Thu Sep 26 17:18:12 2013 -0700
@@ -972,7 +972,7 @@
          * coordinates.  If the index is invalid a null rectangle
          * is returned.
          *
-         * @param i the index into the String >= 0
+         * @param i the index into the String &gt;= 0
          * @return the screen coordinates of the character's bounding box
          */
         public Rectangle getCharacterBounds(int i) {
@@ -982,7 +982,7 @@
         /**
          * Returns the number of characters (valid indicies)
          *
-         * @return the number of characters >= 0
+         * @return the number of characters &gt;= 0
          */
         public int getCharCount() {
             return TextComponent.this.getText().length();
@@ -1018,7 +1018,7 @@
          * Return 0 if the text is empty, or the caret position
          * if no selection.
          *
-         * @return the index into the text of the start of the selection >= 0
+         * @return the index into the text of the start of the selection &gt;= 0
          */
         public int getSelectionStart() {
             return TextComponent.this.getSelectionStart();
@@ -1031,7 +1031,7 @@
          * Return 0 if the text is empty, or the caret position
          * if no selection.
          *
-         * @return the index into teh text of the end of the selection >= 0
+         * @return the index into teh text of the end of the selection &gt;= 0
          */
         public int getSelectionEnd() {
             return TextComponent.this.getSelectionEnd();
@@ -1056,7 +1056,7 @@
          *
          * @param part the AccessibleText.CHARACTER, AccessibleText.WORD,
          * or AccessibleText.SENTENCE to retrieve
-         * @param index an index within the text >= 0
+         * @param index an index within the text &gt;= 0
          * @return the letter, word, or sentence,
          *   null for an invalid index or part
          */
@@ -1122,7 +1122,7 @@
          *
          * @param part the AccessibleText.CHARACTER, AccessibleText.WORD,
          * or AccessibleText.SENTENCE to retrieve
-         * @param index an index within the text >= 0
+         * @param index an index within the text &gt;= 0
          * @return the letter, word, or sentence, null for an invalid
          *  index or part
          */
@@ -1175,7 +1175,7 @@
          *
          * @param part the AccessibleText.CHARACTER, AccessibleText.WORD,
          *   or AccessibleText.SENTENCE to retrieve
-         * @param index an index within the text >= 0
+         * @param index an index within the text &gt;= 0
          * @return the letter, word, or sentence, null for an invalid index
          *  or part
          */
--- a/jdk/src/share/classes/java/awt/TextField.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/TextField.java	Thu Sep 26 17:18:12 2013 -0700
@@ -503,7 +503,7 @@
      *
      * @see #addActionListener
      * @see #removeActionListener
-     * @see     java.awt.event#ActionListener
+     * @see java.awt.event.ActionListener
      * @since 1.4
      */
     public synchronized ActionListener[] getActionListeners() {
--- a/jdk/src/share/classes/java/awt/TexturePaintContext.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/TexturePaintContext.java	Thu Sep 26 17:18:12 2013 -0700
@@ -73,11 +73,11 @@
         WritableRaster raster = bufImg.getRaster();
         ColorModel cm = bufImg.getColorModel();
         int maxw = devBounds.width;
-        Object val = hints.get(hints.KEY_INTERPOLATION);
+        Object val = hints.get(RenderingHints.KEY_INTERPOLATION);
         boolean filter =
             (val == null
-             ? (hints.get(hints.KEY_RENDERING) == hints.VALUE_RENDER_QUALITY)
-             : (val != hints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR));
+             ? (hints.get(RenderingHints.KEY_RENDERING) == RenderingHints.VALUE_RENDER_QUALITY)
+             : (val != RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR));
         if (raster instanceof IntegerInterleavedRaster &&
             (!filter || isFilterableDCM(cm)))
         {
@@ -234,8 +234,8 @@
         return outRas;
     }
 
-    private static WeakReference xrgbRasRef;
-    private static WeakReference argbRasRef;
+    private static WeakReference<Raster> xrgbRasRef;
+    private static WeakReference<Raster> argbRasRef;
 
     synchronized static WritableRaster makeRaster(ColorModel cm,
                                                   Raster srcRas,
@@ -278,13 +278,13 @@
             return;
         }
         if (xrgbmodel == cm) {
-            xrgbRasRef = new WeakReference(outRas);
+            xrgbRasRef = new WeakReference<>(outRas);
         } else if (argbmodel == cm) {
-            argbRasRef = new WeakReference(outRas);
+            argbRasRef = new WeakReference<>(outRas);
         }
     }
 
-    private static WeakReference byteRasRef;
+    private static WeakReference<Raster> byteRasRef;
 
     synchronized static WritableRaster makeByteRaster(Raster srcRas,
                                                       int w, int h)
@@ -307,7 +307,7 @@
         if (outRas == null) {
             return;
         }
-        byteRasRef = new WeakReference(outRas);
+        byteRasRef = new WeakReference<>(outRas);
     }
 
     public abstract WritableRaster makeRaster(int w, int h);
--- a/jdk/src/share/classes/java/awt/Toolkit.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/Toolkit.java	Thu Sep 26 17:18:12 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2013, 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
@@ -56,6 +56,7 @@
 import sun.awt.NullComponentPeer;
 import sun.awt.PeerEvent;
 import sun.awt.SunToolkit;
+import sun.awt.AWTAccessor;
 import sun.security.util.SecurityConstants;
 
 import sun.util.CoreResourceBundleControl;
@@ -467,7 +468,7 @@
         GraphicsEnvironment.checkHeadless();
     }
 
-/**
+    /**
      * Controls whether the layout of Containers is validated dynamically
      * during resizing, or statically, after resizing is complete.
      * Use {@code isDynamicLayoutActive()} to detect if this feature enabled
@@ -497,9 +498,12 @@
      * @see       java.awt.GraphicsEnvironment#isHeadless
      * @since     1.4
      */
-    public void setDynamicLayout(boolean dynamic)
+    public void setDynamicLayout(final boolean dynamic)
         throws HeadlessException {
         GraphicsEnvironment.checkHeadless();
+        if (this != getDefaultToolkit()) {
+            getDefaultToolkit().setDynamicLayout(dynamic);
+        }
     }
 
     /**
@@ -1239,7 +1243,8 @@
     }
 
     /**
-     * Emits an audio beep.
+     * Emits an audio beep depending on native system settings and hardware
+     * capabilities.
      * @since     JDK1.1
      */
     public abstract void beep();
@@ -1598,6 +1603,12 @@
      * here, so that only one copy is maintained.
      */
     private static ResourceBundle resources;
+    private static ResourceBundle platformResources;
+
+    // called by platform toolkit
+    private static void setPlatformResources(ResourceBundle bundle) {
+        platformResources = bundle;
+    }
 
     /**
      * Initialize JNI field and method ids
@@ -1646,6 +1657,14 @@
     }
 
     static {
+        AWTAccessor.setToolkitAccessor(
+                new AWTAccessor.ToolkitAccessor() {
+                    @Override
+                    public void setPlatformResources(ResourceBundle bundle) {
+                        Toolkit.setPlatformResources(bundle);
+                    }
+                });
+
         java.security.AccessController.doPrivileged(
                                  new java.security.PrivilegedAction<Void>() {
             public Void run() {
@@ -1673,6 +1692,15 @@
      * This method returns defaultValue if the property is not found.
      */
     public static String getProperty(String key, String defaultValue) {
+        // first try platform specific bundle
+        if (platformResources != null) {
+            try {
+                return platformResources.getString(key);
+            }
+            catch (MissingResourceException e) {}
+        }
+
+        // then shared one
         if (resources != null) {
             try {
                 return resources.getString(key);
--- a/jdk/src/share/classes/java/awt/WaitDispatchSupport.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/WaitDispatchSupport.java	Thu Sep 26 17:18:12 2013 -0700
@@ -224,8 +224,8 @@
             // starts. Thus, the enter() method will not hang.
             //
             // Event pump should be privileged. See 6300270.
-            AccessController.doPrivileged(new PrivilegedAction() {
-                public Object run() {
+            AccessController.doPrivileged(new PrivilegedAction<Void>() {
+                public Void run() {
                     run.run();
                     return null;
                 }
--- a/jdk/src/share/classes/java/awt/Window.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/Window.java	Thu Sep 26 17:18:12 2013 -0700
@@ -1075,7 +1075,6 @@
      * Hide this Window, its subcomponents, and all of its owned children.
      * The Window and its subcomponents can be made visible again
      * with a call to {@code show}.
-     * </p>
      * @see #show
      * @see #dispose
      * @deprecated As of JDK version 1.5, replaced by
@@ -3373,27 +3372,27 @@
      * this property of the Window.
      * <p>
      * For example, after the following code is executed:
-     * <pre><blockquote>
+     * <pre>
      * setLocationByPlatform(true);
      * setVisible(true);
      * boolean flag = isLocationByPlatform();
-     * </blockquote></pre>
+     * </pre>
      * The window will be shown at platform's default location and
      * {@code flag} will be {@code false}.
      * <p>
      * In the following sample:
-     * <pre><blockquote>
+     * <pre>
      * setLocationByPlatform(true);
      * setLocation(10, 10);
      * boolean flag = isLocationByPlatform();
      * setVisible(true);
-     * </blockquote></pre>
+     * </pre>
      * The window will be shown at (10, 10) and {@code flag} will be
      * {@code false}.
      *
      * @param locationByPlatform {@code true} if this Window should appear
      *        at the default location, {@code false} if at the current location
-     * @throws {@code IllegalComponentStateException} if the window
+     * @throws IllegalComponentStateException if the window
      *         is showing on screen and locationByPlatform is {@code true}.
      * @see #setLocation
      * @see #isShowing
--- a/jdk/src/share/classes/java/awt/datatransfer/DataFlavor.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/datatransfer/DataFlavor.java	Thu Sep 26 17:18:12 2013 -0700
@@ -454,7 +454,7 @@
 
     /**
      * Constructs a <code>DataFlavor</code> from a <code>mimeType</code> string.
-     * The string can specify a "class=<fully specified Java class name>"
+     * The string can specify a "class=&lt;fully specified Java class name&gt;"
      * parameter to create a <code>DataFlavor</code> with the desired
      * representation class. If the string does not contain "class=" parameter,
      * <code>java.io.InputStream</code> is used as default.
--- a/jdk/src/share/classes/java/awt/datatransfer/SystemFlavorMap.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/datatransfer/SystemFlavorMap.java	Thu Sep 26 17:18:12 2013 -0700
@@ -70,7 +70,7 @@
     /**
      * System singleton which maps a thread's ClassLoader to a SystemFlavorMap.
      */
-    private static final WeakHashMap flavorMaps = new WeakHashMap();
+    private static final WeakHashMap<ClassLoader, FlavorMap> flavorMaps = new WeakHashMap<>();
 
     /**
      * Copied from java.util.Properties.
@@ -139,7 +139,7 @@
      * native Strings.
      * Do not use the field directly, use getFlavorToNative() instead.
      */
-    private final Map flavorToNative = new HashMap();
+    private final Map<DataFlavor, List<String>> flavorToNative = new HashMap<>();
 
     /**
      * Accessor to flavorToNative map.  Since we use lazy initialization we must
@@ -148,7 +148,7 @@
      *
      * @return flavorToNative
      */
-    private synchronized Map getFlavorToNative() {
+    private synchronized Map<DataFlavor, List<String>> getFlavorToNative() {
         if (!isMapInitialized) {
             initSystemFlavorMap();
         }
@@ -164,13 +164,13 @@
      * Caches the result of getNativesForFlavor(). Maps DataFlavors to
      * SoftReferences which reference Lists of String natives.
      */
-    private Map getNativesForFlavorCache = new HashMap();
+    private Map<DataFlavor, SoftReference<List<String>>> getNativesForFlavorCache = new HashMap<>();
 
     /**
      * Caches the result getFlavorsForNative(). Maps String natives to
      * SoftReferences which reference Lists of DataFlavors.
      */
-    private Map getFlavorsForNativeCache = new HashMap();
+    private Map<String, SoftReference<List<DataFlavor>>> getFlavorsForNativeCache = new HashMap<>();
 
     /**
      * Dynamic mapping generation used for text mappings should not be applied
@@ -193,7 +193,7 @@
         FlavorMap fm;
 
         synchronized(flavorMaps) {
-            fm = (FlavorMap)flavorMaps.get(contextClassLoader);
+            fm = flavorMaps.get(contextClassLoader);
             if (fm == null) {
                 fm = new SystemFlavorMap();
                 flavorMaps.put(contextClassLoader, fm);
@@ -520,10 +520,10 @@
      * the appropriate Map location, but rather will be appended to a List
      * stored in that location.
      */
-    private void store(Object hashed, Object listed, Map map) {
-        List list = (List)map.get(hashed);
+    private <H, L> void store(H hashed, L listed, Map<H, List<L>> map) {
+        List<L> list = map.get(hashed);
         if (list == null) {
-            list = new ArrayList(1);
+            list = new ArrayList<>(1);
             map.put(hashed, list);
         }
         if (!list.contains(listed)) {
@@ -537,17 +537,17 @@
      * case, a new DataFlavor is synthesized, stored, and returned, if and
      * only if the specified native is encoded as a Java MIME type.
      */
-    private List nativeToFlavorLookup(String nat) {
+    private List<DataFlavor> nativeToFlavorLookup(String nat) {
         List<DataFlavor> flavors = getNativeToFlavor().get(nat);
 
         if (nat != null && !disabledMappingGenerationKeys.contains(nat)) {
             DataTransferer transferer = DataTransferer.getInstance();
             if (transferer != null) {
-                List platformFlavors =
+                List<DataFlavor> platformFlavors =
                     transferer.getPlatformMappingsForNative(nat);
                 if (!platformFlavors.isEmpty()) {
                     if (flavors != null) {
-                        platformFlavors.removeAll(new HashSet(flavors));
+                        platformFlavors.removeAll(new HashSet<>(flavors));
                         // Prepending the platform-specific mappings ensures
                         // that the flavors added with
                         // addFlavorForUnencodedNative() are at the end of
@@ -573,15 +573,15 @@
             }
 
             if (flavor != null) {
-                flavors = new ArrayList(1);
+                flavors = new ArrayList<>(1);
                 getNativeToFlavor().put(nat, flavors);
                 flavors.add(flavor);
                 getFlavorsForNativeCache.remove(nat);
                 getFlavorsForNativeCache.remove(null);
 
-                List natives = (List)getFlavorToNative().get(flavor);
+                List<String> natives = getFlavorToNative().get(flavor);
                 if (natives == null) {
-                    natives = new ArrayList(1);
+                    natives = new ArrayList<>(1);
                     getFlavorToNative().put(flavor, natives);
                 }
                 natives.add(nat);
@@ -590,7 +590,7 @@
             }
         }
 
-        return (flavors != null) ? flavors : new ArrayList(0);
+        return (flavors != null) ? flavors : new ArrayList<>(0);
     }
 
     /**
@@ -601,18 +601,18 @@
      * encoding the DataFlavor's MIME type. Otherwise an empty List is returned
      * and 'flavorToNative' remains unaffected.
      */
-    private List flavorToNativeLookup(final DataFlavor flav,
-                                      final boolean synthesize) {
-        List natives = (List)getFlavorToNative().get(flav);
+    private List<String> flavorToNativeLookup(final DataFlavor flav,
+                                              final boolean synthesize) {
+        List<String> natives = getFlavorToNative().get(flav);
 
         if (flav != null && !disabledMappingGenerationKeys.contains(flav)) {
             DataTransferer transferer = DataTransferer.getInstance();
             if (transferer != null) {
-                List platformNatives =
+                List<String> platformNatives =
                     transferer.getPlatformMappingsForFlavor(flav);
                 if (!platformNatives.isEmpty()) {
                     if (natives != null) {
-                        platformNatives.removeAll(new HashSet(natives));
+                        platformNatives.removeAll(new HashSet<>(natives));
                         // Prepend the platform-specific mappings to ensure
                         // that the natives added with
                         // addUnencodedNativeForFlavor() are at the end of
@@ -627,7 +627,7 @@
         if (natives == null) {
             if (synthesize) {
                 String encoded = encodeDataFlavor(flav);
-                natives = new ArrayList(1);
+                natives = new ArrayList<>(1);
                 getFlavorToNative().put(flav, natives);
                 natives.add(encoded);
                 getNativesForFlavorCache.remove(flav);
@@ -635,14 +635,14 @@
 
                 List<DataFlavor> flavors = getNativeToFlavor().get(encoded);
                 if (flavors == null) {
-                    flavors = new ArrayList(1);
+                    flavors = new ArrayList<>(1);
                     getNativeToFlavor().put(encoded, flavors);
                 }
                 flavors.add(flav);
                 getFlavorsForNativeCache.remove(encoded);
                 getFlavorsForNativeCache.remove(null);
             } else {
-                natives = new ArrayList(0);
+                natives = new ArrayList<>(0);
             }
         }
 
@@ -675,21 +675,21 @@
      * @since 1.4
      */
     public synchronized List<String> getNativesForFlavor(DataFlavor flav) {
-        List retval = null;
+        List<String> retval = null;
 
         // Check cache, even for null flav
-        SoftReference ref = (SoftReference)getNativesForFlavorCache.get(flav);
+        SoftReference<List<String>> ref = getNativesForFlavorCache.get(flav);
         if (ref != null) {
-            retval = (List)ref.get();
+            retval = ref.get();
             if (retval != null) {
                 // Create a copy, because client code can modify the returned
                 // list.
-                return new ArrayList(retval);
+                return new ArrayList<>(retval);
             }
         }
 
         if (flav == null) {
-            retval = new ArrayList<String>(getNativeToFlavor().keySet());
+            retval = new ArrayList<>(getNativeToFlavor().keySet());
         } else if (disabledMappingGenerationKeys.contains(flav)) {
             // In this case we shouldn't synthesize a native for this flavor,
             // since its mappings were explicitly specified.
@@ -699,7 +699,7 @@
             // For text/* flavors, flavor-to-native mappings specified in
             // flavormap.properties are stored per flavor's base type.
             if ("text".equals(flav.getPrimaryType())) {
-                retval = (List)getFlavorToNative().get(flav.mimeType.getBaseType());
+                retval = getAllNativesForType(flav.mimeType.getBaseType());
                 if (retval != null) {
                     // To prevent the List stored in the map from modification.
                     retval = new ArrayList(retval);
@@ -707,15 +707,15 @@
             }
 
             // Also include text/plain natives, but don't duplicate Strings
-            List textPlainList = (List)getFlavorToNative().get(TEXT_PLAIN_BASE_TYPE);
+            List<String> textPlainList = getAllNativesForType(TEXT_PLAIN_BASE_TYPE);
 
             if (textPlainList != null && !textPlainList.isEmpty()) {
                 // To prevent the List stored in the map from modification.
                 // This also guarantees that removeAll() is supported.
-                textPlainList = new ArrayList(textPlainList);
+                textPlainList = new ArrayList<>(textPlainList);
                 if (retval != null && !retval.isEmpty()) {
                     // Use HashSet to get constant-time performance for search.
-                    textPlainList.removeAll(new HashSet(retval));
+                    textPlainList.removeAll(new HashSet<>(retval));
                     retval.addAll(textPlainList);
                 } else {
                     retval = textPlainList;
@@ -728,7 +728,7 @@
                 // In this branch it is guaranteed that natives explicitly
                 // listed for flav's MIME type were added with
                 // addUnencodedNativeForFlavor(), so they have lower priority.
-                List explicitList =
+                List<String> explicitList =
                     flavorToNativeLookup(flav, !SYNTHESIZE_IF_NOT_FOUND);
 
                 // flavorToNativeLookup() never returns null.
@@ -736,14 +736,14 @@
                 if (!explicitList.isEmpty()) {
                     // To prevent the List stored in the map from modification.
                     // This also guarantees that removeAll() is supported.
-                    explicitList = new ArrayList(explicitList);
+                    explicitList = new ArrayList<>(explicitList);
                     // Use HashSet to get constant-time performance for search.
-                    explicitList.removeAll(new HashSet(retval));
+                    explicitList.removeAll(new HashSet<>(retval));
                     retval.addAll(explicitList);
                 }
             }
         } else if (DataTransferer.isFlavorNoncharsetTextType(flav)) {
-            retval = (List)getFlavorToNative().get(flav.mimeType.getBaseType());
+            retval = getAllNativesForType(flav.mimeType.getBaseType());
 
             if (retval == null || retval.isEmpty()) {
                 retval = flavorToNativeLookup(flav, SYNTHESIZE_IF_NOT_FOUND);
@@ -751,7 +751,7 @@
                 // In this branch it is guaranteed that natives explicitly
                 // listed for flav's MIME type were added with
                 // addUnencodedNativeForFlavor(), so they have lower priority.
-                List explicitList =
+                List<String> explicitList =
                     flavorToNativeLookup(flav, !SYNTHESIZE_IF_NOT_FOUND);
 
                 // flavorToNativeLookup() never returns null.
@@ -759,10 +759,10 @@
                 if (!explicitList.isEmpty()) {
                     // To prevent the List stored in the map from modification.
                     // This also guarantees that add/removeAll() are supported.
-                    retval = new ArrayList(retval);
-                    explicitList = new ArrayList(explicitList);
+                    retval = new ArrayList<>(retval);
+                    explicitList = new ArrayList<>(explicitList);
                     // Use HashSet to get constant-time performance for search.
-                    explicitList.removeAll(new HashSet(retval));
+                    explicitList.removeAll(new HashSet<>(retval));
                     retval.addAll(explicitList);
                 }
             }
@@ -770,9 +770,9 @@
             retval = flavorToNativeLookup(flav, SYNTHESIZE_IF_NOT_FOUND);
         }
 
-        getNativesForFlavorCache.put(flav, new SoftReference(retval));
+        getNativesForFlavorCache.put(flav, new SoftReference<>(retval));
         // Create a copy, because client code can modify the returned list.
-        return new ArrayList(retval);
+        return new ArrayList<>(retval);
     }
 
     /**
@@ -809,11 +809,11 @@
     public synchronized List<DataFlavor> getFlavorsForNative(String nat) {
 
         // Check cache, even for null nat
-        SoftReference ref = (SoftReference)getFlavorsForNativeCache.get(nat);
+        SoftReference<List<DataFlavor>> ref = getFlavorsForNativeCache.get(nat);
         if (ref != null) {
-            ArrayList retval = (ArrayList)ref.get();
+            List<DataFlavor> retval = ref.get();
             if (retval != null) {
-                return (List)retval.clone();
+                return new ArrayList<>(retval);
             }
         }
 
@@ -859,16 +859,15 @@
 
         }
 
-        final ArrayList arrayList = new ArrayList(returnValue);
-        getFlavorsForNativeCache.put(nat, new SoftReference(arrayList));
-        return (List)arrayList.clone();
+        final List<DataFlavor> arrayList = new ArrayList<>(returnValue);
+        getFlavorsForNativeCache.put(nat, new SoftReference<>(arrayList));
+        return new ArrayList<>(arrayList);
     }
 
-    private static LinkedHashSet<DataFlavor> convertMimeTypeToDataFlavors(
+    private static Set<DataFlavor> convertMimeTypeToDataFlavors(
         final String baseType) {
 
-        final LinkedHashSet<DataFlavor> returnValue =
-            new LinkedHashSet<DataFlavor>();
+        final Set<DataFlavor> returnValue = new LinkedHashSet<>();
 
         String subType = null;
 
@@ -1009,11 +1008,11 @@
             flavor_list.toArray(flavors);
         }
 
-        HashMap retval = new HashMap(flavors.length, 1.0f);
-        for (int i = 0; i < flavors.length; i++) {
-            List natives = getNativesForFlavor(flavors[i]);
-            String nat = (natives.isEmpty()) ? null : (String)natives.get(0);
-            retval.put(flavors[i], nat);
+        Map<DataFlavor, String> retval = new HashMap<>(flavors.length, 1.0f);
+        for (DataFlavor flavor : flavors) {
+            List<String> natives = getNativesForFlavor(flavor);
+            String nat = (natives.isEmpty()) ? null : natives.get(0);
+            retval.put(flavor, nat);
         }
 
         return retval;
@@ -1054,12 +1053,11 @@
             native_list.toArray(natives);
         }
 
-        HashMap retval = new HashMap(natives.length, 1.0f);
-        for (int i = 0; i < natives.length; i++) {
-            List flavors = getFlavorsForNative(natives[i]);
-            DataFlavor flav = (flavors.isEmpty())
-                ? null : (DataFlavor)flavors.get(0);
-            retval.put(natives[i], flav);
+        Map<String, DataFlavor> retval = new HashMap<>(natives.length, 1.0f);
+        for (String aNative : natives) {
+            List<DataFlavor> flavors = getFlavorsForNative(aNative);
+            DataFlavor flav = (flavors.isEmpty())? null : flavors.get(0);
+            retval.put(aNative, flav);
         }
 
         return retval;
@@ -1091,9 +1089,9 @@
             throw new NullPointerException("null arguments not permitted");
         }
 
-        List natives = (List)getFlavorToNative().get(flav);
+        List<String> natives = getFlavorToNative().get(flav);
         if (natives == null) {
-            natives = new ArrayList(1);
+            natives = new ArrayList<>(1);
             getFlavorToNative().put(flav, natives);
         } else if (natives.contains(nat)) {
             return;
@@ -1138,8 +1136,8 @@
         }
 
         getFlavorToNative().remove(flav);
-        for (int i = 0; i < natives.length; i++) {
-            addUnencodedNativeForFlavor(flav, natives[i]);
+        for (String aNative : natives) {
+            addUnencodedNativeForFlavor(flav, aNative);
         }
         disabledMappingGenerationKeys.add(flav);
         // Clear the cache to handle the case of empty natives.
@@ -1171,9 +1169,9 @@
             throw new NullPointerException("null arguments not permitted");
         }
 
-        List flavors = (List)getNativeToFlavor().get(nat);
+        List<DataFlavor> flavors = getNativeToFlavor().get(nat);
         if (flavors == null) {
-            flavors = new ArrayList(1);
+            flavors = new ArrayList<>(1);
             getNativeToFlavor().put(nat, flavors);
         } else if (flavors.contains(flav)) {
             return;
@@ -1217,8 +1215,8 @@
         }
 
         getNativeToFlavor().remove(nat);
-        for (int i = 0; i < flavors.length; i++) {
-            addFlavorForUnencodedNative(nat, flavors[i]);
+        for (DataFlavor flavor : flavors) {
+            addFlavorForUnencodedNative(nat, flavor);
         }
         disabledMappingGenerationKeys.add(nat);
         // Clear the cache to handle the case of empty flavors.
@@ -1321,4 +1319,18 @@
             ? new DataFlavor(retval_str)
             : null;
     }
+
+    private List<String> getAllNativesForType(String type) {
+        List<String> retval = null;
+        for (DataFlavor dataFlavor : convertMimeTypeToDataFlavors(type)) {
+            List<String> natives = getFlavorToNative().get(dataFlavor);
+            if (!natives.isEmpty()) {
+                if (retval == null) {
+                    retval = new ArrayList<>();
+                }
+                retval.addAll(natives);
+            }
+        }
+        return retval;
+    }
 }
--- a/jdk/src/share/classes/java/awt/dnd/DragGestureRecognizer.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/dnd/DragGestureRecognizer.java	Thu Sep 26 17:18:12 2013 -0700
@@ -114,7 +114,7 @@
      * @param dgl the <code>DragGestureRecognizer</code>
      * to notify when a drag gesture is detected
      * <P>
-     * @throws <code>IllegalArgumentException</code>
+     * @throws IllegalArgumentException
      * if ds is <code>null</code>.
      */
 
@@ -157,7 +157,7 @@
      * @param sa the set (logical OR) of the <code>DnDConstants</code>
      * that this Drag and Drop operation will support
      * <P>
-     * @throws <code>IllegalArgumentException</code>
+     * @throws IllegalArgumentException
      * if ds is <code>null</code>.
      */
 
@@ -185,7 +185,7 @@
      * the <code>DragGestureRecognizer</code>
      * is not associated with any <code>Component</code>.
      * <P>
-     * @throws <code>IllegalArgumentException</code>
+     * @throws IllegalArgumentException
      * if ds is <code>null</code>.
      */
 
@@ -202,7 +202,7 @@
      * <code>DragGestureRecognizer</code> will
      * use to process the Drag and Drop operation
      * <P>
-     * @throws <code>IllegalArgumentException</code>
+     * @throws IllegalArgumentException
      * if ds is <code>null</code>.
      */
 
@@ -332,7 +332,7 @@
      * @param dgl the <code>DragGestureListener</code> to unregister
      * from this <code>DragGestureRecognizer</code>
      * <P>
-     * @throws <code>IllegalArgumentException</code> if
+     * @throws IllegalArgumentException if
      * dgl is not (equal to) the currently registered <code>DragGestureListener</code>.
      */
 
--- a/jdk/src/share/classes/java/awt/dnd/DragSource.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/dnd/DragSource.java	Thu Sep 26 17:18:12 2013 -0700
@@ -676,7 +676,7 @@
      *          <code><em>Foo</em>Listener</code>s on this
      *          <code>DragSource</code>, or an empty array if no such listeners
      *          have been added
-     * @exception <code>ClassCastException</code> if <code>listenerType</code>
+     * @exception ClassCastException if <code>listenerType</code>
      *          doesn't specify a class or interface that implements
      *          <code>java.util.EventListener</code>
      *
--- a/jdk/src/share/classes/java/awt/dnd/DragSourceContext.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/dnd/DragSourceContext.java	Thu Sep 26 17:18:12 2013 -0700
@@ -63,7 +63,7 @@
  * itself between the platform and the
  * listeners provided by the initiator of the drag operation.
  * <p>
- * <a name="defaultCursor" />
+ * <a name="defaultCursor"></a>
  * By default, {@code DragSourceContext} sets the cursor as appropriate
  * for the current state of the drag and drop operation. For example, if
  * the user has chosen {@linkplain DnDConstants#ACTION_MOVE the move action},
--- a/jdk/src/share/classes/java/awt/dnd/DragSourceDragEvent.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/dnd/DragSourceDragEvent.java	Thu Sep 26 17:18:12 2013 -0700
@@ -47,9 +47,9 @@
  * source and the drop action selected by the user. The user can select a drop
  * action by pressing modifier keys during the drag operation:
  * <pre>
- *   Ctrl + Shift -> ACTION_LINK
- *   Ctrl         -> ACTION_COPY
- *   Shift        -> ACTION_MOVE
+ *   Ctrl + Shift -&gt; ACTION_LINK
+ *   Ctrl         -&gt; ACTION_COPY
+ *   Shift        -&gt; ACTION_MOVE
  * </pre>
  * If the user selects a drop action, the <i>user drop action</i> is one of
  * <code>DnDConstants</code> that represents the selected drop action if this
@@ -103,7 +103,7 @@
      *        in one event. Use of the extended modifiers is
      *        preferred.
      *
-     * @throws <code>IllegalArgumentException</code> if <code>dsc</code> is <code>null</code>.
+     * @throws IllegalArgumentException if <code>dsc</code> is <code>null</code>.
      *
      * @see java.awt.event.InputEvent
      * @see DragSourceEvent#getLocation
@@ -154,7 +154,7 @@
      * @param x   the horizontal coordinate for the cursor location
      * @param y   the vertical coordinate for the cursor location
      *
-     * @throws <code>IllegalArgumentException</code> if <code>dsc</code> is <code>null</code>.
+     * @throws IllegalArgumentException if <code>dsc</code> is <code>null</code>.
      *
      * @see java.awt.event.InputEvent
      * @since 1.4
--- a/jdk/src/share/classes/java/awt/dnd/DragSourceDropEvent.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/dnd/DragSourceDropEvent.java	Thu Sep 26 17:18:12 2013 -0700
@@ -63,7 +63,7 @@
      * @param action the drop action
      * @param success a boolean indicating if the drop was successful
      *
-     * @throws <code>IllegalArgumentException</code> if <code>dsc</code> is <code>null</code>.
+     * @throws IllegalArgumentException if <code>dsc</code> is <code>null</code>.
      *
      * @see DragSourceEvent#getLocation
      */
@@ -91,7 +91,7 @@
      * @param x   the horizontal coordinate for the cursor location
      * @param y   the vertical coordinate for the cursor location
      *
-     * @throws <code>IllegalArgumentException</code> if <code>dsc</code> is <code>null</code>.
+     * @throws IllegalArgumentException if <code>dsc</code> is <code>null</code>.
      *
      * @since 1.4
      */
@@ -112,7 +112,7 @@
      *
      * @param dsc the <code>DragSourceContext</code>
      *
-     * @throws <code>IllegalArgumentException</code> if <code>dsc</code> is <code>null</code>.
+     * @throws IllegalArgumentException if <code>dsc</code> is <code>null</code>.
      *
      * @see DragSourceEvent#getLocation
      */
--- a/jdk/src/share/classes/java/awt/dnd/DragSourceEvent.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/dnd/DragSourceEvent.java	Thu Sep 26 17:18:12 2013 -0700
@@ -96,7 +96,7 @@
      *
      * @param dsc the <code>DragSourceContext</code>
      *
-     * @throws <code>IllegalArgumentException</code> if <code>dsc</code> is <code>null</code>.
+     * @throws IllegalArgumentException if <code>dsc</code> is <code>null</code>.
      *
      * @see #getLocation
      */
@@ -117,7 +117,7 @@
      * @param x   the horizontal coordinate for the cursor location
      * @param y   the vertical coordinate for the cursor location
      *
-     * @throws <code>IllegalArgumentException</code> if <code>dsc</code> is <code>null</code>.
+     * @throws IllegalArgumentException if <code>dsc</code> is <code>null</code>.
      *
      * @since 1.4
      */
--- a/jdk/src/share/classes/java/awt/dnd/DropTarget.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/dnd/DropTarget.java	Thu Sep 26 17:18:12 2013 -0700
@@ -305,7 +305,7 @@
      * <P>
      * @param dtl The new <code>DropTargetListener</code>
      * <P>
-     * @throws <code>TooManyListenersException</code> if a
+     * @throws TooManyListenersException if a
      * <code>DropTargetListener</code> is already added to this
      * <code>DropTarget</code>.
      */
@@ -351,6 +351,8 @@
      * @see #isActive
      */
     public synchronized void dragEnter(DropTargetDragEvent dtde) {
+        isDraggingInside = true;
+
         if (!active) return;
 
         if (dtListener != null) {
@@ -421,6 +423,8 @@
      * @see #isActive
      */
     public synchronized void dragExit(DropTargetEvent dte) {
+        isDraggingInside = false;
+
         if (!active) return;
 
         if (dtListener != null && active) dtListener.dragExit(dte);
@@ -444,6 +448,8 @@
      * @see #isActive
      */
     public synchronized void drop(DropTargetDropEvent dtde) {
+        isDraggingInside = false;
+
         clearAutoscroll();
 
         if (dtListener != null && active)
@@ -533,6 +539,12 @@
             ((DropTargetPeer)nativePeer).removeDropTarget(this);
 
         componentPeer = nativePeer = null;
+
+        synchronized (this) {
+            if (isDraggingInside) {
+                dragExit(new DropTargetEvent(getDropTargetContext()));
+            }
+        }
     }
 
     /**
@@ -832,7 +844,7 @@
     int     actions = DnDConstants.ACTION_COPY_OR_MOVE;
 
     /**
-     * <code>true</code> if the DropTarget is accepting Drag & Drop operations.
+     * <code>true</code> if the DropTarget is accepting Drag &amp; Drop operations.
      *
      * @serial
      */
@@ -855,4 +867,9 @@
      */
 
     private transient FlavorMap flavorMap;
+
+    /*
+     * If the dragging is currently inside this drop target
+     */
+    private transient boolean isDraggingInside;
 }
--- a/jdk/src/share/classes/java/awt/dnd/DropTargetDragEvent.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/dnd/DropTargetDragEvent.java	Thu Sep 26 17:18:12 2013 -0700
@@ -49,9 +49,9 @@
  * source and the drop action selected by the user. The user can select a drop
  * action by pressing modifier keys during the drag operation:
  * <pre>
- *   Ctrl + Shift -> ACTION_LINK
- *   Ctrl         -> ACTION_COPY
- *   Shift        -> ACTION_MOVE
+ *   Ctrl + Shift -&gt; ACTION_LINK
+ *   Ctrl         -&gt; ACTION_COPY
+ *   Shift        -&gt; ACTION_MOVE
  * </pre>
  * If the user selects a drop action, the <i>user drop action</i> is one of
  * <code>DnDConstants</code> that represents the selected drop action if this
@@ -88,11 +88,11 @@
      * @param srcActions The source drop actions
      *
      * @throws NullPointerException if cursorLocn is null
-     * @throws <code>IllegalArgumentException</code> if dropAction is not one of
+     * @throws IllegalArgumentException if dropAction is not one of
      *         <code>DnDConstants</code>.
-     * @throws <code>IllegalArgumentException</code> if srcActions is not
+     * @throws IllegalArgumentException if srcActions is not
      *         a bitwise mask of <code>DnDConstants</code>.
-     * @throws <code>IllegalArgumentException</code> if dtc is <code>null</code>.
+     * @throws IllegalArgumentException if dtc is <code>null</code>.
      */
 
     public DropTargetDragEvent(DropTargetContext dtc, Point cursorLocn, int dropAction, int srcActions)  {
--- a/jdk/src/share/classes/java/awt/dnd/DropTargetDropEvent.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/dnd/DropTargetDropEvent.java	Thu Sep 26 17:18:12 2013 -0700
@@ -48,9 +48,9 @@
  * source and the drop action selected by the user. The user can select a drop
  * action by pressing modifier keys during the drag operation:
  * <pre>
- *   Ctrl + Shift -> ACTION_LINK
- *   Ctrl         -> ACTION_COPY
- *   Shift        -> ACTION_MOVE
+ *   Ctrl + Shift -&gt; ACTION_LINK
+ *   Ctrl         -&gt; ACTION_COPY
+ *   Shift        -&gt; ACTION_MOVE
  * </pre>
  * If the user selects a drop action, the <i>user drop action</i> is one of
  * <code>DnDConstants</code> that represents the selected drop action if this
@@ -92,13 +92,13 @@
      * @param dropAction the user drop action.
      * @param srcActions the source drop actions.
      *
-     * @throws <code>NullPointerException</code>
+     * @throws NullPointerException
      * if cursorLocn is <code>null</code>
-     * @throws <code>IllegalArgumentException</code> if dropAction is not one of
-     *         <code>DnDConstants</code>.
-     * @throws <code>IllegalArgumentException</code> if srcActions is not
-     *         a bitwise mask of <code>DnDConstants</code>.
-     * @throws <code>IllegalArgumentException</code> if dtc is <code>null</code>.
+     * @throws IllegalArgumentException
+     *         if dropAction is not one of  <code>DnDConstants</code>.
+     * @throws IllegalArgumentException
+     *         if srcActions is not a bitwise mask of <code>DnDConstants</code>.
+     * @throws IllegalArgumentException if dtc is <code>null</code>.
      */
 
     public DropTargetDropEvent(DropTargetContext dtc, Point cursorLocn, int dropAction, int srcActions)  {
@@ -136,13 +136,12 @@
      * @param srcActions the source drop actions.
      * @param isLocal  True if the source is in the same JVM as the target
      *
-     * @throws <code>NullPointerException</code> if cursorLocn is
-     *         <code>null</code>
-     * @throws <code>IllegalArgumentException</code> if dropAction is not one of
-     *         <code>DnDConstants</code>.
-     * @throws <code>IllegalArgumentException</code> if srcActions is not
-     *         a bitwise mask of <code>DnDConstants</code>.
-     * @throws <code>IllegalArgumentException</code> if dtc is <code>null</code>.
+     * @throws NullPointerException
+     *         if cursorLocn is  <code>null</code>
+     * @throws IllegalArgumentException
+     *         if dropAction is not one of <code>DnDConstants</code>.
+     * @throws IllegalArgumentException if srcActions is not a bitwise mask of <code>DnDConstants</code>.
+     * @throws IllegalArgumentException  if dtc is <code>null</code>.
      */
 
     public DropTargetDropEvent(DropTargetContext dtc, Point cursorLocn, int dropAction, int srcActions, boolean isLocal)  {
--- a/jdk/src/share/classes/java/awt/event/MouseMotionListener.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/awt/event/MouseMotionListener.java	Thu Sep 26 17:18:12 2013 -0700
@@ -60,9 +60,9 @@
      * mouse button is released (regardless of whether the mouse position
      * is within the bounds of the component).
      * <p>
-     * Due to platform-dependent Drag&Drop implementations,
+     * Due to platform-dependent Drag&amp;Drop implementations,
      * <code>MOUSE_DRAGGED</code> events may not be delivered during a native
-     * Drag&Drop operation.
+     * Drag&amp;Drop operation.
      */
     public void mouseDragged(MouseEvent e);
 
--- a/jdk/src/share/classes/java/beans/DefaultPersistenceDelegate.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/beans/DefaultPersistenceDelegate.java	Thu Sep 26 17:18:12 2013 -0700
@@ -149,6 +149,7 @@
      * @return An expression whose value is <code>oldInstance</code>.
      *
      * @throws NullPointerException if {@code out} is {@code null}
+     *                              and this value is used in the method
      *
      * @see #DefaultPersistenceDelegate(String[])
      */
--- a/jdk/src/share/classes/java/beans/IndexedPropertyDescriptor.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/beans/IndexedPropertyDescriptor.java	Thu Sep 26 17:18:12 2013 -0700
@@ -41,8 +41,8 @@
 public class IndexedPropertyDescriptor extends PropertyDescriptor {
 
     private Reference<? extends Class<?>> indexedPropertyTypeRef;
-    private Reference<Method> indexedReadMethodRef;
-    private Reference<Method> indexedWriteMethodRef;
+    private final MethodRef indexedReadMethodRef = new MethodRef();
+    private final MethodRef indexedWriteMethodRef = new MethodRef();
 
     private String indexedReadMethodName;
     private String indexedWriteMethodName;
@@ -173,11 +173,11 @@
      * May return null if the property isn't indexed or is write-only.
      */
     public synchronized Method getIndexedReadMethod() {
-        Method indexedReadMethod = getIndexedReadMethod0();
+        Method indexedReadMethod = this.indexedReadMethodRef.get();
         if (indexedReadMethod == null) {
             Class<?> cls = getClass0();
             if (cls == null ||
-                (indexedReadMethodName == null && indexedReadMethodRef == null)) {
+                (indexedReadMethodName == null && !this.indexedReadMethodRef.isSet())) {
                 // the Indexed readMethod was explicitly set to null.
                 return null;
             }
@@ -215,20 +215,19 @@
 
         // the indexed property type is set by the reader.
         setIndexedPropertyType(findIndexedPropertyType(readMethod,
-                                                       getIndexedWriteMethod0()));
+                                                       this.indexedWriteMethodRef.get()));
         setIndexedReadMethod0(readMethod);
     }
 
     private void setIndexedReadMethod0(Method readMethod) {
+        this.indexedReadMethodRef.set(readMethod);
         if (readMethod == null) {
             indexedReadMethodName = null;
-            indexedReadMethodRef = null;
             return;
         }
         setClass0(readMethod.getDeclaringClass());
 
         indexedReadMethodName = readMethod.getName();
-        this.indexedReadMethodRef = getSoftReference(readMethod);
         setTransient(readMethod.getAnnotation(Transient.class));
     }
 
@@ -241,11 +240,11 @@
      * May return null if the property isn't indexed or is read-only.
      */
     public synchronized Method getIndexedWriteMethod() {
-        Method indexedWriteMethod = getIndexedWriteMethod0();
+        Method indexedWriteMethod = this.indexedWriteMethodRef.get();
         if (indexedWriteMethod == null) {
             Class<?> cls = getClass0();
             if (cls == null ||
-                (indexedWriteMethodName == null && indexedWriteMethodRef == null)) {
+                (indexedWriteMethodName == null && !this.indexedWriteMethodRef.isSet())) {
                 // the Indexed writeMethod was explicitly set to null.
                 return null;
             }
@@ -301,15 +300,14 @@
     }
 
     private void setIndexedWriteMethod0(Method writeMethod) {
+        this.indexedWriteMethodRef.set(writeMethod);
         if (writeMethod == null) {
             indexedWriteMethodName = null;
-            indexedWriteMethodRef = null;
             return;
         }
         setClass0(writeMethod.getDeclaringClass());
 
         indexedWriteMethodName = writeMethod.getName();
-        this.indexedWriteMethodRef = getSoftReference(writeMethod);
         setTransient(writeMethod.getAnnotation(Transient.class));
     }
 
@@ -349,18 +347,6 @@
                 : null;
     }
 
-    private Method getIndexedReadMethod0() {
-        return (this.indexedReadMethodRef != null)
-                ? this.indexedReadMethodRef.get()
-                : null;
-    }
-
-    private Method getIndexedWriteMethod0() {
-        return (this.indexedWriteMethodRef != null)
-                ? this.indexedWriteMethodRef.get()
-                : null;
-    }
-
     private Class<?> findIndexedPropertyType(Method indexedReadMethod,
                                           Method indexedWriteMethod)
         throws IntrospectionException {
@@ -492,8 +478,8 @@
      */
     IndexedPropertyDescriptor(IndexedPropertyDescriptor old) {
         super(old);
-        indexedReadMethodRef = old.indexedReadMethodRef;
-        indexedWriteMethodRef = old.indexedWriteMethodRef;
+        this.indexedReadMethodRef.set(old.indexedReadMethodRef.get());
+        this.indexedWriteMethodRef.set(old.indexedWriteMethodRef.get());
         indexedPropertyTypeRef = old.indexedPropertyTypeRef;
         indexedWriteMethodName = old.indexedWriteMethodName;
         indexedReadMethodName = old.indexedReadMethodName;
@@ -502,7 +488,7 @@
     void updateGenericsFor(Class<?> type) {
         super.updateGenericsFor(type);
         try {
-            setIndexedPropertyType(findIndexedPropertyType(getIndexedReadMethod0(), getIndexedWriteMethod0()));
+            setIndexedPropertyType(findIndexedPropertyType(this.indexedReadMethodRef.get(), this.indexedWriteMethodRef.get()));
         }
         catch (IntrospectionException exception) {
             setIndexedPropertyType(null);
@@ -532,7 +518,7 @@
     void appendTo(StringBuilder sb) {
         super.appendTo(sb);
         appendTo(sb, "indexedPropertyType", this.indexedPropertyTypeRef);
-        appendTo(sb, "indexedReadMethod", this.indexedReadMethodRef);
-        appendTo(sb, "indexedWriteMethod", this.indexedWriteMethodRef);
+        appendTo(sb, "indexedReadMethod", this.indexedReadMethodRef.get());
+        appendTo(sb, "indexedWriteMethod", this.indexedWriteMethodRef.get());
     }
 }
--- a/jdk/src/share/classes/java/beans/MethodDescriptor.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/beans/MethodDescriptor.java	Thu Sep 26 17:18:12 2013 -0700
@@ -38,7 +38,7 @@
 
 public class MethodDescriptor extends FeatureDescriptor {
 
-    private Reference<Method> methodRef;
+    private final MethodRef methodRef = new MethodRef();
 
     private String[] paramNames;
 
@@ -81,7 +81,7 @@
      * @return The low-level description of the method
      */
     public synchronized Method getMethod() {
-        Method method = getMethod0();
+        Method method = this.methodRef.get();
         if (method == null) {
             Class<?> cls = getClass0();
             String name = getName();
@@ -114,13 +114,7 @@
             setClass0(method.getDeclaringClass());
         }
         setParams(getParameterTypes(getClass0(), method));
-        this.methodRef = getSoftReference(method);
-    }
-
-    private Method getMethod0() {
-        return (this.methodRef != null)
-                ? this.methodRef.get()
-                : null;
+        this.methodRef.set(method);
     }
 
     private synchronized void setParams(Class<?>[] param) {
@@ -177,12 +171,10 @@
      */
 
     MethodDescriptor(MethodDescriptor x, MethodDescriptor y) {
-        super(x,y);
+        super(x, y);
 
-        methodRef = x.methodRef;
-        if (y.methodRef != null) {
-            methodRef = y.methodRef;
-        }
+        Method method = y.methodRef.get();
+        this.methodRef.set(null != method ? method : x.methodRef.get());
         params = x.params;
         if (y.params != null) {
             params = y.params;
@@ -205,7 +197,7 @@
     MethodDescriptor(MethodDescriptor old) {
         super(old);
 
-        methodRef = old.methodRef;
+        this.methodRef.set(old.getMethod());
         params = old.params;
         paramNames = old.paramNames;
 
@@ -219,7 +211,7 @@
     }
 
     void appendTo(StringBuilder sb) {
-        appendTo(sb, "method", this.methodRef);
+        appendTo(sb, "method", this.methodRef.get());
         if (this.parameterDescriptors != null) {
             sb.append("; parameterDescriptors={");
             for (ParameterDescriptor pd : this.parameterDescriptors) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/java/beans/MethodRef.java	Thu Sep 26 17:18:12 2013 -0700
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2013, 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * 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.
+ */
+
+package java.beans;
+
+import java.lang.ref.SoftReference;
+import java.lang.ref.WeakReference;
+import java.lang.reflect.Method;
+
+import static sun.reflect.misc.ReflectUtil.isPackageAccessible;
+
+final class MethodRef {
+    private String signature;
+    private SoftReference<Method> methodRef;
+    private WeakReference<Class<?>> typeRef;
+
+    void set(Method method) {
+        if (method == null) {
+            this.signature = null;
+            this.methodRef = null;
+            this.typeRef = null;
+        }
+        else {
+            this.signature = method.toGenericString();
+            this.methodRef = new SoftReference<>(method);
+            this.typeRef = new WeakReference<Class<?>>(method.getDeclaringClass());
+        }
+    }
+
+    boolean isSet() {
+        return this.methodRef != null;
+    }
+
+    Method get() {
+        if (this.methodRef == null) {
+            return null;
+        }
+        Method method = this.methodRef.get();
+        if (method == null) {
+            method = find(this.typeRef.get(), this.signature);
+            if (method == null) {
+                this.signature = null;
+                this.methodRef = null;
+                this.typeRef = null;
+            }
+            else {
+                this.methodRef = new SoftReference<>(method);
+            }
+        }
+        return isPackageAccessible(method.getDeclaringClass()) ? method : null;
+    }
+
+    private static Method find(Class<?> type, String signature) {
+        if (type != null) {
+            for (Method method : type.getMethods()) {
+                if (type.equals(method.getDeclaringClass())) {
+                    if (method.toGenericString().equals(signature)) {
+                        return method;
+                    }
+                }
+            }
+        }
+        return null;
+    }
+}
--- a/jdk/src/share/classes/java/beans/PersistenceDelegate.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/beans/PersistenceDelegate.java	Thu Sep 26 17:18:12 2013 -0700
@@ -162,6 +162,7 @@
      * @return An expression whose value is <code>oldInstance</code>.
      *
      * @throws NullPointerException if {@code out} is {@code null}
+     *                              and this value is used in the method
      */
     protected abstract Expression instantiate(Object oldInstance, Encoder out);
 
--- a/jdk/src/share/classes/java/beans/PropertyDescriptor.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/beans/PropertyDescriptor.java	Thu Sep 26 17:18:12 2013 -0700
@@ -36,8 +36,8 @@
 public class PropertyDescriptor extends FeatureDescriptor {
 
     private Reference<? extends Class<?>> propertyTypeRef;
-    private Reference<Method> readMethodRef;
-    private Reference<Method> writeMethodRef;
+    private final MethodRef readMethodRef = new MethodRef();
+    private final MethodRef writeMethodRef = new MethodRef();
     private Reference<? extends Class<?>> propertyEditorClassRef;
 
     private boolean bound;
@@ -68,8 +68,8 @@
     public PropertyDescriptor(String propertyName, Class<?> beanClass)
                 throws IntrospectionException {
         this(propertyName, beanClass,
-             Introspector.IS_PREFIX + NameGenerator.capitalize(propertyName),
-             Introspector.SET_PREFIX + NameGenerator.capitalize(propertyName));
+                Introspector.IS_PREFIX + NameGenerator.capitalize(propertyName),
+                Introspector.SET_PREFIX + NameGenerator.capitalize(propertyName));
     }
 
     /**
@@ -203,10 +203,10 @@
      * May return null if the property can't be read.
      */
     public synchronized Method getReadMethod() {
-        Method readMethod = getReadMethod0();
+        Method readMethod = this.readMethodRef.get();
         if (readMethod == null) {
             Class<?> cls = getClass0();
-            if (cls == null || (readMethodName == null && readMethodRef == null)) {
+            if (cls == null || (readMethodName == null && !this.readMethodRef.isSet())) {
                 // The read method was explicitly set to null.
                 return null;
             }
@@ -247,17 +247,16 @@
      */
     public synchronized void setReadMethod(Method readMethod)
                                 throws IntrospectionException {
+        this.readMethodRef.set(readMethod);
         if (readMethod == null) {
             readMethodName = null;
-            readMethodRef = null;
             return;
         }
         // The property type is determined by the read method.
-        setPropertyType(findPropertyType(readMethod, getWriteMethod0()));
+        setPropertyType(findPropertyType(readMethod, this.writeMethodRef.get()));
         setClass0(readMethod.getDeclaringClass());
 
         readMethodName = readMethod.getName();
-        this.readMethodRef = getSoftReference(readMethod);
         setTransient(readMethod.getAnnotation(Transient.class));
     }
 
@@ -268,10 +267,10 @@
      * May return null if the property can't be written.
      */
     public synchronized Method getWriteMethod() {
-        Method writeMethod = getWriteMethod0();
+        Method writeMethod = this.writeMethodRef.get();
         if (writeMethod == null) {
             Class<?> cls = getClass0();
-            if (cls == null || (writeMethodName == null && writeMethodRef == null)) {
+            if (cls == null || (writeMethodName == null && !this.writeMethodRef.isSet())) {
                 // The write method was explicitly set to null.
                 return null;
             }
@@ -318,9 +317,9 @@
      */
     public synchronized void setWriteMethod(Method writeMethod)
                                 throws IntrospectionException {
+        this.writeMethodRef.set(writeMethod);
         if (writeMethod == null) {
             writeMethodName = null;
-            writeMethodRef = null;
             return;
         }
         // Set the property type - which validates the method
@@ -328,22 +327,9 @@
         setClass0(writeMethod.getDeclaringClass());
 
         writeMethodName = writeMethod.getName();
-        this.writeMethodRef = getSoftReference(writeMethod);
         setTransient(writeMethod.getAnnotation(Transient.class));
     }
 
-    private Method getReadMethod0() {
-        return (this.readMethodRef != null)
-                ? this.readMethodRef.get()
-                : null;
-    }
-
-    private Method getWriteMethod0() {
-        return (this.writeMethodRef != null)
-                ? this.writeMethodRef.get()
-                : null;
-    }
-
     /**
      * Overridden to ensure that a super class doesn't take precedent
      */
@@ -617,8 +603,8 @@
     PropertyDescriptor(PropertyDescriptor old) {
         super(old);
         propertyTypeRef = old.propertyTypeRef;
-        readMethodRef = old.readMethodRef;
-        writeMethodRef = old.writeMethodRef;
+        this.readMethodRef.set(old.readMethodRef.get());
+        this.writeMethodRef.set(old.writeMethodRef.get());
         propertyEditorClassRef = old.propertyEditorClassRef;
 
         writeMethodName = old.writeMethodName;
@@ -632,7 +618,7 @@
     void updateGenericsFor(Class<?> type) {
         setClass0(type);
         try {
-            setPropertyType(findPropertyType(getReadMethod0(), getWriteMethod0()));
+            setPropertyType(findPropertyType(this.readMethodRef.get(), this.writeMethodRef.get()));
         }
         catch (IntrospectionException exception) {
             setPropertyType(null);
@@ -723,8 +709,8 @@
         appendTo(sb, "constrained", this.constrained);
         appendTo(sb, "propertyEditorClass", this.propertyEditorClassRef);
         appendTo(sb, "propertyType", this.propertyTypeRef);
-        appendTo(sb, "readMethod", this.readMethodRef);
-        appendTo(sb, "writeMethod", this.writeMethodRef);
+        appendTo(sb, "readMethod", this.readMethodRef.get());
+        appendTo(sb, "writeMethod", this.writeMethodRef.get());
     }
 
     private boolean isAssignable(Method m1, Method m2) {
--- a/jdk/src/share/classes/java/beans/ThreadGroupContext.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/beans/ThreadGroupContext.java	Thu Sep 26 17:18:12 2013 -0700
@@ -41,24 +41,20 @@
  */
 final class ThreadGroupContext {
 
-    private static final WeakIdentityMap<ThreadGroupContext> contexts = new WeakIdentityMap<>();
+    private static final WeakIdentityMap<ThreadGroupContext> contexts = new WeakIdentityMap<ThreadGroupContext>() {
+        protected ThreadGroupContext create(Object key) {
+            return new ThreadGroupContext();
+        }
+    };
 
     /**
-     * Returns the appropriate {@code AppContext} for the caller,
+     * Returns the appropriate {@code ThreadGroupContext} for the caller,
      * as determined by its {@code ThreadGroup}.
      *
      * @return  the application-dependent context
      */
     static ThreadGroupContext getContext() {
-        ThreadGroup group = Thread.currentThread().getThreadGroup();
-        synchronized (contexts) {
-            ThreadGroupContext context = contexts.get(group);
-            if (context == null) {
-                context = new ThreadGroupContext();
-                contexts.put(group, context);
-            }
-            return context;
-        }
+        return contexts.get(Thread.currentThread().getThreadGroup());
     }
 
     private volatile boolean isDesignTime;
--- a/jdk/src/share/classes/java/beans/WeakIdentityMap.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/java/beans/WeakIdentityMap.java	Thu Sep 26 17:18:12 2013 -0700
@@ -33,18 +33,22 @@
  * and reference-equality in place of object-equality to compare them.
  * An entry will automatically be removed when its key is no longer
  * in ordinary use.  Both null values and the null key are supported.
+ * This class does not require additional synchronization.
+ * A thread-safety is provided by a fragile combination
+ * of synchronized blocks and volatile fields.
+ * Be very careful during editing!
  *
  * @see java.util.IdentityHashMap
  * @see java.util.WeakHashMap
  */
-final class WeakIdentityMap<T> {
+abstract class WeakIdentityMap<T> {
 
     private static final int MAXIMUM_CAPACITY = 1 << 30; // it MUST be a power of two
     private static final Object NULL = new Object(); // special object for null key
 
     private final ReferenceQueue<Object> queue = new ReferenceQueue<Object>();
 
-    private Entry<T>[] table = newTable(1<<3); // table's length MUST be a power of two
+    private volatile Entry<T>[] table = newTable(1<<3); // table's length MUST be a power of two
     private int threshold = 6; // the next size value at which to resize
     private int size = 0; // the number of key-value mappings
 
@@ -54,78 +58,83 @@
             key = NULL;
         }
         int hash = key.hashCode();
-        int index = getIndex(this.table, hash);
-        for (Entry<T> entry = this.table[index]; entry != null; entry = entry.next) {
+        Entry<T>[] table = this.table;
+        // unsynchronized search improves performance
+        // the null value does not mean that there are no needed entry
+        int index = getIndex(table, hash);
+        for (Entry<T> entry = table[index]; entry != null; entry = entry.next) {
             if (entry.isMatched(key, hash)) {
                 return entry.value;
             }
         }
-        return null;
+        synchronized (NULL) {
+            // synchronized search improves stability
+            // we must create and add new value if there are no needed entry
+            index = getIndex(this.table, hash);
+            for (Entry<T> entry = this.table[index]; entry != null; entry = entry.next) {
+                if (entry.isMatched(key, hash)) {
+                    return entry.value;
+                }
+            }
+            T value = create(key);
+            this.table[index] = new Entry<T>(key, hash, value, this.queue, this.table[index]);
+            if (++this.size >= this.threshold) {
+                if (this.table.length == MAXIMUM_CAPACITY) {
+                    this.threshold = Integer.MAX_VALUE;
+                }
+                else {
+                    removeStaleEntries();
+                    table = newTable(this.table.length * 2);
+                    transfer(this.table, table);
+                    // If ignoring null elements and processing ref queue caused massive
+                    // shrinkage, then restore old table.  This should be rare, but avoids
+                    // unbounded expansion of garbage-filled tables.
+                    if (this.size >= this.threshold / 2) {
+                        this.table = table;
+                        this.threshold *= 2;
+                    }
+                    else {
+                        transfer(table, this.table);
+                    }
+                }
+            }
+            return value;
+        }
     }
 
-    public T put(Object key, T value) {
-        removeStaleEntries();
-        if (key == null) {
-            key = NULL;
-        }
-        int hash = key.hashCode();
-        int index = getIndex(this.table, hash);
-        for (Entry<T> entry = this.table[index]; entry != null; entry = entry.next) {
-            if (entry.isMatched(key, hash)) {
-                T oldValue = entry.value;
-                entry.value = value;
-                return oldValue;
-            }
-        }
-        this.table[index] = new Entry<T>(key, hash, value, this.queue, this.table[index]);
-        if (++this.size >= this.threshold) {
-            if (this.table.length == MAXIMUM_CAPACITY) {
-                this.threshold = Integer.MAX_VALUE;
-            }
-            else {
-                removeStaleEntries();
-                Entry<T>[] table = newTable(this.table.length * 2);
-                transfer(this.table, table);
-
-                // If ignoring null elements and processing ref queue caused massive
-                // shrinkage, then restore old table.  This should be rare, but avoids
-                // unbounded expansion of garbage-filled tables.
-                if (this.size >= this.threshold / 2) {
-                    this.table = table;
-                    this.threshold *= 2;
-                }
-                else {
-                    transfer(table, this.table);
-                }
-            }
-        }
-        return null;
-    }
+    protected abstract T create(Object key);
 
     private void removeStaleEntries() {
-        for (Object ref = this.queue.poll(); ref != null; ref = this.queue.poll()) {
-            @SuppressWarnings("unchecked")
-            Entry<T> entry = (Entry<T>) ref;
-            int index = getIndex(this.table, entry.hash);
+        Object ref = this.queue.poll();
+        if (ref != null) {
+            synchronized (NULL) {
+                do {
+                    @SuppressWarnings("unchecked")
+                    Entry<T> entry = (Entry<T>) ref;
+                    int index = getIndex(this.table, entry.hash);
 
-            Entry<T> prev = this.table[index];
-            Entry<T> current = prev;
-            while (current != null) {
-                Entry<T> next = current.next;
-                if (current == entry) {
-                    if (prev == entry) {
-                        this.table[index] = next;
+                    Entry<T> prev = this.table[index];
+                    Entry<T> current = prev;
+                    while (current != null) {
+                        Entry<T> next = current.next;
+                        if (current == entry) {
+                            if (prev == entry) {
+                                this.table[index] = next;
+                            }
+                            else {
+                                prev.next = next;
+                            }
+                            entry.value = null; // Help GC
+                            entry.next = null; // Help GC
+                            this.size--;
+                            break;
+                        }
+                        prev = current;
+                        current = next;
                     }
-                    else {
-                        prev.next = next;
-                    }
-                    entry.value = null; // Help GC
-                    entry.next = null; // Help GC
-                    this.size--;
-                    break;
+                    ref = this.queue.poll();
                 }
-                prev = current;
-                current = next;
+                while (ref != null);
             }
         }
     }
@@ -164,8 +173,8 @@
 
     private static class Entry<T> extends WeakReference<Object> {
         private final int hash;
-        private T value;
-        private Entry<T> next;
+        private volatile T value;
+        private volatile Entry<T> next;
 
         Entry(Object key, int hash, T value, ReferenceQueue<Object> queue, Entry<T> next) {
             super(key, queue);
--- a/jdk/src/share/classes/javax/sound/sampled/AudioFileFormat.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/sound/sampled/AudioFileFormat.java	Thu Sep 26 17:18:12 2013 -0700
@@ -57,7 +57,7 @@
  * be used in implementations:
  *
  * <table border=1>
- *  <caption>Audio File Format Property Keys</caption>
+ *  <caption>Audio File Format Properties</caption>
  *  <tr>
  *   <th>Property key</th>
  *   <th>Value type</th>
--- a/jdk/src/share/classes/javax/sound/sampled/AudioFormat.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/sound/sampled/AudioFormat.java	Thu Sep 26 17:18:12 2013 -0700
@@ -85,7 +85,7 @@
  * service providers should use, if applicable:
  *
  * <table border=0>
- *  <caption>Audio Format Property Keys</caption>
+ *  <caption>Audio Format Properties</caption>
  *  <tr>
  *   <th>Property key</th>
  *   <th>Value type</th>
--- a/jdk/src/share/classes/javax/swing/JButton.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/JButton.java	Thu Sep 26 17:18:12 2013 -0700
@@ -149,7 +149,7 @@
 
 
     /**
-     * Returns a string that specifies the name of the L&F class
+     * Returns a string that specifies the name of the L&amp;F class
      * that renders this component.
      *
      * @return the string "ButtonUI"
@@ -157,7 +157,7 @@
      * @see UIDefaults#getUI
      * @beaninfo
      *        expert: true
-     *   description: A string that specifies the name of the L&F class.
+     *   description: A string that specifies the name of the L&amp;F class.
      */
     public String getUIClassID() {
         return uiClassID;
--- a/jdk/src/share/classes/javax/swing/JCheckBox.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/JCheckBox.java	Thu Sep 26 17:18:12 2013 -0700
@@ -230,7 +230,7 @@
 
 
     /**
-     * Returns a string that specifies the name of the L&F class
+     * Returns a string that specifies the name of the L&amp;F class
      * that renders this component.
      *
      * @return the string "CheckBoxUI"
@@ -238,7 +238,7 @@
      * @see UIDefaults#getUI
      * @beaninfo
      *        expert: true
-     *   description: A string that specifies the name of the L&F class
+     *   description: A string that specifies the name of the L&amp;F class
      */
     public String getUIClassID() {
         return uiClassID;
--- a/jdk/src/share/classes/javax/swing/JCheckBoxMenuItem.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/JCheckBoxMenuItem.java	Thu Sep 26 17:18:12 2013 -0700
@@ -168,7 +168,7 @@
     }
 
     /**
-     * Returns the name of the L&F class
+     * Returns the name of the L&amp;F class
      * that renders this component.
      *
      * @return "CheckBoxMenuItemUI"
--- a/jdk/src/share/classes/javax/swing/JColorChooser.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/JColorChooser.java	Thu Sep 26 17:18:12 2013 -0700
@@ -216,7 +216,7 @@
     }
 
     /**
-     * Returns the L&F object that renders this component.
+     * Returns the L&amp;F object that renders this component.
      *
      * @return the <code>ColorChooserUI</code> object that renders
      *          this component
@@ -226,9 +226,9 @@
     }
 
     /**
-     * Sets the L&F object that renders this component.
+     * Sets the L&amp;F object that renders this component.
      *
-     * @param ui  the <code>ColorChooserUI</code> L&F object
+     * @param ui  the <code>ColorChooserUI</code> L&amp;F object
      * @see UIDefaults#getUI
      *
      * @beaninfo
@@ -241,7 +241,7 @@
     }
 
     /**
-     * Notification from the <code>UIManager</code> that the L&F has changed.
+     * Notification from the <code>UIManager</code> that the L&amp;F has changed.
      * Replaces the current UI object with the latest version from the
      * <code>UIManager</code>.
      *
@@ -252,7 +252,7 @@
     }
 
     /**
-     * Returns the name of the L&F class that renders this component.
+     * Returns the name of the L&amp;F class that renders this component.
      *
      * @return the string "ColorChooserUI"
      * @see JComponent#getUIClassID
--- a/jdk/src/share/classes/javax/swing/JComboBox.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/JComboBox.java	Thu Sep 26 17:18:12 2013 -0700
@@ -242,9 +242,9 @@
     }
 
     /**
-     * Sets the L&F object that renders this component.
+     * Sets the L&amp;F object that renders this component.
      *
-     * @param ui  the <code>ComboBoxUI</code> L&F object
+     * @param ui  the <code>ComboBoxUI</code> L&amp;F object
      * @see UIDefaults#getUI
      *
      * @beaninfo
@@ -273,7 +273,7 @@
 
 
     /**
-     * Returns the name of the L&F class that renders this component.
+     * Returns the name of the L&amp;F class that renders this component.
      *
      * @return the string "ComboBoxUI"
      * @see JComponent#getUIClassID
@@ -285,7 +285,7 @@
 
 
     /**
-     * Returns the L&F object that renders this component.
+     * Returns the L&amp;F object that renders this component.
      *
      * @return the ComboBoxUI object that renders this component
      */
@@ -607,7 +607,7 @@
      *
      * @param anIndex an integer specifying the list item to select,
      *                  where 0 specifies the first item in the list and -1 indicates no selection
-     * @exception IllegalArgumentException if <code>anIndex</code> < -1 or
+     * @exception IllegalArgumentException if <code>anIndex</code> &lt; -1 or
      *                  <code>anIndex</code> is greater than or equal to size
      * @beaninfo
      *   preferred: true
--- a/jdk/src/share/classes/javax/swing/JComponent.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/JComponent.java	Thu Sep 26 17:18:12 2013 -0700
@@ -86,7 +86,7 @@
  * <ul>
  * <li>The base class for both standard and custom components
  *     that use the Swing architecture.
- * <li>A "pluggable look and feel" (L&F) that can be specified by the
+ * <li>A "pluggable look and feel" (L&amp;F) that can be specified by the
  *     programmer or (optionally) selected by the user at runtime.
  *     The look and feel for each component is provided by a
  *     <em>UI delegate</em> -- an object that descends from
@@ -4523,7 +4523,7 @@
      * @param propertyName  the name of the property that was listened on
      * @param oldValue  the old value of the property
      * @param newValue  the new value of the property
-     * @exception PropertyVetoException when the attempt to set the
+     * @exception java.beans.PropertyVetoException when the attempt to set the
      *          property is vetoed by the component
      */
     protected void fireVetoableChange(String propertyName, Object oldValue, Object newValue)
--- a/jdk/src/share/classes/javax/swing/JDesktopPane.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/JDesktopPane.java	Thu Sep 26 17:18:12 2013 -0700
@@ -50,13 +50,13 @@
  * <code>JLayeredPane</code> to manage the potentially overlapping internal
  * frames. It also maintains a reference to an instance of
  * <code>DesktopManager</code> that is set by the UI
- * class for the current look and feel (L&F).  Note that <code>JDesktopPane</code>
+ * class for the current look and feel (L&amp;F).  Note that <code>JDesktopPane</code>
  * does not support borders.
  * <p>
  * This class is normally used as the parent of <code>JInternalFrames</code>
  * to provide a pluggable <code>DesktopManager</code> object to the
  * <code>JInternalFrames</code>. The <code>installUI</code> of the
- * L&F specific implementation is responsible for setting the
+ * L&amp;F specific implementation is responsible for setting the
  * <code>desktopManager</code> variable appropriately.
  * When the parent of a <code>JInternalFrame</code> is a <code>JDesktopPane</code>,
  * it should delegate most of its behavior to the <code>desktopManager</code>
@@ -146,7 +146,7 @@
     }
 
     /**
-     * Returns the L&F object that renders this component.
+     * Returns the L&amp;F object that renders this component.
      *
      * @return the <code>DesktopPaneUI</code> object that
      *   renders this component
@@ -156,9 +156,9 @@
     }
 
     /**
-     * Sets the L&F object that renders this component.
+     * Sets the L&amp;F object that renders this component.
      *
-     * @param ui  the DesktopPaneUI L&F object
+     * @param ui  the DesktopPaneUI L&amp;F object
      * @see UIDefaults#getUI
      * @beaninfo
      *        bound: true
@@ -232,7 +232,7 @@
     }
 
     /**
-     * Notification from the <code>UIManager</code> that the L&F has changed.
+     * Notification from the <code>UIManager</code> that the L&amp;F has changed.
      * Replaces the current UI object with the latest version from the
      * <code>UIManager</code>.
      *
@@ -244,7 +244,7 @@
 
 
     /**
-     * Returns the name of the L&F class that renders this component.
+     * Returns the name of the L&amp;F class that renders this component.
      *
      * @return the string "DesktopPaneUI"
      * @see JComponent#getUIClassID
--- a/jdk/src/share/classes/javax/swing/JFileChooser.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/JFileChooser.java	Thu Sep 26 17:18:12 2013 -0700
@@ -362,6 +362,7 @@
      */
     protected void setup(FileSystemView view) {
         installShowFilesListener();
+        installHierarchyListener();
 
         if(view == null) {
             view = FileSystemView.getFileSystemView();
@@ -374,6 +375,22 @@
         enableEvents(AWTEvent.MOUSE_EVENT_MASK);
     }
 
+    private void installHierarchyListener() {
+        addHierarchyListener(new HierarchyListener() {
+            @Override
+            public void hierarchyChanged(HierarchyEvent e) {
+                if ((e.getChangeFlags() & HierarchyEvent.PARENT_CHANGED)
+                        == HierarchyEvent.PARENT_CHANGED) {
+                    JFileChooser fc = JFileChooser.this;
+                    JRootPane rootPane = SwingUtilities.getRootPane(fc);
+                    if (rootPane != null) {
+                        rootPane.setDefaultButton(fc.getUI().getDefaultButton(fc));
+                    }
+                }
+            }
+        });
+    }
+
     private void installShowFilesListener() {
         // Track native setting for showing hidden files
         Toolkit tk = Toolkit.getDefaultToolkit();
@@ -801,7 +818,6 @@
                 dialog.getRootPane().setWindowDecorationStyle(JRootPane.FILE_CHOOSER_DIALOG);
             }
         }
-        dialog.getRootPane().setDefaultButton(ui.getDefaultButton(this));
         dialog.pack();
         dialog.setLocationRelativeTo(parent);
 
--- a/jdk/src/share/classes/javax/swing/JLayer.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/JLayer.java	Thu Sep 26 17:18:12 2013 -0700
@@ -44,16 +44,16 @@
  * {@code JLayer} is a universal decorator for Swing components
  * which enables you to implement various advanced painting effects as well as
  * receive notifications of all {@code AWTEvent}s generated within its borders.
- * <p/>
+ * <p>
  * {@code JLayer} delegates the handling of painting and input events to a
  * {@link javax.swing.plaf.LayerUI} object, which performs the actual decoration.
- * <p/>
+ * <p>
  * The custom painting implemented in the {@code LayerUI} and events notification
  * work for the JLayer itself and all its subcomponents.
  * This combination enables you to enrich existing components
  * by adding new advanced functionality such as temporary locking of a hierarchy,
  * data tips for compound components, enhanced mouse scrolling etc and so on.
- * <p/>
+ * <p>
  * {@code JLayer} is a good solution if you only need to do custom painting
  * over compound component or catch input events from its subcomponents.
  * <pre>
@@ -202,7 +202,7 @@
 
     /**
      * Returns the {@code JLayer}'s view component or {@code null}.
-     * <br/>This is a bound property.
+     * <br>This is a bound property.
      *
      * @return the {@code JLayer}'s view component
      *         or {@code null} if none exists
@@ -215,7 +215,7 @@
 
     /**
      * Sets the {@code JLayer}'s view component, which can be {@code null}.
-     * <br/>This is a bound property.
+     * <br>This is a bound property.
      *
      * @param view the view component for this {@code JLayer}
      *
@@ -257,7 +257,7 @@
 
     /**
      * Returns the {@code JLayer}'s glassPane component or {@code null}.
-     * <br/>This is a bound property.
+     * <br>This is a bound property.
      *
      * @return the {@code JLayer}'s glassPane component
      *         or {@code null} if none exists
@@ -270,7 +270,7 @@
 
     /**
      * Sets the {@code JLayer}'s glassPane component, which can be {@code null}.
-     * <br/>This is a bound property.
+     * <br>This is a bound property.
      *
      * @param glassPane the glassPane component of this {@code JLayer}
      *
@@ -309,7 +309,7 @@
     /**
      * Sets the layout manager for this container.  This method is
      * overridden to prevent the layout manager from being set.
-     * <p/>Note:  If {@code mgr} is non-{@code null}, this
+     * <p>Note:  If {@code mgr} is non-{@code null}, this
      * method will throw an exception as layout managers are not supported on
      * a {@code JLayer}.
      *
@@ -327,7 +327,7 @@
      * of this component from becoming complex enough to inhibit
      * subclassing of {@code LayerUI} class.  To create a {@code JLayer} with a border,
      * add it to a {@code JPanel} that has a border.
-     * <p/>Note:  If {@code border} is non-{@code null}, this
+     * <p>Note:  If {@code border} is non-{@code null}, this
      * method will throw an exception as borders are not supported on
      * a {@code JLayer}.
      *
@@ -471,11 +471,11 @@
      * defined by the specified event mask parameter
      * to be delivered to the
      * {@link LayerUI#eventDispatched(AWTEvent, JLayer)} method.
-     * <p/>
+     * <p>
      * Events are delivered provided that {@code LayerUI} is set
      * for this {@code JLayer} and the {@code JLayer}
      * is displayable.
-     * <p/>
+     * <p>
      * The following example shows how to correctly use this method
      * in the {@code LayerUI} implementations:
      * <pre>
@@ -519,10 +519,10 @@
     /**
      * Returns the bitmap of event mask to receive by this {@code JLayer}
      * and its {@code LayerUI}.
-     * <p/>
+     * <p>
      * It means that {@link javax.swing.plaf.LayerUI#eventDispatched(AWTEvent, JLayer)} method
      * will only receive events that match the event mask.
-     * <p/>
+     * <p>
      * By default {@code JLayer} receives no events.
      *
      * @return the bitmask of event types to receive for this {@code JLayer}
@@ -543,7 +543,7 @@
 
     /**
      * Returns the preferred size of the viewport for a view component.
-     * <p/>
+     * <p>
      * If the view component of this layer implements {@link Scrollable}, this method delegates its
      * implementation to the view component.
      *
@@ -562,7 +562,7 @@
      * Returns a scroll increment, which is required for components
      * that display logical rows or columns in order to completely expose
      * one block of rows or columns, depending on the value of orientation.
-     * <p/>
+     * <p>
      * If the view component of this layer implements {@link Scrollable}, this method delegates its
      * implementation to the view component.
      *
@@ -584,7 +584,7 @@
      * Returns {@code false} to indicate that the height of the viewport does not
      * determine the height of the layer, unless the preferred height
      * of the layer is smaller than the height of the viewport.
-     * <p/>
+     * <p>
      * If the view component of this layer implements {@link Scrollable}, this method delegates its
      * implementation to the view component.
      *
@@ -603,7 +603,7 @@
      * Returns {@code false} to indicate that the width of the viewport does not
      * determine the width of the layer, unless the preferred width
      * of the layer is smaller than the width of the viewport.
-     * <p/>
+     * <p>
      * If the view component of this layer implements {@link Scrollable}, this method delegates its
      * implementation to the view component.
      *
@@ -624,10 +624,10 @@
      * one new row or column, depending on the value of orientation.
      * Ideally, components should handle a partially exposed row or column
      * by returning the distance required to completely expose the item.
-     * <p/>
+     * <p>
      * Scrolling containers, like {@code JScrollPane}, will use this method
      * each time the user requests a unit scroll.
-     * <p/>
+     * <p>
      * If the view component of this layer implements {@link Scrollable}, this method delegates its
      * implementation to the view component.
      *
--- a/jdk/src/share/classes/javax/swing/JMenuItem.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/JMenuItem.java	Thu Sep 26 17:18:12 2013 -0700
@@ -229,7 +229,7 @@
     /**
      * Sets the look and feel object that renders this component.
      *
-     * @param ui  the <code>JMenuItemUI</code> L&F object
+     * @param ui  the <code>JMenuItemUI</code> L&amp;F object
      * @see UIDefaults#getUI
      * @beaninfo
      *        bound: true
@@ -252,7 +252,7 @@
 
 
     /**
-     * Returns the suffix used to construct the name of the L&F class used to
+     * Returns the suffix used to construct the name of the L&amp;F class used to
      * render this component.
      *
      * @return the string "MenuItemUI"
--- a/jdk/src/share/classes/javax/swing/JPanel.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/JPanel.java	Thu Sep 26 17:18:12 2013 -0700
@@ -127,7 +127,7 @@
     }
 
     /**
-     * Returns the look and feel (L&F) object that renders this component.
+     * Returns the look and feel (L&amp;amp;F) object that renders this component.
      *
      * @return the PanelUI object that renders this component
      * @since 1.4
@@ -138,9 +138,9 @@
 
 
     /**
-     * Sets the look and feel (L&F) object that renders this component.
+     * Sets the look and feel (L&amp;F) object that renders this component.
      *
-     * @param ui  the PanelUI L&F object
+     * @param ui  the PanelUI L&amp;F object
      * @see UIDefaults#getUI
      * @since 1.4
      * @beaninfo
@@ -154,7 +154,7 @@
     }
 
     /**
-     * Returns a string that specifies the name of the L&F class
+     * Returns a string that specifies the name of the L&amp;F class
      * that renders this component.
      *
      * @return "PanelUI"
@@ -162,7 +162,7 @@
      * @see UIDefaults#getUI
      * @beaninfo
      *        expert: true
-     *   description: A string that specifies the name of the L&F class.
+     *   description: A string that specifies the name of the L&amp;F class.
      */
     public String getUIClassID() {
         return uiClassID;
--- a/jdk/src/share/classes/javax/swing/JPasswordField.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/JPasswordField.java	Thu Sep 26 17:18:12 2013 -0700
@@ -101,7 +101,7 @@
      * number of columns.  A default model is created, and the initial string
      * is set to <code>null</code>.
      *
-     * @param columns the number of columns >= 0
+     * @param columns the number of columns &gt;= 0
      */
     public JPasswordField(int columns) {
         this(null, null, columns);
@@ -113,7 +113,7 @@
      * the default.
      *
      * @param text the text to be displayed, <code>null</code> if none
-     * @param columns the number of columns >= 0
+     * @param columns the number of columns &gt;= 0
      */
     public JPasswordField(String text, int columns) {
         this(null, text, columns);
@@ -130,7 +130,7 @@
      * @param doc  the text storage to use
      * @param txt the text to be displayed, <code>null</code> if none
      * @param columns  the number of columns to use to calculate
-     *   the preferred width >= 0; if columns is set to zero, the
+     *   the preferred width &gt;= 0; if columns is set to zero, the
      *   preferred width will be whatever naturally results from
      *   the component implementation
      */
@@ -143,7 +143,7 @@
     }
 
     /**
-     * Returns the name of the L&F class that renders this component.
+     * Returns the name of the L&amp;F class that renders this component.
      *
      * @return the string "PasswordFieldUI"
      * @see JComponent#getUIClassID
@@ -271,8 +271,8 @@
      * <code>getPassword</code> method instead.
      * @deprecated As of Java 2 platform v1.2,
      * replaced by <code>getPassword</code>.
-     * @param offs the offset >= 0
-     * @param len the length >= 0
+     * @param offs the offset &gt;= 0
+     * @param len the length &gt;= 0
      * @return the text
      * @exception BadLocationException if the offset or length are invalid
      */
--- a/jdk/src/share/classes/javax/swing/JPopupMenu.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/JPopupMenu.java	Thu Sep 26 17:18:12 2013 -0700
@@ -196,7 +196,7 @@
 
 
     /**
-     * Returns the look and feel (L&F) object that renders this component.
+     * Returns the look and feel (L&amp;F) object that renders this component.
      *
      * @return the <code>PopupMenuUI</code> object that renders this component
      */
@@ -205,9 +205,9 @@
     }
 
     /**
-     * Sets the L&F object that renders this component.
+     * Sets the L&amp;F object that renders this component.
      *
-     * @param ui the new <code>PopupMenuUI</code> L&F object
+     * @param ui the new <code>PopupMenuUI</code> L&amp;F object
      * @see UIDefaults#getUI
      * @beaninfo
      *        bound: true
@@ -230,7 +230,7 @@
 
 
     /**
-     * Returns the name of the L&F class that renders this component.
+     * Returns the name of the L&amp;F class that renders this component.
      *
      * @return the string "PopupMenuUI"
      * @see JComponent#getUIClassID
@@ -461,7 +461,7 @@
      *
      * @param       pos the position of the item to be removed
      * @exception   IllegalArgumentException if the value of
-     *                          <code>pos</code> < 0, or if the value of
+     *                          <code>pos</code> &lt; 0, or if the value of
      *                          <code>pos</code> is greater than the
      *                          number of items
      */
@@ -560,7 +560,7 @@
      * @param a  the <code>Action</code> object to insert
      * @param index      specifies the position at which to insert the
      *                   <code>Action</code>, where 0 is the first
-     * @exception IllegalArgumentException if <code>index</code> < 0
+     * @exception IllegalArgumentException if <code>index</code> &lt; 0
      * @see Action
      */
     public void insert(Action a, int index) {
@@ -576,7 +576,7 @@
      * @param component  the <code>Component</code> to insert
      * @param index      specifies the position at which
      *                   to insert the component, where 0 is the first
-     * @exception IllegalArgumentException if <code>index</code> < 0
+     * @exception IllegalArgumentException if <code>index</code> &lt; 0
      */
     public void insert(Component component, int index) {
         if (index < 0) {
@@ -1535,7 +1535,7 @@
         }
 
         /**
-         * Returns the name of the L&F class that renders this component.
+         * Returns the name of the L&amp;F class that renders this component.
          *
          * @return the string "PopupMenuSeparatorUI"
          * @see JComponent#getUIClassID
--- a/jdk/src/share/classes/javax/swing/JRadioButton.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/JRadioButton.java	Thu Sep 26 17:18:12 2013 -0700
@@ -193,7 +193,7 @@
 
 
     /**
-     * Returns the name of the L&F class
+     * Returns the name of the L&amp;F class
      * that renders this component.
      *
      * @return String "RadioButtonUI"
@@ -201,7 +201,7 @@
      * @see UIDefaults#getUI
      * @beaninfo
      *        expert: true
-     *   description: A string that specifies the name of the L&F class.
+     *   description: A string that specifies the name of the L&amp;F class.
      */
     public String getUIClassID() {
         return uiClassID;
--- a/jdk/src/share/classes/javax/swing/JRadioButtonMenuItem.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/JRadioButtonMenuItem.java	Thu Sep 26 17:18:12 2013 -0700
@@ -181,7 +181,7 @@
     }
 
     /**
-     * Returns the name of the L&F class that renders this component.
+     * Returns the name of the L&amp;F class that renders this component.
      *
      * @return the string "RadioButtonMenuItemUI"
      * @see JComponent#getUIClassID
--- a/jdk/src/share/classes/javax/swing/JRootPane.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/JRootPane.java	Thu Sep 26 17:18:12 2013 -0700
@@ -448,7 +448,7 @@
     }
 
     /**
-     * Returns the L&F object that renders this component.
+     * Returns the L&amp;F object that renders this component.
      *
      * @return <code>LabelUI</code> object
      * @since 1.3
@@ -458,9 +458,9 @@
     }
 
     /**
-     * Sets the L&F object that renders this component.
+     * Sets the L&amp;F object that renders this component.
      *
-     * @param ui  the <code>LabelUI</code> L&F object
+     * @param ui  the <code>LabelUI</code> L&amp;F object
      * @see UIDefaults#getUI
      * @beaninfo
      *        bound: true
@@ -486,7 +486,7 @@
 
 
     /**
-     * Returns a string that specifies the name of the L&F class
+     * Returns a string that specifies the name of the L&amp;F class
      * that renders this component.
      *
      * @return the string "RootPaneUI"
--- a/jdk/src/share/classes/javax/swing/JScrollBar.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/JScrollBar.java	Thu Sep 26 17:18:12 2013 -0700
@@ -344,6 +344,9 @@
      * that override this method and delegate to the viewports
      * Scrollable view, if it has one.  The Scrollable interface
      * provides a more specialized version of this method.
+     * <p>
+     * Some look and feels implement custom scrolling behavior
+     * and ignore this property.
      *
      * @param direction is -1 or 1 for up/down respectively
      * @return the value of the unitIncrement property
@@ -361,6 +364,10 @@
      * <p>
      * Note, that if the argument is equal to the value of Integer.MIN_VALUE,
      * the most look and feels will not provide the scrolling to the right/down.
+     * <p>
+     * Some look and feels implement custom scrolling behavior
+     * and ignore this property.
+     *
      * @see #getUnitIncrement
      * @beaninfo
      *   preferred: true
@@ -387,6 +394,9 @@
      * that override this method and delegate to the viewports
      * Scrollable view, if it has one.  The Scrollable interface
      * provides a more specialized version of this method.
+     * <p>
+     * Some look and feels implement custom scrolling behavior
+     * and ignore this property.
      *
      * @param direction is -1 or 1 for up/down respectively
      * @return the value of the blockIncrement property
@@ -404,6 +414,10 @@
      * <p>
      * Note, that if the argument is equal to the value of Integer.MIN_VALUE,
      * the most look and feels will not provide the scrolling to the right/down.
+     * <p>
+     * Some look and feels implement custom scrolling behavior
+     * and ignore this property.
+     *
      * @see #getBlockIncrement()
      * @beaninfo
      *   preferred: true
--- a/jdk/src/share/classes/javax/swing/JScrollPane.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/JScrollPane.java	Thu Sep 26 17:18:12 2013 -0700
@@ -353,7 +353,7 @@
 
 
     /**
-     * Returns the look and feel (L&F) object that renders this component.
+     * Returns the look and feel (L&amp;F) object that renders this component.
      *
      * @return the <code>ScrollPaneUI</code> object that renders this
      *                          component
@@ -371,9 +371,9 @@
 
     /**
      * Sets the <code>ScrollPaneUI</code> object that provides the
-     * look and feel (L&F) for this component.
+     * look and feel (L&amp;F) for this component.
      *
-     * @param ui the <code>ScrollPaneUI</code> L&F object
+     * @param ui the <code>ScrollPaneUI</code> L&amp;F object
      * @see #getUI
      */
     public void setUI(ScrollPaneUI ui) {
@@ -395,7 +395,7 @@
 
 
     /**
-     * Returns the suffix used to construct the name of the L&F class used to
+     * Returns the suffix used to construct the name of the L&amp;F class used to
      * render this component.
      *
      * @return the string "ScrollPaneUI"
--- a/jdk/src/share/classes/javax/swing/JSeparator.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/JSeparator.java	Thu Sep 26 17:18:12 2013 -0700
@@ -108,7 +108,7 @@
     }
 
     /**
-     * Returns the L&F object that renders this component.
+     * Returns the L&amp;F object that renders this component.
      *
      * @return the SeparatorUI object that renders this component
      */
@@ -117,9 +117,9 @@
     }
 
     /**
-     * Sets the L&F object that renders this component.
+     * Sets the L&amp;F object that renders this component.
      *
-     * @param ui  the SeparatorUI L&F object
+     * @param ui  the SeparatorUI L&amp;F object
      * @see UIDefaults#getUI
      * @beaninfo
      *        bound: true
@@ -142,7 +142,7 @@
 
 
     /**
-     * Returns the name of the L&F class that renders this component.
+     * Returns the name of the L&amp;F class that renders this component.
      *
      * @return the string "SeparatorUI"
      * @see JComponent#getUIClassID
--- a/jdk/src/share/classes/javax/swing/JSlider.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/JSlider.java	Thu Sep 26 17:18:12 2013 -0700
@@ -289,9 +289,9 @@
 
 
     /**
-     * Gets the UI object which implements the L&F for this component.
+     * Gets the UI object which implements the L&amp;F for this component.
      *
-     * @return the SliderUI object that implements the Slider L&F
+     * @return the SliderUI object that implements the Slider L&amp;F
      */
     public SliderUI getUI() {
         return(SliderUI)ui;
@@ -299,9 +299,9 @@
 
 
     /**
-     * Sets the UI object which implements the L&F for this component.
+     * Sets the UI object which implements the L&amp;F for this component.
      *
-     * @param ui the SliderUI L&F object
+     * @param ui the SliderUI L&amp;F object
      * @see UIDefaults#getUI
      * @beaninfo
      *        bound: true
@@ -330,7 +330,7 @@
 
 
     /**
-     * Returns the name of the L&F class that renders this component.
+     * Returns the name of the L&amp;F class that renders this component.
      *
      * @return "SliderUI"
      * @see JComponent#getUIClassID
--- a/jdk/src/share/classes/javax/swing/JSpinner.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/JSpinner.java	Thu Sep 26 17:18:12 2013 -0700
@@ -171,7 +171,7 @@
 
 
     /**
-     * Returns the look and feel (L&F) object that renders this component.
+     * Returns the look and feel (L&amp;F) object that renders this component.
      *
      * @return the <code>SpinnerUI</code> object that renders this component
      */
@@ -181,9 +181,9 @@
 
 
     /**
-     * Sets the look and feel (L&F) object that renders this component.
+     * Sets the look and feel (L&amp;F) object that renders this component.
      *
-     * @param ui  the <code>SpinnerUI</code> L&F object
+     * @param ui  the <code>SpinnerUI</code> L&amp;F object
      * @see UIDefaults#getUI
      */
     public void setUI(SpinnerUI ui) {
@@ -193,7 +193,7 @@
 
     /**
      * Returns the suffix used to construct the name of the look and feel
-     * (L&F) class used to render this component.
+     * (L&amp;F) class used to render this component.
      *
      * @return the string "SpinnerUI"
      * @see JComponent#getUIClassID
--- a/jdk/src/share/classes/javax/swing/JSplitPane.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/JSplitPane.java	Thu Sep 26 17:18:12 2013 -0700
@@ -359,9 +359,9 @@
 
 
     /**
-     * Sets the L&F object that renders this component.
+     * Sets the L&amp;F object that renders this component.
      *
-     * @param ui  the <code>SplitPaneUI</code> L&F object
+     * @param ui  the <code>SplitPaneUI</code> L&amp;F object
      * @see UIDefaults#getUI
      * @beaninfo
      *        bound: true
@@ -384,7 +384,7 @@
      * @return the <code>SplitPaneUI</code> object that renders this component
      * @beaninfo
      *       expert: true
-     *  description: The L&F object that renders this component.
+     *  description: The L&amp;F object that renders this component.
      */
     public SplitPaneUI getUI() {
         return (SplitPaneUI)ui;
@@ -392,7 +392,7 @@
 
 
     /**
-     * Notification from the <code>UIManager</code> that the L&F has changed.
+     * Notification from the <code>UIManager</code> that the L&amp;F has changed.
      * Replaces the current UI object with the latest version from the
      * <code>UIManager</code>.
      *
@@ -405,14 +405,14 @@
 
 
     /**
-     * Returns the name of the L&F class that renders this component.
+     * Returns the name of the L&amp;F class that renders this component.
      *
      * @return the string "SplitPaneUI"
      * @see JComponent#getUIClassID
      * @see UIDefaults#getUI
      * @beaninfo
      *       expert: true
-     *  description: A string that specifies the name of the L&F class.
+     *  description: A string that specifies the name of the L&amp;F class.
      */
     public String getUIClassID() {
         return uiClassID;
@@ -714,7 +714,7 @@
      * extra space.
      *
      * @param value as described above
-     * @exception IllegalArgumentException if <code>value</code> is < 0 or > 1
+     * @exception IllegalArgumentException if <code>value</code> is &lt; 0 or &gt; 1
      * @since 1.3
      * @beaninfo
      *        bound: true
@@ -769,8 +769,8 @@
      * @param proportionalLocation  a double-precision floating point value
      *        that specifies a percentage, from zero (top/left) to 1.0
      *        (bottom/right)
-     * @exception IllegalArgumentException if the specified location is < 0
-     *            or > 1.0
+     * @exception IllegalArgumentException if the specified location is &lt; 0
+     *            or &gt; 1.0
      * @beaninfo
      *  description: The location of the divider.
      */
@@ -845,7 +845,7 @@
      *          location (typically a pixel count); or -1 if the UI is
      *          <code>null</code>
      * @beaninfo
-     *  description: The minimum location of the divider from the L&F.
+     *  description: The minimum location of the divider from the L&amp;F.
      */
     public int getMinimumDividerLocation() {
         SplitPaneUI         ui = getUI();
--- a/jdk/src/share/classes/javax/swing/JTable.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/JTable.java	Thu Sep 26 17:18:12 2013 -0700
@@ -1945,7 +1945,7 @@
      * Sets the table's selection mode to allow only single selections, a single
      * contiguous interval, or multiple intervals.
      * <P>
-     * <bold>Note:</bold>
+     * <b>Note:</b>
      * <code>JTable</code> provides all the methods for handling
      * column and row selection.  When setting states,
      * such as <code>setSelectionMode</code>, it not only
@@ -2061,7 +2061,7 @@
 
     /**
      * Returns true if both row and column selection models are enabled.
-     * Equivalent to <code>getRowSelectionAllowed() &&
+     * Equivalent to <code>getRowSelectionAllowed() &amp;&amp;
      * getColumnSelectionAllowed()</code>.
      *
      * @return true if both row and column selection models are enabled
@@ -3034,7 +3034,7 @@
      * adjusted.
      * </ul>
      * <p>
-     * <bold>Note:</bold> When a <code>JTable</code> makes adjustments
+     * <b>Note:</b> When a <code>JTable</code> makes adjustments
      *   to the widths of the columns it respects their minimum and
      *   maximum values absolutely.  It is therefore possible that,
      *   even after this method is called, the total width of the columns
@@ -3086,14 +3086,14 @@
      * </pre>
      * where each individual delta[i] is calculated according to:
      * <p>
-     * If (DELTA < 0) we are in shrink mode where:
+     * If (DELTA &lt; 0) we are in shrink mode where:
      * <p>
      * <PRE>
      *                        DELTA
      *          delta[i] = ------------ * (pref[i] - min[i])
      *                     (PREF - MIN)
      * </PRE>
-     * If (DELTA > 0) we are in expand mode where:
+     * If (DELTA &gt; 0) we are in expand mode where:
      * <p>
      * <PRE>
      *                        DELTA
@@ -3368,7 +3368,7 @@
      * method in order to allow the renderer's tips to be used
      * if it has text set.
      * <p>
-     * <bold>Note:</bold> For <code>JTable</code> to properly display
+     * <b>Note:</b> For <code>JTable</code> to properly display
      * tooltips of its renderers
      * <code>JTable</code> must be a registered component with the
      * <code>ToolTipManager</code>.
@@ -3580,7 +3580,7 @@
 //
 
     /**
-     * Returns the L&F object that renders this component.
+     * Returns the L&amp;F object that renders this component.
      *
      * @return the <code>TableUI</code> object that renders this component
      */
@@ -3589,9 +3589,9 @@
     }
 
     /**
-     * Sets the L&F object that renders this component and repaints.
-     *
-     * @param ui  the TableUI L&F object
+     * Sets the L&amp;F object that renders this component and repaints.
+     *
+     * @param ui  the TableUI L&amp;F object
      * @see UIDefaults#getUI
      * @beaninfo
      *        bound: true
@@ -3607,7 +3607,7 @@
     }
 
     /**
-     * Notification from the <code>UIManager</code> that the L&F has changed.
+     * Notification from the <code>UIManager</code> that the L&amp;F has changed.
      * Replaces the current UI object with the latest version from the
      * <code>UIManager</code>.
      *
@@ -3647,7 +3647,7 @@
     }
 
     /**
-     * Returns the suffix used to construct the name of the L&F class used to
+     * Returns the suffix used to construct the name of the L&amp;F class used to
      * render this component.
      *
      * @return the string "TableUI"
--- a/jdk/src/share/classes/javax/swing/JTextArea.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/JTextArea.java	Thu Sep 26 17:18:12 2013 -0700
@@ -155,8 +155,8 @@
      * rows and columns.  A default model is created, and the initial
      * string is null.
      *
-     * @param rows the number of rows >= 0
-     * @param columns the number of columns >= 0
+     * @param rows the number of rows &gt;= 0
+     * @param columns the number of columns &gt;= 0
      * @exception IllegalArgumentException if the rows or columns
      *  arguments are negative.
      */
@@ -169,8 +169,8 @@
      * of rows and columns.  A default model is created.
      *
      * @param text the text to be displayed, or null
-     * @param rows the number of rows >= 0
-     * @param columns the number of columns >= 0
+     * @param rows the number of rows &gt;= 0
+     * @param columns the number of columns &gt;= 0
      * @exception IllegalArgumentException if the rows or columns
      *  arguments are negative.
      */
@@ -195,8 +195,8 @@
      *
      * @param doc the model to use, or create a default one if null
      * @param text the text to be displayed, null if none
-     * @param rows the number of rows >= 0
-     * @param columns the number of columns >= 0
+     * @param rows the number of rows &gt;= 0
+     * @param columns the number of columns &gt;= 0
      * @exception IllegalArgumentException if the rows or columns
      *  arguments are negative.
      */
@@ -364,8 +364,8 @@
      * Translates an offset into the components text to a
      * line number.
      *
-     * @param offset the offset >= 0
-     * @return the line number >= 0
+     * @param offset the offset &gt;= 0
+     * @return the line number &gt;= 0
      * @exception BadLocationException thrown if the offset is
      *   less than zero or greater than the document length.
      */
@@ -384,7 +384,7 @@
     /**
      * Determines the number of lines contained in the area.
      *
-     * @return the number of lines > 0
+     * @return the number of lines &gt; 0
      */
     public int getLineCount() {
         Element map = getDocument().getDefaultRootElement();
@@ -394,8 +394,8 @@
     /**
      * Determines the offset of the start of the given line.
      *
-     * @param line  the line number to translate >= 0
-     * @return the offset >= 0
+     * @param line  the line number to translate &gt;= 0
+     * @return the offset &gt;= 0
      * @exception BadLocationException thrown if the line is
      * less than zero or greater or equal to the number of
      * lines contained in the document (as reported by
@@ -417,8 +417,8 @@
     /**
      * Determines the offset of the end of the given line.
      *
-     * @param line  the line >= 0
-     * @return the offset >= 0
+     * @param line  the line &gt;= 0
+     * @return the offset &gt;= 0
      * @exception BadLocationException Thrown if the line is
      * less than zero or greater or equal to the number of
      * lines contained in the document (as reported by
@@ -446,7 +446,7 @@
      * if the model is null or if the text is null or empty.
      *
      * @param str the text to insert
-     * @param pos the position at which to insert >= 0
+     * @param pos the position at which to insert &gt;= 0
      * @exception IllegalArgumentException  if pos is an
      *  invalid position in the model
      * @see TextComponent#setText
@@ -486,8 +486,8 @@
      * does a delete if the new string is null or empty.
      *
      * @param str the text to use as the replacement
-     * @param start the start position >= 0
-     * @param end the end position >= start
+     * @param start the start position &gt;= 0
+     * @param end the end position &gt;= start
      * @exception IllegalArgumentException  if part of the range is an
      *  invalid position in the model
      * @see #insert
@@ -517,7 +517,7 @@
     /**
      * Returns the number of rows in the TextArea.
      *
-     * @return the number of rows >= 0
+     * @return the number of rows &gt;= 0
      */
     public int getRows() {
         return rows;
@@ -527,7 +527,7 @@
      * Sets the number of rows for this TextArea.  Calls invalidate() after
      * setting the new value.
      *
-     * @param rows the number of rows >= 0
+     * @param rows the number of rows &gt;= 0
      * @exception IllegalArgumentException if rows is less than 0
      * @see #getRows
      * @beaninfo
@@ -548,7 +548,7 @@
      * Defines the meaning of the height of a row.  This defaults to
      * the height of the font.
      *
-     * @return the height >= 1
+     * @return the height &gt;= 1
      */
     protected int getRowHeight() {
         if (rowHeight == 0) {
@@ -561,7 +561,7 @@
     /**
      * Returns the number of columns in the TextArea.
      *
-     * @return number of columns >= 0
+     * @return number of columns &gt;= 0
      */
     public int getColumns() {
         return columns;
@@ -571,7 +571,7 @@
      * Sets the number of columns for this TextArea.  Does an invalidate()
      * after setting the new value.
      *
-     * @param columns the number of columns >= 0
+     * @param columns the number of columns &gt;= 0
      * @exception IllegalArgumentException if columns is less than 0
      * @see #getColumns
      * @beaninfo
@@ -596,7 +596,7 @@
      * character <em>m</em> for the font used.  This method can be
      * redefined to be some alternative amount.
      *
-     * @return the column width >= 1
+     * @return the column width &gt;= 1
      */
     protected int getColumnWidth() {
         if (columnWidth == 0) {
--- a/jdk/src/share/classes/javax/swing/JTextField.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/JTextField.java	Thu Sep 26 17:18:12 2013 -0700
@@ -128,7 +128,7 @@
 &nbsp;                return;
 &nbsp;            }
 &nbsp;            char[] upper = str.toCharArray();
-&nbsp;            for (int i = 0; i < upper.length; i++) {
+&nbsp;            for (int i = 0; i &lt; upper.length; i++) {
 &nbsp;                upper[i] = Character.toUpperCase(upper[i]);
 &nbsp;            }
 &nbsp;            super.insertString(offs, new String(upper), a);
@@ -223,10 +223,10 @@
      *          <code>createDefaultModel</code> method
      * @param text  the initial string to display, or <code>null</code>
      * @param columns  the number of columns to use to calculate
-     *   the preferred width >= 0; if <code>columns</code>
+     *   the preferred width &gt;= 0; if <code>columns</code>
      *   is set to zero, the preferred width will be whatever
      *   naturally results from the component implementation
-     * @exception IllegalArgumentException if <code>columns</code> < 0
+     * @exception IllegalArgumentException if <code>columns</code> &lt; 0
      */
     public JTextField(Document doc, String text, int columns) {
         if (columns < 0) {
--- a/jdk/src/share/classes/javax/swing/JToggleButton.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/JToggleButton.java	Thu Sep 26 17:18:12 2013 -0700
@@ -186,14 +186,14 @@
     }
 
     /**
-     * Returns a string that specifies the name of the l&f class
+     * Returns a string that specifies the name of the l&amp;f class
      * that renders this component.
      *
      * @return String "ToggleButtonUI"
      * @see JComponent#getUIClassID
      * @see UIDefaults#getUI
      * @beaninfo
-     *  description: A string that specifies the name of the L&F class
+     *  description: A string that specifies the name of the L&amp;F class
      */
     public String getUIClassID() {
         return uiClassID;
--- a/jdk/src/share/classes/javax/swing/JToolBar.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/JToolBar.java	Thu Sep 26 17:18:12 2013 -0700
@@ -167,9 +167,9 @@
     }
 
     /**
-     * Sets the L&F object that renders this component.
+     * Sets the L&amp;F object that renders this component.
      *
-     * @param ui  the <code>ToolBarUI</code> L&F object
+     * @param ui  the <code>ToolBarUI</code> L&amp;F object
      * @see UIDefaults#getUI
      * @beaninfo
      *        bound: true
@@ -182,7 +182,7 @@
     }
 
     /**
-     * Notification from the <code>UIFactory</code> that the L&F has changed.
+     * Notification from the <code>UIFactory</code> that the L&amp;F has changed.
      * Called to replace the UI with the latest version from the
      * <code>UIFactory</code>.
      *
@@ -202,7 +202,7 @@
 
 
     /**
-     * Returns the name of the L&F class that renders this component.
+     * Returns the name of the L&amp;F class that renders this component.
      *
      * @return the string "ToolBarUI"
      * @see JComponent#getUIClassID
@@ -613,7 +613,7 @@
         }
 
         /**
-         * Returns the name of the L&F class that renders this component.
+         * Returns the name of the L&amp;F class that renders this component.
          *
          * @return the string "ToolBarSeparatorUI"
          * @see JComponent#getUIClassID
--- a/jdk/src/share/classes/javax/swing/JToolTip.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/JToolTip.java	Thu Sep 26 17:18:12 2013 -0700
@@ -85,7 +85,7 @@
     }
 
     /**
-     * Returns the L&F object that renders this component.
+     * Returns the L&amp;F object that renders this component.
      *
      * @return the <code>ToolTipUI</code> object that renders this component
      */
@@ -104,7 +104,7 @@
 
 
     /**
-     * Returns the name of the L&F class that renders this component.
+     * Returns the name of the L&amp;F class that renders this component.
      *
      * @return the string "ToolTipUI"
      * @see JComponent#getUIClassID
--- a/jdk/src/share/classes/javax/swing/JTree.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/JTree.java	Thu Sep 26 17:18:12 2013 -0700
@@ -41,7 +41,7 @@
 
 
 /**
- * <a name="jtree_description">
+ * <a name="jtree_description"></a>
  * A control that displays a set of hierarchical data as an outline.
  * You can find task-oriented documentation and examples of using trees in
  * <a href="http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html">How to Use Trees</a>,
@@ -59,7 +59,7 @@
  * under a collapsed ancestor. All of a <i>viewable</i> nodes parents
  * are expanded, but may or may not be displayed. A <i>displayed</i> node
  * is both viewable and in the display area, where it can be seen.
- * <p>
+ * </p>
  * The following <code>JTree</code> methods use "visible" to mean "displayed":
  * <ul>
  * <li><code>isRootVisible()</code>
@@ -69,14 +69,12 @@
  * <li><code>getVisibleRowCount()</code>
  * <li><code>setVisibleRowCount()</code>
  * </ul>
- * <p>
  * The next group of <code>JTree</code> methods use "visible" to mean
  * "viewable" (under an expanded parent):
  * <ul>
  * <li><code>isVisible()</code>
  * <li><code>makeVisible()</code>
  * </ul>
- * <p>
  * If you are interested in knowing when the selection changes implement
  * the <code>TreeSelectionListener</code> interface and add the instance
  * using the method <code>addTreeSelectionListener</code>.
@@ -87,6 +85,7 @@
  * If you are interested in detecting either double-click events or when
  * a user clicks on a node, regardless of whether or not it was selected,
  * we recommend you do the following:
+ * </p>
  * <pre>
  * final JTree tree = ...;
  *
@@ -114,12 +113,13 @@
  * a graphic icon and text), subclass {@link TreeCellRenderer} and use
  * {@link #setCellRenderer} to tell the tree to use it. To edit such nodes,
  * subclass {@link TreeCellEditor} and use {@link #setCellEditor}.
+ * </p>
  * <p>
  * Like all <code>JComponent</code> classes, you can use {@link InputMap} and
  * {@link ActionMap}
  * to associate an {@link Action} object with a {@link KeyStroke}
  * and execute the action under specified conditions.
- * <p>
+ * </p>
  * <strong>Warning:</strong> Swing is not thread safe. For more
  * information see <a
  * href="package-summary.html#threading">Swing's Threading
@@ -133,7 +133,7 @@
  * of all JavaBeans<sup><font size="-2">TM</font></sup>
  * has been added to the <code>java.beans</code> package.
  * Please see {@link java.beans.XMLEncoder}.
- *
+ *</p>
  * @beaninfo
  *   attribute: isContainer false
  * description: A component that displays a set of hierarchical data as an outline.
@@ -174,7 +174,7 @@
     transient protected TreeCellRenderer  cellRenderer;
 
     /**
-     * Height to use for each display row. If this is <= 0 the renderer
+     * Height to use for each display row. If this is &lt;= 0 the renderer
      * determines the height for each row.
      */
     protected int                         rowHeight;
@@ -671,7 +671,7 @@
     }
 
     /**
-     * Returns the L&F object that renders this component.
+     * Returns the L&amp;F object that renders this component.
      *
      * @return the <code>TreeUI</code> object that renders this component
      */
@@ -680,11 +680,11 @@
     }
 
     /**
-     * Sets the L&F object that renders this component.
+     * Sets the L&amp;F object that renders this component.
      * <p>
      * This is a bound property.
      *
-     * @param ui  the <code>TreeUI</code> L&F object
+     * @param ui  the <code>TreeUI</code> L&amp;F object
      * @see UIDefaults#getUI
      * @beaninfo
      *        bound: true
@@ -706,7 +706,7 @@
     }
 
     /**
-     * Notification from the <code>UIManager</code> that the L&F has changed.
+     * Notification from the <code>UIManager</code> that the L&amp;F has changed.
      * Replaces the current UI object with the latest version from the
      * <code>UIManager</code>.
      *
@@ -721,7 +721,7 @@
 
 
     /**
-     * Returns the name of the L&F class that renders this component.
+     * Returns the name of the L&amp;F class that renders this component.
      *
      * @return the string "TreeUI"
      * @see JComponent#getUIClassID
@@ -1701,7 +1701,7 @@
     /**
      * Selects the nodes corresponding to each of the specified rows
      * in the display. If a particular element of <code>rows</code> is
-     * < 0 or >= <code>getRowCount</code>, it will be ignored.
+     * &lt; 0 or &gt;= <code>getRowCount</code>, it will be ignored.
      * If none of the elements
      * in <code>rows</code> are valid rows, the selection will
      * be cleared. That is it will be as if <code>clearSelection</code>
@@ -2162,8 +2162,8 @@
      *
      * @param row  an integer specifying a row
      * @return the <code>TreePath</code> to the specified node,
-     *          <code>null</code> if <code>row < 0</code>
-     *          or <code>row >= getRowCount()</code>
+     *          <code>null</code> if <code>row &lt; 0</code>
+     *          or <code>row &gt;= getRowCount()</code>
      */
     public TreePath getPathForRow(int row) {
         TreeUI                  tree = getUI();
@@ -2211,7 +2211,7 @@
      * Ensures that the node in the specified row is expanded and
      * viewable.
      * <p>
-     * If <code>row</code> is < 0 or >= <code>getRowCount</code> this
+     * If <code>row</code> is &lt; 0 or &gt;= <code>getRowCount</code> this
      * will have no effect.
      *
      * @param row  an integer specifying a display row, where 0 is the
@@ -2234,7 +2234,7 @@
     /**
      * Ensures that the node in the specified row is collapsed.
      * <p>
-     * If <code>row</code> is < 0 or >= <code>getRowCount</code> this
+     * If <code>row</code> is &lt; 0 or &gt;= <code>getRowCount</code> this
      * will have no effect.
      *
      * @param row  an integer specifying a display row, where 0 is the
--- a/jdk/src/share/classes/javax/swing/JViewport.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/JViewport.java	Thu Sep 26 17:18:12 2013 -0700
@@ -25,6 +25,8 @@
 
 package javax.swing;
 
+import sun.swing.JLightweightFrame;
+
 import java.awt.*;
 import java.awt.event.*;
 import java.awt.peer.ComponentPeer;
@@ -283,7 +285,7 @@
 
 
     /**
-     * Returns the L&F object that renders this component.
+     * Returns the L&amp;F object that renders this component.
      *
      * @return a <code>ViewportUI</code> object
      * @since 1.3
@@ -294,9 +296,9 @@
 
 
     /**
-     * Sets the L&F object that renders this component.
+     * Sets the L&amp;F object that renders this component.
      *
-     * @param ui  the <code>ViewportUI</code> L&F object
+     * @param ui  the <code>ViewportUI</code> L&amp;F object
      * @see UIDefaults#getUI
      * @beaninfo
      *        bound: true
@@ -321,7 +323,7 @@
 
 
     /**
-     * Returns a string that specifies the name of the L&F class
+     * Returns a string that specifies the name of the L&amp;F class
      * that renders this component.
      *
      * @return the string "ViewportUI"
@@ -361,6 +363,17 @@
         super.remove(child);
     }
 
+    @Override
+    public void addNotify() {
+        super.addNotify();
+        // JLightweightFrame does not support BLIT_SCROLL_MODE, so it should be replaced
+        Window rootWindow = SwingUtilities.getWindowAncestor(this);
+        if (rootWindow instanceof JLightweightFrame
+                && getScrollMode() == BLIT_SCROLL_MODE) {
+            setScrollMode(BACKINGSTORE_SCROLL_MODE);
+        }
+    }
+
 
     /**
      * Scrolls the view so that <code>Rectangle</code>
--- a/jdk/src/share/classes/javax/swing/KeyStroke.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/KeyStroke.java	Thu Sep 26 17:18:12 2013 -0700
@@ -284,11 +284,11 @@
      * If typed, pressed or released is not specified, pressed is assumed. Here
      * are some examples:
      * <pre>
-     *     "INSERT" => getKeyStroke(KeyEvent.VK_INSERT, 0);
-     *     "control DELETE" => getKeyStroke(KeyEvent.VK_DELETE, InputEvent.CTRL_MASK);
-     *     "alt shift X" => getKeyStroke(KeyEvent.VK_X, InputEvent.ALT_MASK | InputEvent.SHIFT_MASK);
-     *     "alt shift released X" => getKeyStroke(KeyEvent.VK_X, InputEvent.ALT_MASK | InputEvent.SHIFT_MASK, true);
-     *     "typed a" => getKeyStroke('a');
+     *     "INSERT" =&gt; getKeyStroke(KeyEvent.VK_INSERT, 0);
+     *     "control DELETE" =&gt; getKeyStroke(KeyEvent.VK_DELETE, InputEvent.CTRL_MASK);
+     *     "alt shift X" =&gt; getKeyStroke(KeyEvent.VK_X, InputEvent.ALT_MASK | InputEvent.SHIFT_MASK);
+     *     "alt shift released X" =&gt; getKeyStroke(KeyEvent.VK_X, InputEvent.ALT_MASK | InputEvent.SHIFT_MASK, true);
+     *     "typed a" =&gt; getKeyStroke('a');
      * </pre>
      *
      * In order to maintain backward-compatibility, specifying a null String,
--- a/jdk/src/share/classes/javax/swing/OverlayLayout.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/OverlayLayout.java	Thu Sep 26 17:18:12 2013 -0700
@@ -190,7 +190,7 @@
      * Returns the alignment along the x axis for the container.
      *
      * @param target the container
-     * @return the alignment >= 0.0f && <= 1.0f
+     * @return the alignment &gt;= 0.0f &amp;&amp; &lt;= 1.0f
      */
     public float getLayoutAlignmentX(Container target) {
         checkContainer(target);
@@ -202,7 +202,7 @@
      * Returns the alignment along the y axis for the container.
      *
      * @param target the container
-     * @return the alignment >= 0.0f && <= 1.0f
+     * @return the alignment &gt;= 0.0f &amp;&amp; &lt;= 1.0f
      */
     public float getLayoutAlignmentY(Container target) {
         checkContainer(target);
--- a/jdk/src/share/classes/javax/swing/ProgressMonitor.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/ProgressMonitor.java	Thu Sep 26 17:18:12 2013 -0700
@@ -251,7 +251,7 @@
 
     /**
      * Indicate the progress of the operation being monitored.
-     * If the specified value is >= the maximum, the progress
+     * If the specified value is &gt;= the maximum, the progress
      * monitor is closed.
      * @param nv an int specifying the current value, between the
      *        maximum and minimum specified for this component
@@ -302,7 +302,7 @@
 
     /**
      * Indicate that the operation is complete.  This happens automatically
-     * when the value set by setProgress is >= max, but it may be called
+     * when the value set by setProgress is &gt;= max, but it may be called
      * earlier if the operation ends early.
      */
     public void close() {
--- a/jdk/src/share/classes/javax/swing/RowFilter.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/RowFilter.java	Thu Sep 26 17:18:12 2013 -0700
@@ -357,7 +357,7 @@
          *
          * @param index the index of the value to get
          * @return value at the specified index
-         * @throws <code>IndexOutOfBoundsException</code> if index &lt; 0 or
+         * @throws IndexOutOfBoundsException if index &lt; 0 or
          *         &gt;= getValueCount
          */
         public abstract Object getValue(int index);
@@ -376,7 +376,7 @@
          *
          * @param index the index of the value to get
          * @return {@code non-null} string at the specified index
-         * @throws <code>IndexOutOfBoundsException</code> if index &lt; 0 ||
+         * @throws IndexOutOfBoundsException if index &lt; 0 ||
          *         &gt;= getValueCount
          */
         public String getStringValue(int index) {
--- a/jdk/src/share/classes/javax/swing/SizeRequirements.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/SizeRequirements.java	Thu Sep 26 17:18:12 2013 -0700
@@ -142,10 +142,10 @@
      * Creates a SizeRequirements object with the specified minimum, preferred,
      * and maximum sizes and the specified alignment.
      *
-     * @param min the minimum size >= 0
-     * @param pref the preferred size >= 0
-     * @param max the maximum size >= 0
-     * @param a the alignment >= 0.0f && <= 1.0f
+     * @param min the minimum size &gt;= 0
+     * @param pref the preferred size &gt;= 0
+     * @param max the maximum size &gt;= 0
+     * @param a the alignment &gt;= 0.0f &amp;&amp; &lt;= 1.0f
      */
     public SizeRequirements(int min, int pref, int max, float a) {
         minimum = min;
@@ -246,7 +246,7 @@
      * by invoking the getTiledSizeRequirements method.  The components
      * will be tiled in the forward direction with offsets increasing from 0.
      *
-     * @param allocated the total span to be allocated >= 0.
+     * @param allocated the total span to be allocated &gt;= 0.
      * @param total     the total of the children requests.  This argument
      *  is optional and may be null.
      * @param children  the size requirements for each component.
@@ -282,7 +282,7 @@
      * reverse direction represents components tiled from right to left
      * or bottom to top.
      *
-     * @param allocated the total span to be allocated >= 0.
+     * @param allocated the total span to be allocated &gt;= 0.
      * @param total     the total of the children requests.  This argument
      *  is optional and may be null.
      * @param children  the size requirements for each component.
@@ -405,7 +405,7 @@
      * Normal alignment will be done with an alignment value of 0.0f
      * representing the left/top edge of a component.
      *
-     * @param allocated the total span to be allocated >= 0.
+     * @param allocated the total span to be allocated &gt;= 0.
      * @param total     the total of the children requests.
      * @param children  the size requirements for each component.
      * @param offsets   the offset from 0 for each child where
@@ -441,7 +441,7 @@
      * to be aligned.  With reverse alignment, 0.0f represents the
      * right/bottom edge.
      *
-     * @param allocated the total span to be allocated >= 0.
+     * @param allocated the total span to be allocated &gt;= 0.
      * @param total     the total of the children requests.
      * @param children  the size requirements for each component.
      * @param offsets   the offset from 0 for each child where
--- a/jdk/src/share/classes/javax/swing/SizeSequence.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/SizeSequence.java	Thu Sep 26 17:18:12 2013 -0700
@@ -78,7 +78,7 @@
  *
  * <p>
  *
- * <h4>Implementation Notes</h4>
+ * <h3>Implementation Notes</h3>
  *
  * Normally when storing the size and position of entries,
  * one would choose between
@@ -145,7 +145,7 @@
      *
      * @param numEntries  the number of sizes to track
      * @exception NegativeArraySizeException if
-     *    <code>numEntries < 0</code>
+     *    <code>numEntries &lt; 0</code>
      */
     public SizeSequence(int numEntries) {
         this(numEntries, 0);
@@ -306,7 +306,7 @@
     /**
      * Returns the size of the specified entry.
      * If <code>index</code> is out of the range
-     * <code>(0 <= index < getSizes().length)</code>
+     * <code>(0 &lt;= index &lt; getSizes().length)</code>
      * the behavior is unspecified.
      *
      * @param index  the index corresponding to the entry
@@ -320,7 +320,7 @@
      * Sets the size of the specified entry.
      * Note that if the value of <code>index</code>
      * does not fall in the range:
-     * <code>(0 <= index < getSizes().length)</code>
+     * <code>(0 &lt;= index &lt; getSizes().length)</code>
      * the behavior is unspecified.
      *
      * @param index  the index corresponding to the entry
@@ -348,8 +348,8 @@
      * Adds a contiguous group of entries to this <code>SizeSequence</code>.
      * Note that the values of <code>start</code> and
      * <code>length</code> must satisfy the following
-     * conditions:  <code>(0 <= start < getSizes().length)
-     * AND (length >= 0)</code>.  If these conditions are
+     * conditions:  <code>(0 &lt;= start &lt; getSizes().length)
+     * AND (length &gt;= 0)</code>.  If these conditions are
      * not met, the behavior is unspecified and an exception
      * may be thrown.
      *
@@ -359,7 +359,7 @@
      * @param value   the size to be assigned to each new entry
      * @exception ArrayIndexOutOfBoundsException if the parameters
      *   are outside of the range:
-     *   (<code>0 <= start < (getSizes().length)) AND (length >= 0)</code>
+     *   (<code>0 &lt;= start &lt; (getSizes().length)) AND (length &gt;= 0)</code>
      */
     public void insertEntries(int start, int length, int value) {
         int sizes[] = getSizes();
@@ -383,8 +383,8 @@
      * from this <code>SizeSequence</code>.
      * Note that the values of <code>start</code> and
      * <code>length</code> must satisfy the following
-     * conditions:  <code>(0 <= start < getSizes().length)
-     * AND (length >= 0)</code>.  If these conditions are
+     * conditions:  <code>(0 &lt;= start &lt; getSizes().length)
+     * AND (length &gt;= 0)</code>.  If these conditions are
      * not met, the behavior is unspecified and an exception
      * may be thrown.
      *
--- a/jdk/src/share/classes/javax/swing/SpinnerDateModel.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/SpinnerDateModel.java	Thu Sep 26 17:18:12 2013 -0700
@@ -221,7 +221,7 @@
      * MyStartDate implements Comparable {
      *     long t = 12345;
      *     public int compareTo(Date d) {
-     *            return (t < d.getTime() ? -1 : (t == d.getTime() ? 0 : 1));
+     *            return (t &lt; d.getTime() ? -1 : (t == d.getTime() ? 0 : 1));
      *     }
      *     public int compareTo(Object o) {
      *            return compareTo((Date)o);
@@ -435,7 +435,7 @@
      * If <code>value</code> is <code>null</code>,
      * an <code>IllegalArgumentException</code> is thrown.  No bounds
      * checking is done here:
-     * the new value may invalidate the <code>(start &lt= value &lt end)</code>
+     * the new value may invalidate the <code>(start &lt;= value &lt; end)</code>
      * invariant enforced by the constructors.  Naturally, one should ensure
      * that the <code>(start &lt;= value &lt;= maximum)</code> invariant is true
      * before calling the <code>nextValue</code>, <code>previousValue</code>,
--- a/jdk/src/share/classes/javax/swing/SpinnerListModel.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/SpinnerListModel.java	Thu Sep 26 17:18:12 2013 -0700
@@ -71,7 +71,7 @@
      * size, an <code>IllegalArugmentException</code> is thrown.
      *
      * @param values the sequence this model represents
-     * @throws IllegalArugmentException if <code>values</code> is
+     * @throws IllegalArgumentException if <code>values</code> is
      *    <code>null</code> or zero size
      */
     public SpinnerListModel(List<?> values) {
@@ -88,10 +88,10 @@
      * is defined by the specified array.  The initial value of the model
      * will be <code>values[0]</code>.  If <code>values</code> is
      * <code>null</code> or has zero length, an
-     * <code>IllegalArugmentException</code> is thrown.
+     * <code>IllegalArgumentException</code> is thrown.
      *
      * @param values the sequence this model represents
-     * @throws IllegalArugmentException if <code>values</code> is
+     * @throws IllegalArgumentException if <code>values</code> is
      *    <code>null</code> or zero length
      */
     public SpinnerListModel(Object[] values) {
--- a/jdk/src/share/classes/javax/swing/SpinnerNumberModel.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/SpinnerNumberModel.java	Thu Sep 26 17:18:12 2013 -0700
@@ -180,7 +180,7 @@
      * If <code>minimum</code> is <code>null</code>,
      * then there is no lower bound.  No bounds checking is done here;
      * the new <code>minimum</code> value may invalidate the
-     * <code>(minimum &lt;= value &lt= maximum)</code>
+     * <code>(minimum &lt;= value &lt;= maximum)</code>
      * invariant enforced by the constructors.  This is to simplify updating
      * the model, naturally one should ensure that the invariant is true
      * before calling the <code>getNextValue</code>,
@@ -196,7 +196,7 @@
      * MyDate extends Date {  // Date already implements Comparable
      *     public int compareTo(Long o) {
      *         long t = getTime();
-     *         return (t < o.longValue() ? -1 : (t == o.longValue() ? 0 : 1));
+     *         return (t &lt; o.longValue() ? -1 : (t == o.longValue() ? 0 : 1));
      *     }
      * }
      * </pre>
@@ -235,7 +235,7 @@
      * If <code>maximum</code> is <code>null</code>, then there
      * is no upper bound.  No bounds checking is done here; the new
      * <code>maximum</code> value may invalidate the
-     * <code>(minimum <= value < maximum)</code>
+     * <code>(minimum &lt;= value &lt; maximum)</code>
      * invariant enforced by the constructors.  This is to simplify updating
      * the model, naturally one should ensure that the invariant is true
      * before calling the <code>next</code>, <code>previous</code>,
--- a/jdk/src/share/classes/javax/swing/SpringLayout.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/SpringLayout.java	Thu Sep 26 17:18:12 2013 -0700
@@ -727,7 +727,7 @@
         * For any other <code>String</code> value passed as the edge,
         * no action is taken. For a <code>null</code> edge, a
         * <code>NullPointerException</code> is thrown.
-        * <p/>
+        * <p>
         * <b>Note:</b> This method can affect {@code x} and {@code y} values
         * previously set for this {@code Constraints}.
         *
--- a/jdk/src/share/classes/javax/swing/TransferHandler.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/TransferHandler.java	Thu Sep 26 17:18:12 2013 -0700
@@ -502,7 +502,7 @@
          * the action with the source drop actions, and then compare the result
          * against the original action. For example:
          * <pre>
-         * boolean copySupported = (COPY & getSourceDropActions()) == COPY;
+         * boolean copySupported = (COPY &amp; getSourceDropActions()) == COPY;
          * </pre>
          * <p>
          * This method is only for use with drag and drop transfers.
@@ -1268,6 +1268,14 @@
                     }
                 }
             }
+            if (!isActive()) {
+                // If the Drop target is inactive the dragExit will not be dispatched to the dtListener,
+                // so make sure that we clean up the dtListener anyway.
+                DropTargetListener dtListener = getDropTargetListener();
+                    if (dtListener != null && dtListener instanceof DropHandler) {
+                        ((DropHandler)dtListener).cleanup(false);
+                    }
+            }
         }
 
         public void drop(DropTargetDropEvent e) {
--- a/jdk/src/share/classes/javax/swing/UIDefaults.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/UIDefaults.java	Thu Sep 26 17:18:12 2013 -0700
@@ -706,7 +706,7 @@
 
 
     /**
-     * Returns the L&F class that renders this component.
+     * Returns the L&amp;F class that renders this component.
      *
      * @param uiClassID a string containing the class ID
      * @return the Class object returned by
--- a/jdk/src/share/classes/javax/swing/UnsupportedLookAndFeelException.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/UnsupportedLookAndFeelException.java	Thu Sep 26 17:18:12 2013 -0700
@@ -25,7 +25,7 @@
 package javax.swing;
 
 /**
- * An exception that indicates the requested look & feel
+ * An exception that indicates the requested look &amp; feel
  * management classes are not present on the user's system.
  * <p>
  * <strong>Warning:</strong>
--- a/jdk/src/share/classes/javax/swing/ViewportLayout.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/ViewportLayout.java	Thu Sep 26 17:18:12 2013 -0700
@@ -25,6 +25,7 @@
 
 package javax.swing;
 
+import java.awt.AWTError;
 import java.awt.LayoutManager;
 import java.awt.Component;
 import java.awt.Container;
@@ -116,7 +117,7 @@
      *
      * @param parent  the container to lay out
      *
-     * @exception AWTError  if the target isn't the container specified to the
+     * @throws AWTError if the target isn't the container specified to the
      *                      <code>BoxLayout</code> constructor
      */
     public void layoutContainer(Container parent)
--- a/jdk/src/share/classes/javax/swing/plaf/LayerUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/LayerUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -35,17 +35,17 @@
 
 /**
  * The base class for all {@link javax.swing.JLayer}'s UI delegates.
- * <p/>
+ * <p>
  * {@link #paint(java.awt.Graphics, javax.swing.JComponent)} method performs the
  * painting of the {@code JLayer}
  * and {@link #eventDispatched(AWTEvent, JLayer)} method is notified
  * about any {@code AWTEvent}s which have been generated by a {@code JLayer}
  * or any of its subcomponents.
- * <p/>
+ * <p>
  * The {@code LayerUI} differs from the UI delegates of the other components,
  * because it is LookAndFeel independent and is not updated by default when
  * the system LookAndFeel is changed.
- * <p/>
+ * <p>
  * The subclasses of {@code LayerUI} can either be stateless and shareable
  * by multiple {@code JLayer}s or not shareable.
  *
@@ -69,7 +69,7 @@
      * Subclasses should override this method and use
      * the specified {@code Graphics} object to
      * render the content of the component.
-     * <p/>
+     * <p>
      * The default implementation paints the passed component as is.
      *
      * @param g the {@code Graphics} context in which to paint
@@ -82,7 +82,7 @@
     /**
      * Processes {@code AWTEvent}s for {@code JLayer}
      * and <b>all its descendants</b> to this {@code LayerUI} instance.
-     * <p/>
+     * <p>
      * To enable the {@code AWTEvent}s of a particular type,
      * you call {@link JLayer#setLayerEventMask}
      * in {@link #installUI(javax.swing.JComponent)}
@@ -91,7 +91,7 @@
      * By default this  method calls the appropriate
      * {@code process&lt;event&nbsp;type&gt;Event}
      * method for the given class of event.
-     * <p/>
+     * <p>
      * <b>Note:</b> Events are processed only for displayable {@code JLayer}s.
      *
      * @param e the event to be dispatched
@@ -151,7 +151,7 @@
     /**
      * Processes component events occurring on the {@link JLayer}
      * or any of its subcomponents.
-     * <p/>
+     * <p>
      * This method is not called unless component events are
      * enabled for the {@code JLayer} objects, this {@code LayerUI} is set to.
      * Component events are enabled in the overridden {@link #installUI} method
@@ -183,7 +183,7 @@
     /**
      * Processes focus events occurring on the {@link JLayer}
      * or any of its subcomponents.
-     * <p/>
+     * <p>
      * This method is not called unless focus events are
      * enabled for the {@code JLayer} objects, this {@code LayerUI} is set to.
      * Focus events are enabled in the overridden {@link #installUI} method
@@ -215,7 +215,7 @@
     /**
      * Processes key events occurring on the {@link JLayer}
      * or any of its subcomponents.
-     * <p/>
+     * <p>
      * This method is not called unless key events are
      * enabled for the {@code JLayer} objects, this {@code LayerUI} is set to.
      * Key events are enabled in the overridden {@link #installUI} method
@@ -247,7 +247,7 @@
     /**
      * Processes mouse events occurring on the {@link JLayer}
      * or any of its subcomponents.
-     * <p/>
+     * <p>
      * This method is not called unless mouse events are
      * enabled for the {@code JLayer} objects, this {@code LayerUI} is set to.
      * Mouse events are enabled in the overridden {@link #installUI} method
@@ -279,7 +279,7 @@
     /**
      * Processes mouse motion event occurring on the {@link JLayer}
      * or any of its subcomponents.
-     * <p/>
+     * <p>
      * This method is not called unless mouse motion events are
      * enabled for the {@code JLayer} objects, this {@code LayerUI} is set to.
      * Mouse motion events are enabled in the overridden {@link #installUI} method
@@ -311,7 +311,7 @@
     /**
      * Processes mouse wheel event occurring on the {@link JLayer}
      * or any of its subcomponents.
-     * <p/>
+     * <p>
      * This method is not called unless mouse wheel events are
      * enabled for the {@code JLayer} objects, this {@code LayerUI} is set to.
      * Mouse wheel events are enabled in the overridden {@link #installUI} method
@@ -343,7 +343,7 @@
     /**
      * Processes input event occurring on the {@link JLayer}
      * or any of its subcomponents.
-     * <p/>
+     * <p>
      * This method is not called unless input events are
      * enabled for the {@code JLayer} objects, this {@code LayerUI} is set to.
      * Input events are enabled in the overridden {@link #installUI} method
@@ -375,7 +375,7 @@
     /**
      * Processes hierarchy event occurring on the {@link JLayer}
      * or any of its subcomponents.
-     * <p/>
+     * <p>
      * This method is not called unless hierarchy events are
      * enabled for the {@code JLayer} objects, this {@code LayerUI} is set to.
      * Hierarchy events are enabled in the overridden {@link #installUI} method
@@ -407,7 +407,7 @@
     /**
      * Processes hierarchy bounds event occurring on the {@link JLayer}
      * or any of its subcomponents.
-     * <p/>
+     * <p>
      * This method is not called unless hierarchy bounds events are
      * enabled for the {@code JLayer} objects, this {@code LayerUI} is set to.
      * Hierarchy bounds events are enabled in the overridden {@link #installUI}
@@ -471,7 +471,7 @@
     /**
      * Adds a PropertyChangeListener to the listener list. The listener is
      * registered for all bound properties of this class.
-     * <p/>
+     * <p>
      * If {@code listener} is {@code null},
      * no exception is thrown and no action is performed.
      *
@@ -488,7 +488,7 @@
      * Removes a PropertyChangeListener from the listener list. This method
      * should be used to remove PropertyChangeListeners that were registered
      * for all bound properties of this class.
-     * <p/>
+     * <p>
      * If {@code listener} is {@code null},
      * no exception is thrown and no action is performed.
      *
@@ -519,7 +519,7 @@
     /**
      * Adds a PropertyChangeListener to the listener list for a specific
      * property.
-     * <p/>
+     * <p>
      * If {@code propertyName} or {@code listener} is {@code null},
      * no exception is thrown and no action is taken.
      *
@@ -539,7 +539,7 @@
      * list for a specific property. This method should be used to remove
      * {@code PropertyChangeListener}s
      * that were registered for a specific bound property.
-     * <p/>
+     * <p>
      * If {@code propertyName} or {@code listener} is {@code null},
      * no exception is thrown and no action is taken.
      *
@@ -702,7 +702,7 @@
 
     /**
      * Paints the specified region in the {@code JLayer} this {@code LayerUI} is set to, immediately.
-     * <p/>
+     * <p>
      * This method is to be overridden when the dirty region needs to be changed.
      * The default implementation delegates its functionality to {@link JComponent#paintImmediately(int, int, int, int)}.
      *
--- a/jdk/src/share/classes/javax/swing/plaf/TextUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/TextUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -42,7 +42,7 @@
      * Converts the given location in the model to a place in
      * the view coordinate system.
      *
-     * @param pos  the local location in the model to translate >= 0
+     * @param pos  the local location in the model to translate &gt;= 0
      * @return the coordinates as a rectangle
      * @exception BadLocationException  if the given position does not
      *   represent a valid location in the associated document
@@ -53,7 +53,7 @@
      * Converts the given location in the model to a place in
      * the view coordinate system.
      *
-     * @param pos  the local location in the model to translate >= 0
+     * @param pos  the local location in the model to translate &gt;= 0
      * @return the coordinates as a rectangle
      * @exception BadLocationException  if the given position does not
      *   represent a valid location in the associated document
@@ -67,7 +67,7 @@
      * @param pt  the location in the view to translate.  This
      *   should be in the same coordinate system as the mouse
      *   events.
-     * @return the offset from the start of the document >= 0
+     * @return the offset from the start of the document &gt;= 0
      */
     public abstract int viewToModel(JTextComponent t, Point pt);
 
@@ -84,7 +84,7 @@
      *           character in the model
      *
      * @return the location within the model that best represents the
-     *         given point in the view >= 0
+     *         given point in the view &gt;= 0
      */
     public abstract int viewToModel(JTextComponent t, Point pt,
                                     Position.Bias[] biasReturn);
@@ -96,7 +96,7 @@
      * might not allow access to some of the locations in the model.
      *
      * @param t the text component for which this UI is installed
-     * @param pos the position to convert >= 0
+     * @param pos the position to convert &gt;= 0
      * @param b the bias for the position
      * @param direction the direction from the current position that can
      *  be thought of as the arrow keys typically found on a keyboard.
@@ -117,8 +117,8 @@
      * Causes the portion of the view responsible for the
      * given part of the model to be repainted.
      *
-     * @param p0 the beginning of the range >= 0
-     * @param p1 the end of the range >= p0
+     * @param p0 the beginning of the range &gt;= 0
+     * @param p1 the end of the range &gt;= p0
      */
     public abstract void damageRange(JTextComponent t, int p0, int p1);
 
@@ -126,8 +126,8 @@
      * Causes the portion of the view responsible for the
      * given part of the model to be repainted.
      *
-     * @param p0 the beginning of the range >= 0
-     * @param p1 the end of the range >= p0
+     * @param p0 the beginning of the range &gt;= 0
+     * @param p1 the end of the range &gt;= p0
      */
     public abstract void damageRange(JTextComponent t, int p0, int p1,
                                      Position.Bias firstBias,
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicBorders.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicBorders.java	Thu Sep 26 17:18:12 2013 -0700
@@ -38,7 +38,7 @@
 import java.awt.Graphics;
 
 /**
- * Factory object that can vend Borders appropriate for the basic L & F.
+ * Factory object that can vend Borders appropriate for the basic L &amp; F.
  * @author Georges Saab
  * @author Amy Fowler
  */
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -971,14 +971,16 @@
                     // cells, if not, this needs to loop through all.
                     value = comboBox.getModel().getElementAt(0);
                 }
-                if (value == null) {
-                    value = " ";
-                } else if (value instanceof String && "".equals(value)) {
-                    value = " ";
-                }
                 Component component = renderer.
                         getListCellRendererComponent(listBox, value, -1,
                                                      false, false);
+                if (component instanceof JLabel) {
+                    JLabel label = (JLabel) component;
+                    String text = label.getText();
+                    if ((text == null) || text.isEmpty()) {
+                        label.setText(" ");
+                    }
+                }
                 if (component instanceof JComponent) {
                     component.setFont(comboBox.getFont());
                 }
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicDesktopIconUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicDesktopIconUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -34,7 +34,7 @@
 import java.beans.*;
 
 /**
- * Basic L&F for a minimized window on a desktop.
+ * Basic L&amp;F for a minimized window on a desktop.
  *
  * @author David Kloba
  * @author Steve Wilson
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicDesktopPaneUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicDesktopPaneUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -42,7 +42,7 @@
 import sun.awt.AppContext;
 
 /**
- * Basic L&F for a desktop.
+ * Basic L&amp;F for a desktop.
  *
  * @author Steve Wilson
  */
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -43,7 +43,7 @@
 import sun.swing.SwingUtilities2;
 
 /**
- * Basic L&F implementation of a FileChooser.
+ * Basic L&amp;F implementation of a FileChooser.
  *
  * @author Jeff Dinkins
  */
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicGraphicsUtils.java	Thu Sep 26 17:18:12 2013 -0700
@@ -231,7 +231,7 @@
      * just like <code>g.drawString</code> would.
      * The character at index <code>underlinedIndex</code>
      * in text will be underlined. If <code>index</code> is beyond the
-     * bounds of <code>text</code> (including < 0), nothing will be
+     * bounds of <code>text</code> (including &lt; 0), nothing will be
      * underlined.
      *
      * @param g Graphics to draw with
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicIconFactory.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicIconFactory.java	Thu Sep 26 17:18:12 2013 -0700
@@ -35,7 +35,7 @@
 import java.io.Serializable;
 
 /**
- * Factory object that can vend Icons appropriate for the basic L & F.
+ * Factory object that can vend Icons appropriate for the basic L &amp; F.
  * <p>
  * <strong>Warning:</strong>
  * Serialized objects of this class will not be compatible with
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java	Thu Sep 26 17:18:12 2013 -0700
@@ -553,7 +553,7 @@
 
     /**
      * This class should be treated as a &quot;protected&quot; inner class.
-     * Instantiate it only within subclasses of <Foo>.
+     * Instantiate it only within subclasses of <code>Foo</code>.
      */
     public class PropertyChangeHandler implements PropertyChangeListener {
         // NOTE: This class exists only for backward compatability. All
@@ -567,7 +567,7 @@
 
     /**
      * This class should be treated as a &quot;protected&quot; inner class.
-     * Instantiate it only within subclasses of <Foo>.
+     * Instantiate it only within subclasses of <code>Foo</code>.
      */
     public class TitlePaneLayout implements LayoutManager {
         // NOTE: This class exists only for backward compatability. All
@@ -597,7 +597,7 @@
 
     /**
      * This class should be treated as a &quot;protected&quot; inner class.
-     * Instantiate it only within subclasses of <Foo>.
+     * Instantiate it only within subclasses of <code>Foo</code>.
      */
     public class CloseAction extends AbstractAction {
         public CloseAction() {
@@ -614,7 +614,7 @@
 
     /**
      * This class should be treated as a &quot;protected&quot; inner class.
-     * Instantiate it only within subclasses of <Foo>.
+     * Instantiate it only within subclasses of <code>Foo</code>.
      */
     public class MaximizeAction extends AbstractAction {
         public MaximizeAction() {
@@ -643,7 +643,7 @@
 
     /**
      * This class should be treated as a &quot;protected&quot; inner class.
-     * Instantiate it only within subclasses of <Foo>.
+     * Instantiate it only within subclasses of <code>Foo</code>.
      */
     public class IconifyAction extends AbstractAction {
         public IconifyAction() {
@@ -664,7 +664,7 @@
 
     /**
      * This class should be treated as a &quot;protected&quot; inner class.
-     * Instantiate it only within subclasses of <Foo>.
+     * Instantiate it only within subclasses of <code>Foo</code>.
      */
     public class RestoreAction extends AbstractAction {
         public RestoreAction() {
@@ -691,7 +691,7 @@
 
     /**
      * This class should be treated as a &quot;protected&quot; inner class.
-     * Instantiate it only within subclasses of <Foo>.
+     * Instantiate it only within subclasses of <code>Foo</code>.
      */
     public class MoveAction extends AbstractAction {
         public MoveAction() {
@@ -725,7 +725,7 @@
 
     /**
      * This class should be treated as a &quot;protected&quot; inner class.
-     * Instantiate it only within subclasses of <Foo>.
+     * Instantiate it only within subclasses of <code>Foo</code>.
      */
     public class SizeAction extends AbstractAction {
         public SizeAction() {
@@ -741,7 +741,7 @@
 
     /**
      * This class should be treated as a &quot;protected&quot; inner class.
-     * Instantiate it only within subclasses of <Foo>.
+     * Instantiate it only within subclasses of <code>Foo</code>.
      */
     public class SystemMenuBar extends JMenuBar {
         public boolean isFocusTraversable() { return false; }
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicInternalFrameUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicInternalFrameUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -35,7 +35,7 @@
 import sun.swing.UIAction;
 
 /**
- * A basic L&F implementation of JInternalFrame.
+ * A basic L&amp;F implementation of JInternalFrame.
  *
  * @author David Kloba
  * @author Rich Schiavi
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicLabelUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicLabelUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -50,7 +50,7 @@
 import java.beans.PropertyChangeListener;
 
 /**
- * A Windows L&F implementation of LabelUI.  This implementation
+ * A Windows L&amp;F implementation of LabelUI.  This implementation
  * is completely static, i.e. there's only one UIView implementation
  * that's shared by all JLabel objects.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicListUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicListUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -537,7 +537,7 @@
      *   <td>JList.VERTICAL_WRAP
      *   <td>If the visible row count is greater than zero, the preferredHeight
      *       is the maximum cell height * visibleRowCount. If the visible row
-     *       count is <= 0, the preferred height is either the current height
+     *       count is &lt;= 0, the preferred height is either the current height
      *       of the list, or the maximum cell height, whichever is
      *       bigger. The preferred width is than the maximum cell width *
      *       number of columns needed. Where the number of columns needs is
@@ -556,7 +556,7 @@
      *       longer need 8 rows to display this, you only need 5, thus
      *       the adjustedRowCount is 5.
      *       <p>If the visible row
-     *       count is <= 0, the preferred height is dictated by the
+     *       count is &lt;= 0, the preferred height is dictated by the
      *       number of columns, which will be as many as can fit in the width
      *       of the <code>JList</code> (width / max cell width), with at
      *       least one column.  The preferred height then becomes the
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicMenuBarUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicMenuBarUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -46,7 +46,7 @@
 
 
 /**
- * A default L&F implementation of MenuBarUI.  This implementation
+ * A default L&amp;F implementation of MenuBarUI.  This implementation
  * is a "combined" view/controller.
  *
  * @author Georges Saab
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicMenuUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicMenuUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -39,7 +39,7 @@
 
 
 /**
- * A default L&F implementation of MenuUI.  This implementation
+ * A default L&amp;F implementation of MenuUI.  This implementation
  * is a "combined" view/controller.
  *
  * @author Georges Saab
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicOptionPaneUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicOptionPaneUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -131,7 +131,7 @@
     }
 
     /**
-      * Installs the receiver as the L&F for the passed in
+      * Installs the receiver as the L&amp;F for the passed in
       * <code>JOptionPane</code>.
       */
     public void installUI(JComponent c) {
@@ -144,7 +144,7 @@
     }
 
     /**
-      * Removes the receiver from the L&F controller of the passed in split
+      * Removes the receiver from the L&amp;F controller of the passed in split
       * pane.
       */
     public void uninstallUI(JComponent c) {
@@ -827,7 +827,7 @@
     }
 
     /**
-     * Returns true, basic L&F wants all the buttons to have the same
+     * Returns true, basic L&amp;F wants all the buttons to have the same
      * width.
      */
     protected boolean getSizeButtonsToSameWidth() {
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicPopupMenuSeparatorUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicPopupMenuSeparatorUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -34,7 +34,7 @@
 import javax.swing.plaf.ComponentUI;
 
 /**
- * A Basic L&F implementation of PopupMenuSeparatorUI.  This implementation
+ * A Basic L&amp;F implementation of PopupMenuSeparatorUI.  This implementation
  * is a "combined" view/controller.
  *
  * @author Jeff Shapiro
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicPopupMenuUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicPopupMenuUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -53,7 +53,7 @@
 import sun.awt.AppContext;
 
 /**
- * A Windows L&F implementation of PopupMenuUI.  This implementation
+ * A Windows L&amp;F implementation of PopupMenuUI.  This implementation
  * is a "combined" view/controller.
  *
  * @author Georges Saab
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicProgressBarUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicProgressBarUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -38,7 +38,7 @@
 import sun.swing.DefaultLookup;
 
 /**
- * A Basic L&F implementation of ProgressBarUI.
+ * A Basic L&amp;F implementation of ProgressBarUI.
  *
  * @author Michael C. Albers
  * @author Kathy Walrath
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicScrollPaneUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicScrollPaneUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -45,7 +45,7 @@
 import java.awt.event.*;
 
 /**
- * A default L&F implementation of ScrollPaneUI.
+ * A default L&amp;F implementation of ScrollPaneUI.
  *
  * @author Hans Muller
  */
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicSeparatorUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicSeparatorUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -36,7 +36,7 @@
 
 
 /**
- * A Basic L&F implementation of SeparatorUI.  This implementation
+ * A Basic L&amp;F implementation of SeparatorUI.  This implementation
  * is a "combined" view/controller.
  *
  * @author Georges Saab
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicSliderUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicSliderUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -39,7 +39,7 @@
 
 
 /**
- * A Basic L&F implementation of SliderUI.
+ * A Basic L&amp;F implementation of SliderUI.
  *
  * @author Tom Santos
  */
@@ -1542,7 +1542,7 @@
      * Data model listener.
      *
      * This class should be treated as a &quot;protected&quot; inner class.
-     * Instantiate it only within subclasses of <Foo>.
+     * Instantiate it only within subclasses of <code>Foo</code>.
      */
     public class ChangeHandler implements ChangeListener {
         // NOTE: This class exists only for backward compatability. All
@@ -1561,7 +1561,7 @@
      * Track mouse movements.
      *
      * This class should be treated as a &quot;protected&quot; inner class.
-     * Instantiate it only within subclasses of <Foo>.
+     * Instantiate it only within subclasses of <code>Foo</code>.
      */
     public class TrackListener extends MouseInputAdapter {
         protected transient int offset;
@@ -1805,7 +1805,7 @@
      * Scroll-event listener.
      *
      * This class should be treated as a &quot;protected&quot; inner class.
-     * Instantiate it only within subclasses of <Foo>.
+     * Instantiate it only within subclasses of <code>Foo</code>.
      */
     public class ScrollListener implements ActionListener {
         // changed this class to public to avoid bogus IllegalAccessException
@@ -1849,7 +1849,7 @@
      * Listener for resizing events.
      * <p>
      * This class should be treated as a &quot;protected&quot; inner class.
-     * Instantiate it only within subclasses of <Foo>.
+     * Instantiate it only within subclasses of <code>Foo</code>.
      */
     public class ComponentHandler extends ComponentAdapter {
         // NOTE: This class exists only for backward compatability. All
@@ -1865,7 +1865,7 @@
      * Focus-change listener.
      * <p>
      * This class should be treated as a &quot;protected&quot; inner class.
-     * Instantiate it only within subclasses of <Foo>.
+     * Instantiate it only within subclasses of <code>Foo</code>.
      */
     public class FocusHandler implements FocusListener {
         // NOTE: This class exists only for backward compatability. All
@@ -1892,7 +1892,7 @@
      * Please refer to the key bindings specification for further details.
      * <p>
      * This class should be treated as a &quot;protected&quot; inner class.
-     * Instantiate it only within subclasses of <Foo>.
+     * Instantiate it only within subclasses of <code>Foo</code>.
      */
     public class ActionScroller extends AbstractAction {
         // NOTE: This class exists only for backward compatability. All
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -44,7 +44,7 @@
 
 
 /**
- * A Basic L&F implementation of the SplitPaneUI.
+ * A Basic L&amp;F implementation of the SplitPaneUI.
  *
  * @author Scott Violet
  * @author Steve Wilson
@@ -1060,7 +1060,7 @@
 
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     public void paint(Graphics g, JComponent jc) {
         if (!painted && splitPane.getDividerLocation()<0) {
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -43,7 +43,7 @@
 import sun.swing.UIAction;
 
 /**
- * A Basic L&F implementation of TabbedPaneUI.
+ * A Basic L&amp;F implementation of TabbedPaneUI.
  *
  * @author Amy Fowler
  * @author Philip Milne
@@ -669,7 +669,7 @@
      *
      * @param tab index of tab to get baseline for
      * @exception IndexOutOfBoundsException if index is out of range
-     *            (index < 0 || index >= tab count)
+     *            (index &lt; 0 || index &gt;= tab count)
      * @return baseline or a value &lt; 0 indicating there is no reasonable
      *                  baseline
      * @since 1.6
@@ -2620,7 +2620,7 @@
                     // Never move a TAB down a run if it is in the first column.
                     // Even if there isn't enough room, moving it to a fresh
                     // line won't help.
-                    if (rect.x != 2 + insets.left && rect.x + rect.width > returnAt) {
+                    if (rect.x != x && rect.x + rect.width > returnAt) {
                         if (runCount > tabRuns.length - 1) {
                             expandTabRunsArray();
                         }
@@ -2648,7 +2648,7 @@
                     // Never move a TAB over a run if it is in the first run.
                     // Even if there isn't enough room, moving it to a fresh
                     // column won't help.
-                    if (rect.y != 2 + insets.top && rect.y + rect.height > returnAt) {
+                    if (rect.y != y && rect.y + rect.height > returnAt) {
                         if (runCount > tabRuns.length - 1) {
                             expandTabRunsArray();
                         }
@@ -3350,6 +3350,7 @@
         private void updateView() {
             int tabPlacement = tabPane.getTabPlacement();
             int tabCount = tabPane.getTabCount();
+            assureRectsCreated(tabCount);
             Rectangle vpRect = viewport.getBounds();
             Dimension viewSize = viewport.getViewSize();
             Rectangle viewRect = viewport.getViewRect();
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicTextUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -1012,7 +1012,7 @@
      * this translation to be computed.
      *
      * @param tc the text component for which this UI is installed
-     * @param pos the local location in the model to translate >= 0
+     * @param pos the local location in the model to translate &gt;= 0
      * @return the coordinates as a rectangle, null if the model is not painted
      * @exception BadLocationException  if the given position does not
      *   represent a valid location in the associated document
@@ -1029,7 +1029,7 @@
      * this translation to be computed.
      *
      * @param tc the text component for which this UI is installed
-     * @param pos the local location in the model to translate >= 0
+     * @param pos the local location in the model to translate &gt;= 0
      * @return the coordinates as a rectangle, null if the model is not painted
      * @exception BadLocationException  if the given position does not
      *   represent a valid location in the associated document
@@ -1066,7 +1066,7 @@
      * @param tc the text component for which this UI is installed
      * @param pt the location in the view to translate.  This
      *  should be in the same coordinate system as the mouse events.
-     * @return the offset from the start of the document >= 0,
+     * @return the offset from the start of the document &gt;= 0,
      *   -1 if not painted
      * @see TextUI#viewToModel
      */
@@ -1083,7 +1083,7 @@
      * @param tc the text component for which this UI is installed
      * @param pt the location in the view to translate.  This
      *  should be in the same coordinate system as the mouse events.
-     * @return the offset from the start of the document >= 0,
+     * @return the offset from the start of the document &gt;= 0,
      *   -1 if the component doesn't yet have a positive size.
      * @see TextUI#viewToModel
      */
@@ -1141,8 +1141,8 @@
      * the view is not currently painted.
      *
      * @param tc the text component for which this UI is installed
-     * @param p0 the beginning of the range >= 0
-     * @param p1 the end of the range >= p0
+     * @param p0 the beginning of the range &gt;= 0
+     * @param p1 the end of the range &gt;= p0
      * @see TextUI#damageRange
      */
     public void damageRange(JTextComponent tc, int p0, int p1) {
@@ -1153,8 +1153,8 @@
      * Causes the portion of the view responsible for the
      * given part of the model to be repainted.
      *
-     * @param p0 the beginning of the range >= 0
-     * @param p1 the end of the range >= p0
+     * @param p0 the beginning of the range &gt;= 0
+     * @param p1 the end of the range &gt;= p0
      */
     public void damageRange(JTextComponent t, int p0, int p1,
                             Position.Bias p0Bias, Position.Bias p1Bias) {
@@ -1271,8 +1271,8 @@
      * it is unable to represent the part of the element.
      *
      * @param elem the element
-     * @param p0 the starting offset >= 0
-     * @param p1 the ending offset >= p0
+     * @param p0 the starting offset &gt;= 0
+     * @param p1 the ending offset &gt;= p0
      * @return the view
      */
     public View create(Element elem, int p0, int p1) {
@@ -1471,7 +1471,7 @@
          * the model.  This is implemented to return the index of the only
          * child.
          *
-         * @param pos the position >= 0
+         * @param pos the position &gt;= 0
          * @return  index of the view representing the given position, or
          *   -1 if no view represents that position
          * @since 1.3
@@ -1515,11 +1515,11 @@
          * Provides a mapping from the document model coordinate space
          * to the coordinate space of the view mapped to it.
          *
-         * @param p0 the position to convert >= 0
+         * @param p0 the position to convert &gt;= 0
          * @param b0 the bias toward the previous character or the
          *  next character represented by p0, in case the
          *  position is a boundary of two views.
-         * @param p1 the position to convert >= 0
+         * @param p1 the position to convert &gt;= 0
          * @param b1 the bias toward the previous character or the
          *  next character represented by p1, in case the
          *  position is a boundary of two views.
@@ -1561,7 +1561,7 @@
          * they might not be in the same order found in the model, or they just
          * might not allow access to some of the locations in the model.
          *
-         * @param pos the position to convert >= 0
+         * @param pos the position to convert &gt;= 0
          * @param a the allocated region to render into
          * @param direction the direction from the current position that can
          *  be thought of as the arrow keys typically found on a keyboard.
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicToolBarSeparatorUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicToolBarSeparatorUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -37,7 +37,7 @@
 
 
 /**
- * A Basic L&F implementation of ToolBarSeparatorUI.  This implementation
+ * A Basic L&amp;F implementation of ToolBarSeparatorUI.  This implementation
  * is a "combined" view/controller.
  * <p>
  *
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicToolBarUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicToolBarUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -42,7 +42,7 @@
 
 
 /**
- * A Basic L&F implementation of ToolBarUI.  This implementation
+ * A Basic L&amp;F implementation of ToolBarUI.  This implementation
  * is a "combined" view/controller.
  * <p>
  *
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicToolTipUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicToolTipUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -40,7 +40,7 @@
 
 
 /**
- * Standard tool tip L&F.
+ * Standard tool tip L&amp;F.
  * <p>
  *
  * @author Dave Moore
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicTreeUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicTreeUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -42,13 +42,14 @@
 import javax.swing.tree.*;
 import javax.swing.text.Position;
 import javax.swing.plaf.basic.DragRecognitionSupport.BeforeDrag;
+import sun.awt.AWTAccessor;
 import sun.swing.SwingUtilities2;
 
 import sun.swing.DefaultLookup;
 import sun.swing.UIAction;
 
 /**
- * The basic L&F for a hierarchical data structure.
+ * The basic L&amp;F for a hierarchical data structure.
  * <p>
  *
  * @author Scott Violet
@@ -2165,11 +2166,7 @@
                                            nodeBounds.width,
                                            nodeBounds.height);
                 editingPath = path;
-                if (editingComponent instanceof JComponent) {
-                    ((JComponent)editingComponent).revalidate();
-                } else {
-                    editingComponent.validate();
-                }
+                AWTAccessor.getComponentAccessor().revalidateSynchronously(editingComponent);
                 editingComponent.repaint();
                 if(cellEditor.shouldSelectCell(event)) {
                     stopEditingInCompleteEditing = false;
--- a/jdk/src/share/classes/javax/swing/plaf/basic/DefaultMenuLayout.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/DefaultMenuLayout.java	Thu Sep 26 17:18:12 2013 -0700
@@ -34,7 +34,7 @@
 /**
  * The default layout manager for Popup menus and menubars.  This
  * class is an extension of BoxLayout which adds the UIResource tag
- * so that pluggable L&Fs can distinguish it from user-installed
+ * so that pluggable L&amp;Fs can distinguish it from user-installed
  * layout managers on menus.
  *
  * @author Georges Saab
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalBorders.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalBorders.java	Thu Sep 26 17:18:12 2013 -0700
@@ -43,7 +43,7 @@
 
 
 /**
- * Factory object that can vend Borders appropriate for the metal L & F.
+ * Factory object that can vend Borders appropriate for the metal L &amp; F.
  * @author Steve Wilson
  */
 
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -46,7 +46,7 @@
 import sun.swing.*;
 
 /**
- * Metal L&F implementation of a FileChooser.
+ * Metal L&amp;F implementation of a FileChooser.
  *
  * @author Jeff Dinkins
  */
@@ -1067,69 +1067,9 @@
     /**
      * Data model for a type-face selection combo-box.
      */
-    protected class FilterComboBoxModel extends AbstractListModel<Object> implements ComboBoxModel<Object>, PropertyChangeListener {
-        protected FileFilter[] filters;
-        protected FilterComboBoxModel() {
-            super();
-            filters = getFileChooser().getChoosableFileFilters();
-        }
-
-        public void propertyChange(PropertyChangeEvent e) {
-            String prop = e.getPropertyName();
-            if(prop == JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY) {
-                filters = (FileFilter[]) e.getNewValue();
-                fireContentsChanged(this, -1, -1);
-            } else if (prop == JFileChooser.FILE_FILTER_CHANGED_PROPERTY) {
-                fireContentsChanged(this, -1, -1);
-            }
-        }
-
-        public void setSelectedItem(Object filter) {
-            if(filter != null) {
-                getFileChooser().setFileFilter((FileFilter) filter);
-                fireContentsChanged(this, -1, -1);
-            }
-        }
-
-        public Object getSelectedItem() {
-            // Ensure that the current filter is in the list.
-            // NOTE: we shouldnt' have to do this, since JFileChooser adds
-            // the filter to the choosable filters list when the filter
-            // is set. Lets be paranoid just in case someone overrides
-            // setFileFilter in JFileChooser.
-            FileFilter currentFilter = getFileChooser().getFileFilter();
-            boolean found = false;
-            if(currentFilter != null) {
-                for (FileFilter filter : filters) {
-                    if (filter == currentFilter) {
-                        found = true;
-                    }
-                }
-                if(found == false) {
-                    getFileChooser().addChoosableFileFilter(currentFilter);
-                }
-            }
-            return getFileChooser().getFileFilter();
-        }
-
-        public int getSize() {
-            if(filters != null) {
-                return filters.length;
-            } else {
-                return 0;
-            }
-        }
-
-        public Object getElementAt(int index) {
-            if(index > getSize() - 1) {
-                // This shouldn't happen. Try to recover gracefully.
-                return getFileChooser().getFileFilter();
-            }
-            if(filters != null) {
-                return filters[index];
-            } else {
-                return null;
-            }
+    protected class FilterComboBoxModel extends AbstractFilterComboBoxModel {
+        protected JFileChooser getFileChooser() {
+            return MetalFileChooserUI.this.getFileChooser();
         }
     }
 
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalLabelUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalLabelUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -37,7 +37,7 @@
 
 
 /**
- * A Windows L&F implementation of LabelUI.  This implementation
+ * A Windows L&amp;F implementation of LabelUI.  This implementation
  * is completely static, i.e. there's only one UIView implementation
  * that's shared by all JLabel objects.
  *
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalLookAndFeel.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalLookAndFeel.java	Thu Sep 26 17:18:12 2013 -0700
@@ -291,8 +291,7 @@
      * Populates {@code table} with system colors. The following values are
      * added to {@code table}:
      * <table border="1" cellpadding="1" cellspacing="0"
-     *         summary="Metal's system color mapping"
-     *         valign="top" >
+     *         summary="Metal's system color mapping">
      *  <tr valign="top"  align="left">
      *    <th bgcolor="#CCCCFF" align="left">Key
      *    <th bgcolor="#CCCCFF" align="left">Value
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalPopupMenuSeparatorUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalPopupMenuSeparatorUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -35,7 +35,7 @@
 
 
 /**
- * A Metal L&F implementation of PopupMenuSeparatorUI.  This implementation
+ * A Metal L&amp;F implementation of PopupMenuSeparatorUI.  This implementation
  * is a "combined" view/controller.
  *
  * @author Jeff Shapiro
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalScrollPaneUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalScrollPaneUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -37,7 +37,7 @@
 
 
 /**
- * A Metal L&F implementation of ScrollPaneUI.
+ * A Metal L&amp;F implementation of ScrollPaneUI.
  * <p>
  * <strong>Warning:</strong>
  * Serialized objects of this class will not be compatible with
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalSeparatorUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalSeparatorUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -36,7 +36,7 @@
 
 
 /**
- * A Metal L&F implementation of SeparatorUI.  This implementation
+ * A Metal L&amp;F implementation of SeparatorUI.  This implementation
  * is a "combined" view/controller.
  * <p>
  * <strong>Warning:</strong>
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalSliderUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalSliderUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -37,7 +37,7 @@
 import javax.swing.plaf.*;
 
 /**
- * A Java L&F implementation of SliderUI.
+ * A Java L&amp;F implementation of SliderUI.
  * <p>
  * <strong>Warning:</strong>
  * Serialized objects of this class will not be compatible with
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalTabbedPaneUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalTabbedPaneUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -776,7 +776,7 @@
     }
 
     /**
-     * Overridden to do nothing for the Java L&F.
+     * Overridden to do nothing for the Java L&amp;F.
      */
     protected int getTabLabelShiftX( int tabPlacement, int tabIndex, boolean isSelected ) {
         return 0;
@@ -784,7 +784,7 @@
 
 
     /**
-     * Overridden to do nothing for the Java L&F.
+     * Overridden to do nothing for the Java L&amp;F.
      */
     protected int getTabLabelShiftY( int tabPlacement, int tabIndex, boolean isSelected ) {
         return 0;
--- a/jdk/src/share/classes/javax/swing/plaf/metal/MetalToolTipUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/metal/MetalToolTipUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -38,7 +38,7 @@
 
 
 /**
- * A Metal L&F extension of BasicToolTipUI.
+ * A Metal L&amp;F extension of BasicToolTipUI.
  * <p>
  * <strong>Warning:</strong>
  * Serialized objects of this class will not be compatible with
--- a/jdk/src/share/classes/javax/swing/plaf/nimbus/AbstractRegionPainter.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/nimbus/AbstractRegionPainter.java	Thu Sep 26 17:18:12 2013 -0700
@@ -137,7 +137,7 @@
     protected AbstractRegionPainter() { }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public final void paint(Graphics2D g, JComponent c, int w, int h) {
@@ -535,11 +535,11 @@
          * @param maxH The maximium scale in the horizontal direction to use before punting and redrawing from scratch.
          *             For example, if maxH is 2, then we will attempt to scale any cached images up to 2x the canvas
          *             width before redrawing from scratch. Reasonable maxH values may improve painting performance.
-         *             If set too high, then you may get poor looking graphics at higher zoom levels. Must be >= 1.
+         *             If set too high, then you may get poor looking graphics at higher zoom levels. Must be &gt;= 1.
          * @param maxV The maximium scale in the vertical direction to use before punting and redrawing from scratch.
          *             For example, if maxV is 2, then we will attempt to scale any cached images up to 2x the canvas
          *             height before redrawing from scratch. Reasonable maxV values may improve painting performance.
-         *             If set too high, then you may get poor looking graphics at higher zoom levels. Must be >= 1.
+         *             If set too high, then you may get poor looking graphics at higher zoom levels. Must be &gt;= 1.
          */
         public PaintContext(Insets insets, Dimension canvasSize, boolean inverted,
                             CacheMode cacheMode, double maxH, double maxV) {
--- a/jdk/src/share/classes/javax/swing/plaf/nimbus/NimbusLookAndFeel.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/nimbus/NimbusLookAndFeel.java	Thu Sep 26 17:18:12 2013 -0700
@@ -124,7 +124,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override public UIDefaults getDefaults() {
         if (uiDefaults == null){
@@ -261,7 +261,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      * @return {@code true}
      */
     @Override public boolean shouldUpdateStyleOnAncestorChanged() {
@@ -269,7 +269,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      *
      * <p>Overridden to return {@code true} when one of the following
      * properties change:
--- a/jdk/src/share/classes/javax/swing/plaf/nimbus/NimbusStyle.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/nimbus/NimbusStyle.java	Thu Sep 26 17:18:12 2013 -0700
@@ -218,7 +218,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      *
      * Overridden to cause this style to populate itself with data from
      * UIDefaults, if necessary.
@@ -472,7 +472,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      *
      * Overridden to cause this style to populate itself with data from
      * UIDefaults, if necessary.
@@ -519,7 +519,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      *
      * <p>Overridden to cause this style to populate itself with data from
      * UIDefaults, if necessary.</p>
@@ -562,7 +562,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      *
      * Overridden to cause this style to populate itself with data from
      * UIDefaults, if necessary. If a value named "font" is not found in
@@ -590,7 +590,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      *
      * Returns the SynthPainter for this style, which ends up delegating to
      * the Painters installed in this style.
@@ -600,7 +600,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      *
      * Overridden to cause this style to populate itself with data from
      * UIDefaults, if necessary. If opacity is not specified in UI defaults,
@@ -616,7 +616,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      *
      * <p>Overridden to cause this style to populate itself with data from
      * UIDefaults, if necessary.</p>
@@ -628,7 +628,7 @@
      * Button.opacity
      * Button.Enabled.foreground
      * Button.Enabled+Selected.background
-     * </pre></p>
+     * </pre>
      *
      * <p>In this example, suppose you were in the Enabled+Selected state and
      * searched for "foreground". In this case, we first check for
--- a/jdk/src/share/classes/javax/swing/plaf/synth/Region.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/Region.java	Thu Sep 26 17:18:12 2013 -0700
@@ -62,10 +62,10 @@
  * The following <a href="doc-files/synthFileFormat.html">xml</a>
  * accomplishes the same thing:
  * <pre>
- * &lt;style id="splitPaneStyle">
+ * &lt;style id="splitPaneStyle"&gt;
  *   ...
- * &lt;/style>
- * &lt;bind style="splitPaneStyle" type="region" key="SplitPane"/>
+ * &lt;/style&gt;
+ * &lt;bind style="splitPaneStyle" type="region" key="SplitPane"/&gt;
  * </pre>
  *
  * @since 1.5
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthButtonUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthButtonUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -34,7 +34,7 @@
 import javax.swing.text.View;
 
 /**
- * Provides the Synth L&F UI delegate for
+ * Provides the Synth L&amp;F UI delegate for
  * {@link javax.swing.JButton}.
  *
  * @author Scott Violet
@@ -55,7 +55,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installDefaults(AbstractButton b) {
@@ -65,7 +65,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installListeners(AbstractButton b) {
@@ -109,7 +109,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallListeners(AbstractButton b) {
@@ -118,7 +118,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallDefaults(AbstractButton b) {
@@ -130,7 +130,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public SynthContext getContext(JComponent c) {
@@ -182,7 +182,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public int getBaseline(JComponent c, int width, int height) {
@@ -305,7 +305,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
@@ -449,7 +449,7 @@
     // ********************************
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public Dimension getMinimumSize(JComponent c) {
@@ -470,7 +470,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public Dimension getPreferredSize(JComponent c) {
@@ -491,7 +491,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public Dimension getMaximumSize(JComponent c) {
@@ -525,7 +525,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void propertyChange(PropertyChangeEvent e) {
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthCheckBoxMenuItemUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthCheckBoxMenuItemUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -32,7 +32,7 @@
 
 
 /**
- * Provides the Synth L&F UI delegate for
+ * Provides the Synth L&amp;F UI delegate for
  * {@link javax.swing.JCheckBoxMenuItem}.
  *
  * @author Leif Samuelsson
@@ -54,7 +54,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected String getPropertyPrefix() {
@@ -68,7 +68,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthCheckBoxUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthCheckBoxUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -31,7 +31,7 @@
 
 
 /**
- * Provides the Synth L&F UI delegate for
+ * Provides the Synth L&amp;F UI delegate for
  * {@link javax.swing.JCheckBox}.
  *
  * @author Jeff Dinkins
@@ -53,7 +53,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected String getPropertyPrefix() {
@@ -67,7 +67,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthColorChooserUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthColorChooserUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -36,7 +36,7 @@
 
 
 /**
- * Provides the Synth L&F UI delegate for
+ * Provides the Synth L&amp;F UI delegate for
  * {@link javax.swing.JColorChooser}.
  *
  * @author Tom Santos
@@ -58,7 +58,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected AbstractColorChooserPanel[] createDefaultChoosers() {
@@ -74,7 +74,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installDefaults() {
@@ -89,7 +89,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallDefaults() {
@@ -102,7 +102,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installListeners() {
@@ -111,7 +111,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallListeners() {
@@ -120,7 +120,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public SynthContext getContext(JComponent c) {
@@ -188,7 +188,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
@@ -197,7 +197,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void propertyChange(PropertyChangeEvent e) {
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthComboBoxUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthComboBoxUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -35,7 +35,7 @@
 import java.beans.PropertyChangeEvent;
 
 /**
- * Provides the Synth L&F UI delegate for
+ * Provides the Synth L&amp;F UI delegate for
  * {@link javax.swing.JComboBox}.
  *
  * @author Scott Violet
@@ -103,7 +103,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      *
      * Overridden to ensure that ButtonHandler is created prior to any of
      * the other installXXX methods, since several of them reference
@@ -152,7 +152,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installListeners() {
@@ -163,7 +163,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void uninstallUI(JComponent c) {
@@ -175,7 +175,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallDefaults() {
@@ -187,7 +187,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallListeners() {
@@ -200,7 +200,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public SynthContext getContext(JComponent c) {
@@ -251,7 +251,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected ComboPopup createPopup() {
@@ -261,7 +261,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected ListCellRenderer createRenderer() {
@@ -269,7 +269,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected ComboBoxEditor createEditor() {
@@ -281,7 +281,7 @@
     //======================
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void propertyChange(PropertyChangeEvent e) {
@@ -291,7 +291,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected JButton createArrowButton() {
@@ -360,7 +360,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthDesktopIconUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthDesktopIconUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -34,7 +34,7 @@
 
 
 /**
- * Provides the Synth L&F UI delegate for a minimized internal frame on a desktop.
+ * Provides the Synth L&amp;F UI delegate for a minimized internal frame on a desktop.
  *
  * @author Joshua Outwater
  * @since 1.7
@@ -55,7 +55,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installComponents() {
@@ -82,7 +82,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installListeners() {
@@ -96,7 +96,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallListeners() {
@@ -109,7 +109,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installDefaults() {
@@ -123,7 +123,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallDefaults() {
@@ -134,7 +134,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public SynthContext getContext(JComponent c) {
@@ -202,7 +202,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthDesktopPaneUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthDesktopPaneUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -34,7 +34,7 @@
 import java.awt.*;
 
 /**
- * Provides the Synth L&F UI delegate for
+ * Provides the Synth L&amp;F UI delegate for
  * {@link javax.swing.JDesktopPane}.
  *
  * @author Joshua Outwater
@@ -58,7 +58,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installListeners() {
@@ -73,7 +73,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installDefaults() {
@@ -123,7 +123,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallListeners() {
@@ -136,7 +136,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallDefaults() {
@@ -164,7 +164,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installDesktopManager() {
@@ -180,7 +180,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallDesktopManager() {
@@ -422,7 +422,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public SynthContext getContext(JComponent c) {
@@ -489,7 +489,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
@@ -498,7 +498,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void propertyChange(PropertyChangeEvent evt) {
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthEditorPaneUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthEditorPaneUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -33,7 +33,7 @@
 import java.beans.PropertyChangeEvent;
 
 /**
- * Provides the Synth L&F UI delegate for
+ * Provides the Synth L&amp;F UI delegate for
  * {@link javax.swing.JEditorPane}.
  *
  * @author  Shannon Hickey
@@ -58,7 +58,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installDefaults() {
@@ -74,7 +74,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallDefaults() {
@@ -131,7 +131,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public SynthContext getContext(JComponent c) {
@@ -181,7 +181,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void paintBackground(Graphics g) {
@@ -194,7 +194,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthFormattedTextFieldUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthFormattedTextFieldUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -29,7 +29,7 @@
 import javax.swing.plaf.ComponentUI;
 
 /**
- * Provides the Synth L&F UI delegate for
+ * Provides the Synth L&amp;F UI delegate for
  * {@link javax.swing.JFormattedTextField}.
  *
  * @since 1.7
@@ -58,7 +58,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     void paintBackground(SynthContext context, Graphics g, JComponent c) {
@@ -67,7 +67,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthInternalFrameUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthInternalFrameUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -34,7 +34,7 @@
 
 
 /**
- * Provides the Synth L&F UI delegate for
+ * Provides the Synth L&amp;F UI delegate for
  * {@link javax.swing.JInternalFrame}.
  *
  * @author David Kloba
@@ -61,7 +61,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void installDefaults() {
@@ -70,7 +70,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installListeners() {
@@ -79,7 +79,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallComponents() {
@@ -90,7 +90,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallListeners() {
@@ -118,7 +118,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallDefaults() {
@@ -133,7 +133,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public SynthContext getContext(JComponent c) {
@@ -150,7 +150,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected JComponent createNorthPane(JInternalFrame w) {
@@ -160,7 +160,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected ComponentListener createComponentListener() {
@@ -244,7 +244,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
@@ -254,7 +254,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void propertyChange(PropertyChangeEvent evt) {
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthLabelUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthLabelUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -37,7 +37,7 @@
 import java.beans.PropertyChangeEvent;
 
 /**
- * Provides the Synth L&F UI delegate for
+ * Provides the Synth L&amp;F UI delegate for
  * {@link javax.swing.JLabel}.
  *
  * @author Scott Violet
@@ -57,7 +57,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installDefaults(JLabel c) {
@@ -71,7 +71,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallDefaults(JLabel c){
@@ -83,7 +83,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public SynthContext getContext(JComponent c) {
@@ -105,7 +105,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public int getBaseline(JComponent c, int width, int height) {
@@ -218,7 +218,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
@@ -227,7 +227,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public Dimension getPreferredSize(JComponent c) {
@@ -248,7 +248,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public Dimension getMinimumSize(JComponent c) {
@@ -269,7 +269,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public Dimension getMaximumSize(JComponent c) {
@@ -290,7 +290,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void propertyChange(PropertyChangeEvent e) {
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthListUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthListUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -34,7 +34,7 @@
 import java.beans.PropertyChangeEvent;
 
 /**
- * Provides the Synth L&F UI delegate for
+ * Provides the Synth L&amp;F UI delegate for
  * {@link javax.swing.JList}.
  *
  * @author Scott Violet
@@ -80,7 +80,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
@@ -89,7 +89,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installListeners() {
@@ -98,7 +98,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void propertyChange(PropertyChangeEvent e) {
@@ -108,7 +108,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallListeners() {
@@ -117,7 +117,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installDefaults() {
@@ -166,7 +166,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallDefaults() {
@@ -180,7 +180,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public SynthContext getContext(JComponent c) {
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthMenuBarUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthMenuBarUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -32,7 +32,7 @@
 import javax.swing.plaf.basic.*;
 
 /**
- * Provides the Synth L&F UI delegate for
+ * Provides the Synth L&amp;F UI delegate for
  * {@link javax.swing.JMenuBar}.
  *
  * @author Scott Violet
@@ -53,7 +53,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installDefaults() {
@@ -65,7 +65,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installListeners() {
@@ -87,7 +87,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallDefaults() {
@@ -99,7 +99,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallListeners() {
@@ -108,7 +108,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public SynthContext getContext(JComponent c) {
@@ -175,7 +175,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
@@ -184,7 +184,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void propertyChange(PropertyChangeEvent e) {
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthMenuItemUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthMenuItemUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -34,7 +34,7 @@
 
 
 /**
- * Provides the Synth L&F UI delegate for
+ * Provides the Synth L&amp;F UI delegate for
  * {@link javax.swing.JMenuItem}.
  *
  * @author Georges Saab
@@ -59,7 +59,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void uninstallUI(JComponent c) {
@@ -73,7 +73,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installDefaults() {
@@ -81,7 +81,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installListeners() {
@@ -134,7 +134,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallDefaults() {
@@ -153,7 +153,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallListeners() {
@@ -162,7 +162,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public SynthContext getContext(JComponent c) {
@@ -206,7 +206,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected Dimension getPreferredMenuItemSize(JComponent c,
@@ -290,7 +290,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
@@ -299,7 +299,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void propertyChange(PropertyChangeEvent e) {
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthMenuLayout.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthMenuLayout.java	Thu Sep 26 17:18:12 2013 -0700
@@ -31,7 +31,7 @@
 import java.awt.Dimension;
 
 /**
- * @inheritDoc
+ * {@inheritDoc}
  *
  * @author Georges Saab
  */
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthMenuUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthMenuUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -32,7 +32,7 @@
 import sun.swing.MenuItemLayoutHelper;
 
 /**
- * Provides the Synth L&F UI delegate for
+ * Provides the Synth L&amp;F UI delegate for
  * {@link javax.swing.JMenu}.
  *
  * @author Georges Saab
@@ -56,7 +56,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installDefaults() {
@@ -64,7 +64,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installListeners() {
@@ -120,7 +120,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void uninstallUI(JComponent c) {
@@ -134,7 +134,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallDefaults() {
@@ -153,7 +153,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallListeners() {
@@ -162,7 +162,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public SynthContext getContext(JComponent c) {
@@ -207,7 +207,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected Dimension getPreferredMenuItemSize(JComponent c,
@@ -286,7 +286,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
@@ -295,7 +295,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void propertyChange(PropertyChangeEvent e) {
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthOptionPaneUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthOptionPaneUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -33,7 +33,7 @@
 import sun.swing.DefaultLookup;
 
 /**
- * Provides the Synth L&F UI delegate for
+ * Provides the Synth L&amp;F UI delegate for
  * {@link javax.swing.JOptionPane}.
  *
  * @author James Gosling
@@ -56,7 +56,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installDefaults() {
@@ -64,7 +64,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installListeners() {
@@ -92,7 +92,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallDefaults() {
@@ -104,7 +104,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallListeners() {
@@ -113,7 +113,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installComponents() {
@@ -132,7 +132,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public SynthContext getContext(JComponent c) {
@@ -199,7 +199,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
@@ -208,7 +208,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void propertyChange(PropertyChangeEvent e) {
@@ -218,7 +218,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected boolean getSizeButtonsToSameWidth() {
@@ -273,7 +273,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected Container createSeparator() {
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthPainter.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthPainter.java	Thu Sep 26 17:18:12 2013 -0700
@@ -41,12 +41,12 @@
  * example registers a painter for all <code>JButton</code>s that will
  * render the image <code>myImage.png</code>:
  * <pre>
- *  &lt;style id="buttonStyle">
+ *  &lt;style id="buttonStyle"&gt;
  *    &lt;imagePainter path="myImage.png" sourceInsets="2 2 2 2"
- *                  paintCenter="true" stretch="true"/>
- *    &lt;insets top="2" bottom="2" left="2" right="2"/>
- *  &lt;/style>
- *  &lt;bind style="buttonStyle" type="REGION" key="button"/>
+ *                  paintCenter="true" stretch="true"/&gt;
+ *    &lt;insets top="2" bottom="2" left="2" right="2"/&gt;
+ *  &lt;/style&gt;
+ *  &lt;bind style="buttonStyle" type="REGION" key="button"/&gt;
  *</pre>
  * <p>
  * <code>SynthPainter</code> is abstract in so far as it does no painting,
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthPanelUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthPanelUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -32,7 +32,7 @@
 import java.beans.*;
 
 /**
- * Provides the Synth L&F UI delegate for
+ * Provides the Synth L&amp;F UI delegate for
  * {@link javax.swing.JPanel}.
  *
  * @author Steve Wilson
@@ -53,7 +53,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void installUI(JComponent c) {
@@ -64,7 +64,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void uninstallUI(JComponent c) {
@@ -93,7 +93,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installDefaults(JPanel p) {
@@ -101,7 +101,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallDefaults(JPanel p) {
@@ -119,7 +119,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public SynthContext getContext(JComponent c) {
@@ -187,7 +187,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
@@ -196,7 +196,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void propertyChange(PropertyChangeEvent pce) {
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthPasswordFieldUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthPasswordFieldUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -31,7 +31,7 @@
 import javax.swing.plaf.ComponentUI;
 
 /**
- * Provides the Synth L&F UI delegate for
+ * Provides the Synth L&amp;F UI delegate for
  * {@link javax.swing.JPasswordField}.
  *
  * @author  Shannon Hickey
@@ -73,7 +73,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     void paintBackground(SynthContext context, Graphics g, JComponent c) {
@@ -82,7 +82,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
@@ -91,7 +91,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installKeyboardActions() {
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthPopupMenuUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthPopupMenuUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -33,7 +33,7 @@
 import java.beans.PropertyChangeEvent;
 
 /**
- * Provides the Synth L&F UI delegate for
+ * Provides the Synth L&amp;F UI delegate for
  * {@link javax.swing.JPopupMenu}.
  *
  * @author Georges Saab
@@ -56,7 +56,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void installDefaults() {
@@ -81,7 +81,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installListeners() {
@@ -90,7 +90,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallDefaults() {
@@ -106,7 +106,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallListeners() {
@@ -115,7 +115,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public SynthContext getContext(JComponent c) {
@@ -182,7 +182,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
@@ -191,7 +191,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void propertyChange(PropertyChangeEvent e) {
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthProgressBarUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthProgressBarUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -35,7 +35,7 @@
 import sun.swing.SwingUtilities2;
 
 /**
- * Provides the Synth L&F UI delegate for
+ * Provides the Synth L&amp;F UI delegate for
  * {@link javax.swing.JProgressBar}.
  *
  * @author Joshua Outwater
@@ -61,7 +61,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installListeners() {
@@ -70,7 +70,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallListeners() {
@@ -79,7 +79,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installDefaults() {
@@ -118,7 +118,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallDefaults() {
@@ -130,7 +130,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public SynthContext getContext(JComponent c) {
@@ -147,7 +147,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public int getBaseline(JComponent c, int width, int height) {
@@ -165,7 +165,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected Rectangle getBox(Rectangle r) {
@@ -177,7 +177,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void setAnimationIndex(int newValue) {
@@ -386,7 +386,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
@@ -396,7 +396,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void propertyChange(PropertyChangeEvent e) {
@@ -407,7 +407,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public Dimension getPreferredSize(JComponent c) {
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthRadioButtonMenuItemUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthRadioButtonMenuItemUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -30,7 +30,7 @@
 import javax.swing.plaf.*;
 
 /**
- * Provides the Synth L&F UI delegate for
+ * Provides the Synth L&amp;F UI delegate for
  * {@link javax.swing.JRadioButtonMenuItem}.
  *
  * @author Georges Saab
@@ -50,7 +50,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected String getPropertyPrefix() {
@@ -64,7 +64,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthRadioButtonUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthRadioButtonUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -30,7 +30,7 @@
 import javax.swing.plaf.*;
 
 /**
- * Provides the Synth L&F UI delegate for
+ * Provides the Synth L&amp;F UI delegate for
  * {@link javax.swing.JRadioButton}.
  *
  * @author Jeff Dinkins
@@ -52,7 +52,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected String getPropertyPrefix() {
@@ -75,7 +75,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthRootPaneUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthRootPaneUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -32,7 +32,7 @@
 import javax.swing.plaf.basic.BasicRootPaneUI;
 
 /**
- * Provides the Synth L&F UI delegate for
+ * Provides the Synth L&amp;F UI delegate for
  * {@link javax.swing.JRootPane}.
  *
  * @author Scott Violet
@@ -52,7 +52,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installDefaults(JRootPane c){
@@ -60,7 +60,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallDefaults(JRootPane root) {
@@ -72,7 +72,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public SynthContext getContext(JComponent c) {
@@ -152,7 +152,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthScrollBarUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthScrollBarUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -33,7 +33,7 @@
 
 
 /**
- * Provides the Synth L&F UI delegate for
+ * Provides the Synth L&amp;F UI delegate for
  * {@link javax.swing.JScrollBar}.
  *
  * @author Scott Violet
@@ -53,7 +53,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installDefaults() {
@@ -68,7 +68,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void configureScrollBarColors() {
@@ -136,7 +136,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installListeners() {
@@ -145,7 +145,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallListeners() {
@@ -154,7 +154,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallDefaults(){
@@ -177,7 +177,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public SynthContext getContext(JComponent c) {
@@ -212,7 +212,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public boolean getSupportsAbsolutePositioning() {
@@ -283,7 +283,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
@@ -354,7 +354,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected Dimension getMinimumThumbSize() {
@@ -371,7 +371,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected JButton createDecreaseButton(int orientation)  {
@@ -400,7 +400,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected JButton createIncreaseButton(int orientation)  {
@@ -431,7 +431,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void setThumbRollover(boolean active) {
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthScrollPaneUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthScrollPaneUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -41,7 +41,7 @@
 import java.awt.event.FocusEvent;
 
 /**
- * Provides the Synth L&F UI delegate for
+ * Provides the Synth L&amp;F UI delegate for
  * {@link javax.swing.JScrollPane}.
  *
  * @author Scott Violet
@@ -119,7 +119,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
@@ -128,7 +128,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installDefaults(JScrollPane scrollpane) {
@@ -154,7 +154,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installListeners(JScrollPane c) {
@@ -171,7 +171,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallDefaults(JScrollPane c) {
@@ -186,7 +186,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallListeners(JComponent c) {
@@ -203,7 +203,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public SynthContext getContext(JComponent c) {
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthSeparatorUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthSeparatorUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -36,7 +36,7 @@
 import javax.swing.plaf.DimensionUIResource;
 
 /**
- * Provides the Synth L&F UI delegate for
+ * Provides the Synth L&amp;F UI delegate for
  * {@link javax.swing.JSeparator}.
  *
  * @author Shannon Hickey
@@ -58,7 +58,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void installUI(JComponent c) {
@@ -67,7 +67,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void uninstallUI(JComponent c) {
@@ -191,7 +191,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
@@ -202,7 +202,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public Dimension getPreferredSize(JComponent c) {
@@ -224,7 +224,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public Dimension getMinimumSize(JComponent c) {
@@ -232,7 +232,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public Dimension getMaximumSize(JComponent c) {
@@ -240,7 +240,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public SynthContext getContext(JComponent c) {
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthSliderUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthSliderUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -42,7 +42,7 @@
 
 
 /**
- * Provides the Synth L&F UI delegate for
+ * Provides the Synth L&amp;F UI delegate for
  * {@link JSlider}.
  *
  * @author Joshua Outwater
@@ -98,7 +98,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installDefaults(JSlider slider) {
@@ -127,7 +127,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installListeners(JSlider slider) {
@@ -136,7 +136,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallListeners(JSlider slider) {
@@ -200,7 +200,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected TrackListener createTrackListener(JSlider s) {
@@ -231,7 +231,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public int getBaseline(JComponent c, int width, int height) {
@@ -302,7 +302,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public Dimension getPreferredSize(JComponent c)  {
@@ -320,7 +320,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public Dimension getMinimumSize(JComponent c) {
@@ -335,7 +335,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void calculateGeometry() {
@@ -534,7 +534,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void calculateThumbLocation() {
@@ -551,7 +551,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void setThumbLocation(int x, int y) {
@@ -564,7 +564,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected int xPositionForValue(int value) {
@@ -593,7 +593,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected int yPositionForValue(int value, int trackY, int trackHeight) {
@@ -622,7 +622,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public int valueForYPosition(int yPos) {
@@ -651,7 +651,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public int valueForXPosition(int xPos) {
@@ -680,7 +680,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected Dimension getThumbSize() {
@@ -697,7 +697,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void recalculateIfInsetsChanged() {
@@ -714,7 +714,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public SynthContext getContext(JComponent c) {
@@ -851,7 +851,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
@@ -899,7 +899,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void propertyChange(PropertyChangeEvent e) {
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthSpinnerUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthSpinnerUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -32,7 +32,7 @@
 import java.beans.*;
 
 /**
- * Provides the Synth L&F UI delegate for
+ * Provides the Synth L&amp;F UI delegate for
  * {@link javax.swing.JSpinner}.
  *
  * @author Hans Muller
@@ -65,7 +65,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installListeners() {
@@ -81,7 +81,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallListeners() {
@@ -156,7 +156,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected LayoutManager createLayout() {
@@ -165,7 +165,7 @@
 
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected Component createPreviousButton() {
@@ -177,7 +177,7 @@
 
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected Component createNextButton() {
@@ -270,7 +270,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public SynthContext getContext(JComponent c) {
@@ -334,7 +334,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
@@ -439,7 +439,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void propertyChange(PropertyChangeEvent e) {
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthSplitPaneUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthSplitPaneUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -36,7 +36,7 @@
 
 
 /**
- * Provides the Synth L&F UI delegate for
+ * Provides the Synth L&amp;F UI delegate for
  * {@link javax.swing.JSplitPane}.
  *
  * @author Scott Violet
@@ -201,7 +201,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public SynthContext getContext(JComponent c) {
@@ -236,7 +236,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void propertyChange(PropertyChangeEvent e) {
@@ -257,7 +257,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected Component createDefaultNonContinuousLayoutDivider() {
@@ -322,7 +322,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
@@ -343,7 +343,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void finishedPaintingChildren(JSplitPane jc, Graphics g) {
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthTabbedPaneUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthTabbedPaneUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -37,7 +37,7 @@
 import sun.swing.SwingUtilities2;
 
 /**
- * Provides the Synth L&F UI delegate for
+ * Provides the Synth L&amp;F UI delegate for
  * {@link javax.swing.JTabbedPane}.
  *
  * <p>Looks up the {@code selectedTabPadInsets} property from the Style,
@@ -120,7 +120,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installDefaults() {
@@ -183,7 +183,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installListeners() {
@@ -192,7 +192,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallListeners() {
@@ -201,7 +201,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallDefaults() {
@@ -227,7 +227,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public SynthContext getContext(JComponent c) {
@@ -256,7 +256,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected JButton createScrollButton(int direction) {
@@ -272,7 +272,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void propertyChange(PropertyChangeEvent e) {
@@ -282,7 +282,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      *
      * Overridden to keep track of whether the selected tab is also pressed.
      */
@@ -333,7 +333,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected int getTabLabelShiftX(int tabPlacement, int tabIndex, boolean isSelected) {
@@ -345,7 +345,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected int getTabLabelShiftY(int tabPlacement, int tabIndex, boolean isSelected) {
@@ -380,7 +380,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected int getBaseline(int tab) {
@@ -404,7 +404,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
@@ -556,7 +556,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void setRolloverTab(int index) {
@@ -750,7 +750,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected int calculateMaxTabHeight(int tabPlacement) {
@@ -766,7 +766,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected int calculateTabWidth(int tabPlacement, int tabIndex,
@@ -797,7 +797,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected int calculateMaxTabWidth(int tabPlacement) {
@@ -813,7 +813,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected Insets getTabInsets(int tabPlacement, int tabIndex) {
@@ -823,7 +823,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected FontMetrics getFontMetrics() {
@@ -867,7 +867,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      *
      * Overridden to create a TabbedPaneLayout subclass which takes into
      * account tabOverlap.
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthTableHeaderUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthTableHeaderUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -35,7 +35,7 @@
 import sun.swing.table.*;
 
 /**
- * Provides the Synth L&F UI delegate for
+ * Provides the Synth L&amp;F UI delegate for
  * {@link javax.swing.table.JTableHeader}.
  *
  * @author Alan Chung
@@ -64,7 +64,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installDefaults() {
@@ -89,7 +89,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installListeners() {
@@ -98,7 +98,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallDefaults() {
@@ -114,7 +114,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallListeners() {
@@ -174,7 +174,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
@@ -185,7 +185,7 @@
 // SynthUI
 //
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public SynthContext getContext(JComponent c) {
@@ -198,7 +198,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void rolloverColumnUpdated(int oldColumn, int newColumn) {
@@ -207,7 +207,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void propertyChange(PropertyChangeEvent evt) {
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthTableUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthTableUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -54,7 +54,7 @@
 import javax.swing.table.TableColumnModel;
 
 /**
- * Provides the Synth L&F UI delegate for
+ * Provides the Synth L&amp;F UI delegate for
  * {@link javax.swing.JTable}.
  *
  * @author Philip Milne
@@ -202,7 +202,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallDefaults() {
@@ -225,7 +225,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallListeners() {
@@ -238,7 +238,7 @@
     //
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public SynthContext getContext(JComponent c) {
@@ -278,7 +278,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
@@ -696,7 +696,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void propertyChange(PropertyChangeEvent event) {
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthTextAreaUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthTextAreaUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -66,7 +66,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installDefaults() {
@@ -77,7 +77,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallDefaults() {
@@ -110,7 +110,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public SynthContext getContext(JComponent c) {
@@ -157,7 +157,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      *
      * Overridden to do nothing.
      */
@@ -167,7 +167,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthTextFieldUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthTextFieldUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -36,7 +36,7 @@
 
 
 /**
- * Provides the Synth L&F UI delegate for {@link javax.swing.JTextField}.
+ * Provides the Synth L&amp;F UI delegate for {@link javax.swing.JTextField}.
  * <p>
  * <strong>Warning:</strong>
  * Serialized objects of this class will not be compatible with
@@ -148,7 +148,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public SynthContext getContext(JComponent c) {
@@ -204,7 +204,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
@@ -213,7 +213,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      * Overridden to do nothing.
      */
     @Override
@@ -241,7 +241,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installDefaults() {
@@ -252,7 +252,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallDefaults() {
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthTextPaneUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthTextPaneUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -185,7 +185,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthToggleButtonUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthToggleButtonUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -31,7 +31,7 @@
 import javax.swing.plaf.ComponentUI;
 
 /**
- * Provides the Synth L&F UI delegate for
+ * Provides the Synth L&amp;F UI delegate for
  * {@link javax.swing.JToggleButton}.
  *
  * @author Jeff Dinkins
@@ -53,7 +53,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected String getPropertyPrefix() {
@@ -70,7 +70,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthToolBarUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthToolBarUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -44,7 +44,7 @@
 import sun.swing.plaf.synth.SynthIcon;
 
 /**
- * Provides the Synth L&F UI delegate for
+ * Provides the Synth L&amp;F UI delegate for
  * {@link javax.swing.JToolBar}.
  *
  * @since 1.7
@@ -69,7 +69,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installDefaults() {
@@ -78,7 +78,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installListeners() {
@@ -87,7 +87,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallListeners() {
@@ -121,7 +121,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallDefaults() {
@@ -149,13 +149,13 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installComponents() {}
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallComponents() {}
@@ -170,7 +170,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public SynthContext getContext(JComponent c) {
@@ -239,7 +239,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
@@ -314,7 +314,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void paintDragWindow(Graphics g) {
@@ -337,7 +337,7 @@
     //
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void propertyChange(PropertyChangeEvent e) {
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthToolTipUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthToolTipUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -37,7 +37,7 @@
 
 
 /**
- * Provides the Synth L&F UI delegate for
+ * Provides the Synth L&amp;F UI delegate for
  * {@link javax.swing.JToolTip}.
  *
  * @author Joshua Outwater
@@ -58,7 +58,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installDefaults(JComponent c) {
@@ -72,7 +72,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallDefaults(JComponent c) {
@@ -83,7 +83,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installListeners(JComponent c) {
@@ -91,7 +91,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallListeners(JComponent c) {
@@ -99,7 +99,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public SynthContext getContext(JComponent c) {
@@ -144,7 +144,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
@@ -196,7 +196,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public Dimension getPreferredSize(JComponent c) {
@@ -224,7 +224,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void propertyChange(PropertyChangeEvent e) {
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthTreeUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthTreeUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -50,7 +50,7 @@
 import sun.swing.plaf.synth.SynthIcon;
 
 /**
- * Provides the Synth L&F UI delegate for
+ * Provides the Synth L&amp;F UI delegate for
  * {@link javax.swing.JTree}.
  *
  * @author Scott Violet
@@ -85,7 +85,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public Icon getExpandedIcon() {
@@ -93,7 +93,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installDefaults() {
@@ -156,7 +156,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void installListeners() {
@@ -165,7 +165,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public SynthContext getContext(JComponent c) {
@@ -193,7 +193,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected TreeCellEditor createDefaultCellEditor() {
@@ -211,7 +211,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected TreeCellRenderer createDefaultCellRenderer() {
@@ -219,7 +219,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallDefaults() {
@@ -241,7 +241,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void uninstallListeners() {
@@ -273,7 +273,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void paintBorder(SynthContext context, Graphics g, int x,
@@ -472,7 +472,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void paintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds,
@@ -489,7 +489,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void paintHorizontalLine(Graphics g, JComponent c, int y,
@@ -499,7 +499,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void paintVerticalPartOfLeg(Graphics g,
@@ -511,7 +511,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void paintVerticalLine(Graphics g, JComponent c, int x, int top,
@@ -586,7 +586,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void paintExpandControl(Graphics g, Rectangle clipBounds,
@@ -607,7 +607,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void drawCentered(Component c, Graphics graphics, Icon icon,
@@ -621,7 +621,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void propertyChange(PropertyChangeEvent event) {
@@ -637,7 +637,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected void paintDropLine(Graphics g) {
@@ -677,7 +677,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     protected int getRowX(int row, int depth) {
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthViewportUI.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthViewportUI.java	Thu Sep 26 17:18:12 2013 -0700
@@ -32,7 +32,7 @@
 
 
 /**
- * Provides the Synth L&F UI delegate for
+ * Provides the Synth L&amp;F UI delegate for
  * {@link javax.swing.JViewport}.
  *
  * @since 1.7
@@ -52,7 +52,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void installUI(JComponent c) {
@@ -62,7 +62,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void uninstallUI(JComponent c) {
@@ -133,7 +133,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public SynthContext getContext(JComponent c) {
@@ -217,7 +217,7 @@
     }
 
     /**
-     * @inheritDoc
+     * {@inheritDoc}
      */
     @Override
     public void propertyChange(PropertyChangeEvent e) {
--- a/jdk/src/share/classes/javax/swing/text/AbstractDocument.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/AbstractDocument.java	Thu Sep 26 17:18:12 2013 -0700
@@ -934,16 +934,18 @@
      * Returns true if the text in the range <code>p0</code> to
      * <code>p1</code> is left to right.
      */
-    boolean isLeftToRight(int p0, int p1) {
-        if(!getProperty(I18NProperty).equals(Boolean.TRUE)) {
-            return true;
-        }
-        Element bidiRoot = getBidiRootElement();
-        int index = bidiRoot.getElementIndex(p0);
-        Element bidiElem = bidiRoot.getElement(index);
-        if(bidiElem.getEndOffset() >= p1) {
-            AttributeSet bidiAttrs = bidiElem.getAttributes();
-            return ((StyleConstants.getBidiLevel(bidiAttrs) % 2) == 0);
+    static boolean isLeftToRight(Document doc, int p0, int p1) {
+        if (Boolean.TRUE.equals(doc.getProperty(I18NProperty))) {
+            if (doc instanceof AbstractDocument) {
+                AbstractDocument adoc = (AbstractDocument) doc;
+                Element bidiRoot = adoc.getBidiRootElement();
+                int index = bidiRoot.getElementIndex(p0);
+                Element bidiElem = bidiRoot.getElement(index);
+                if (bidiElem.getEndOffset() >= p1) {
+                    AttributeSet bidiAttrs = bidiElem.getAttributes();
+                    return ((StyleConstants.getBidiLevel(bidiAttrs) % 2) == 0);
+                }
+            }
         }
         return true;
     }
--- a/jdk/src/share/classes/javax/swing/text/AttributeSet.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/AttributeSet.java	Thu Sep 26 17:18:12 2013 -0700
@@ -71,7 +71,7 @@
      * This interface is the type signature that is expected
      * to be present on any attribute key that contributes to
      * character level presentation.  This would be any attribute
-     * that applies to a so-called <term>run</term> of
+     * that applies to a so-called <i>run</i> of
      * style.
      */
     public interface CharacterAttribute {
--- a/jdk/src/share/classes/javax/swing/text/BadLocationException.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/BadLocationException.java	Thu Sep 26 17:18:12 2013 -0700
@@ -46,7 +46,7 @@
      * Creates a new BadLocationException object.
      *
      * @param s         a string indicating what was wrong with the arguments
-     * @param offs      offset within the document that was requested >= 0
+     * @param offs      offset within the document that was requested &gt;= 0
      */
     public BadLocationException(String s, int offs) {
         super(s);
@@ -56,7 +56,7 @@
     /**
      * Returns the offset into the document that was not legal.
      *
-     * @return the offset >= 0
+     * @return the offset &gt;= 0
      */
     public int offsetRequested() {
         return offs;
--- a/jdk/src/share/classes/javax/swing/text/BoxView.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/BoxView.java	Thu Sep 26 17:18:12 2013 -0700
@@ -154,7 +154,7 @@
      *
      * @param g the graphics context
      * @param alloc the allocated region to paint into
-     * @param index the child index, >= 0 && < getViewCount()
+     * @param index the child index, &gt;= 0 &amp;&amp; &lt; getViewCount()
      */
     protected void paintChild(Graphics g, Rectangle alloc, int index) {
         View child = getView(index);
@@ -170,9 +170,9 @@
      * will have an offset and span of 0.
      *
      * @param index the starting index into the child views to insert
-     *   the new views; this should be a value >= 0 and <= getViewCount
+     *   the new views; this should be a value &gt;= 0 and &lt;= getViewCount
      * @param length the number of existing child views to remove;
-     *   This should be a value >= 0 and <= (getViewCount() - offset)
+     *   This should be a value &gt;= 0 and &lt;= (getViewCount() - offset)
      * @param elems the child views to add; this value can be
      *   <code>null</code>to indicate no children are being added
      *   (useful to remove)
@@ -390,8 +390,8 @@
      * information.  This is implemented to call the
      * layout method with the sizes inside of the insets.
      *
-     * @param width the width >= 0
-     * @param height the height >= 0
+     * @param width the width &gt;= 0
+     * @param height the height &gt;= 0
      */
     public void setSize(float width, float height) {
         layout(Math.max(0, (int)(width - getLeftInset() - getRightInset())),
@@ -442,7 +442,7 @@
      * <code>null</code> if the layout is invalid,
      * otherwise the superclass behavior is executed.
      *
-     * @param index the index of the child, >= 0 && < getViewCount()
+     * @param index the index of the child, &gt;= 0 &amp;&amp; &gt; getViewCount()
      * @param a  the allocation to this view
      * @return the allocation to the child; or <code>null</code>
      *          if <code>a</code> is <code>null</code>;
@@ -469,7 +469,7 @@
      * to the coordinate space of the view mapped to it.  This makes
      * sure the allocation is valid before calling the superclass.
      *
-     * @param pos the position to convert >= 0
+     * @param pos the position to convert &gt;= 0
      * @param a the allocated region to render into
      * @return the bounding box of the given position
      * @exception BadLocationException  if the given position does
@@ -488,11 +488,11 @@
      * Provides a mapping from the view coordinate space to the logical
      * coordinate space of the model.
      *
-     * @param x   x coordinate of the view location to convert >= 0
-     * @param y   y coordinate of the view location to convert >= 0
+     * @param x   x coordinate of the view location to convert &gt;= 0
+     * @param y   y coordinate of the view location to convert &gt;= 0
      * @param a the allocated region to render into
      * @return the location within the model that best represents the
-     *  given point in the view >= 0
+     *  given point in the view &gt;= 0
      * @see View#viewToModel
      */
     public int viewToModel(float x, float y, Shape a, Position.Bias[] bias) {
@@ -513,7 +513,7 @@
      *
      * @param axis may be either <code>View.X_AXIS</code>
      *   or <code>View.Y_AXIS</code>
-     * @return the desired alignment >= 0.0f && <= 1.0f; this should
+     * @return the desired alignment &gt;= 0.0f &amp;&amp; &lt;= 1.0f; this should
      *   be a value between 0.0 and 1.0 where 0 indicates alignment at the
      *   origin and 1.0 indicates alignment to the full span
      *   away from the origin; an alignment of 0.5 would be the
@@ -535,7 +535,7 @@
      *
      * @param axis may be either <code>View.X_AXIS</code>
      *           or <code>View.Y_AXIS</code>
-     * @return   the span the view would like to be rendered into >= 0;
+     * @return   the span the view would like to be rendered into &gt;= 0;
      *           typically the view is told to render into the span
      *           that is returned, although there is no guarantee;
      *           the parent may choose to resize or break the view
@@ -558,7 +558,7 @@
      *
      * @param axis may be either <code>View.X_AXIS</code>
      *           or <code>View.Y_AXIS</code>
-     * @return  the span the view would like to be rendered into >= 0;
+     * @return  the span the view would like to be rendered into &gt;= 0;
      *           typically the view is told to render into the span
      *           that is returned, although there is no guarantee;
      *           the parent may choose to resize or break the view
@@ -581,7 +581,7 @@
      *
      * @param axis may be either <code>View.X_AXIS</code>
      *           or <code>View.Y_AXIS</code>
-     * @return   the span the view would like to be rendered into >= 0;
+     * @return   the span the view would like to be rendered into &gt;= 0;
      *           typically the view is told to render into the span
      *           that is returned, although there is no guarantee;
      *           the parent may choose to resize or break the view
@@ -613,8 +613,8 @@
     /**
      * Determines if a point falls before an allocated region.
      *
-     * @param x the X coordinate >= 0
-     * @param y the Y coordinate >= 0
+     * @param x the X coordinate &gt;= 0
+     * @param y the Y coordinate &gt;= 0
      * @param innerAlloc the allocated region; this is the area
      *   inside of the insets
      * @return true if the point lies before the region else false
@@ -630,8 +630,8 @@
     /**
      * Determines if a point falls after an allocated region.
      *
-     * @param x the X coordinate >= 0
-     * @param y the Y coordinate >= 0
+     * @param x the X coordinate &gt;= 0
+     * @param y the Y coordinate &gt;= 0
      * @param innerAlloc the allocated region; this is the area
      *   inside of the insets
      * @return true if the point lies after the region else false
@@ -647,8 +647,8 @@
     /**
      * Fetches the child view at the given coordinates.
      *
-     * @param x the X coordinate >= 0
-     * @param y the Y coordinate >= 0
+     * @param x the X coordinate &gt;= 0
+     * @param y the Y coordinate &gt;= 0
      * @param alloc the parents inner allocation on entry, which should
      *   be changed to the childs allocation on exit
      * @return the view
@@ -688,7 +688,7 @@
      * Allocates a region for a child view.
      *
      * @param index the index of the child view to
-     *   allocate, >= 0 && < getViewCount()
+     *   allocate, &gt;= 0 &amp;&amp; &lt; getViewCount()
      * @param alloc the allocated region
      */
     protected void childAllocation(int index, Rectangle alloc) {
@@ -701,8 +701,8 @@
     /**
      * Perform layout on the box
      *
-     * @param width the width (inside of the insets) >= 0
-     * @param height the height (inside of the insets) >= 0
+     * @param width the width (inside of the insets) &gt;= 0
+     * @param height the height (inside of the insets) &gt;= 0
      */
     protected void layout(int width, int height) {
         setSpanOnAxis(X_AXIS, width);
--- a/jdk/src/share/classes/javax/swing/text/Caret.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/Caret.java	Thu Sep 26 17:18:12 2013 -0700
@@ -149,7 +149,7 @@
      * and how fast the caret blinks, commonly used as one
      * way to attract attention to the caret.
      *
-     * @param rate  the delay in milliseconds >= 0.  If this is
+     * @param rate  the delay in milliseconds &gt;=0.  If this is
      *  zero the caret will not blink.
      */
     public void setBlinkRate(int rate);
@@ -159,7 +159,7 @@
      * and how fast the caret blinks, commonly used as one
      * way to attract attention to the caret.
      *
-     * @return the delay in milliseconds >= 0.  If this is
+     * @return the delay in milliseconds &gt;=0.  If this is
      *  zero the caret will not blink.
      */
     public int getBlinkRate();
@@ -167,7 +167,7 @@
     /**
      * Fetches the current position of the caret.
      *
-     * @return the position >= 0
+     * @return the position &gt;=0
      */
     public int getDot();
 
@@ -176,7 +176,7 @@
      * is a selection, the mark will not be the same as
      * the dot.
      *
-     * @return the position >= 0
+     * @return the position &gt;=0
      */
     public int getMark();
 
@@ -197,7 +197,7 @@
      * leaving behind the mark.  This is useful for
      * making selections.
      *
-     * @param dot  the new position to move the caret to >= 0
+     * @param dot  the new position to move the caret to &gt;=0
      */
     public void moveDot(int dot);
 
--- a/jdk/src/share/classes/javax/swing/text/ComponentView.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/ComponentView.java	Thu Sep 26 17:18:12 2013 -0700
@@ -125,7 +125,7 @@
      * axis of interest.
      *
      * @param axis may be either View.X_AXIS or View.Y_AXIS
-     * @return   the span the view would like to be rendered into >= 0.
+     * @return   the span the view would like to be rendered into &gt;=0.
      *           Typically the view is told to render into the span
      *           that is returned, although there is no guarantee.
      *           The parent may choose to resize or break the view.
@@ -153,7 +153,7 @@
      * axis of interest.
      *
      * @param axis may be either View.X_AXIS or View.Y_AXIS
-     * @return   the span the view would like to be rendered into >= 0.
+     * @return   the span the view would like to be rendered into &gt;=0.
      *           Typically the view is told to render into the span
      *           that is returned, although there is no guarantee.
      *           The parent may choose to resize or break the view.
@@ -181,7 +181,7 @@
      * axis of interest.
      *
      * @param axis may be either View.X_AXIS or View.Y_AXIS
-     * @return   the span the view would like to be rendered into >= 0.
+     * @return   the span the view would like to be rendered into &gt;=0.
      *           Typically the view is told to render into the span
      *           that is returned, although there is no guarantee.
      *           The parent may choose to resize or break the view.
@@ -319,7 +319,7 @@
      * Provides a mapping from the coordinate space of the model to
      * that of the view.
      *
-     * @param pos the position to convert >= 0
+     * @param pos the position to convert &gt;=0
      * @param a the allocated region to render into
      * @return the bounding box of the given position is returned
      * @exception BadLocationException  if the given position does not
@@ -344,8 +344,8 @@
      * Provides a mapping from the view coordinate space to the logical
      * coordinate space of the model.
      *
-     * @param x the X coordinate >= 0
-     * @param y the Y coordinate >= 0
+     * @param x the X coordinate &gt;=0
+     * @param y the Y coordinate &gt;=0
      * @param a the allocated region to render into
      * @return the location within the model that best represents
      *    the given point in the view
--- a/jdk/src/share/classes/javax/swing/text/CompositeView.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/CompositeView.java	Thu Sep 26 17:18:12 2013 -0700
@@ -143,7 +143,7 @@
     /**
      * Returns the number of child views of this view.
      *
-     * @return the number of views >= 0
+     * @return the number of views &gt;= 0
      * @see #getView
      */
     public int getViewCount() {
@@ -153,7 +153,7 @@
     /**
      * Returns the n-th view in this container.
      *
-     * @param n the number of the desired view, >= 0 && < getViewCount()
+     * @param n the number of the desired view, &gt;= 0 &amp;&amp; &lt; getViewCount()
      * @return the view at index <code>n</code>
      */
     public View getView(int n) {
@@ -169,9 +169,9 @@
      * may be garbage collected.
      *
      * @param offset the starting index into the child views to insert
-     *   the new views; >= 0 and <= getViewCount
+     *   the new views; &gt;= 0 and &lt;= getViewCount
      * @param length the number of existing child views to remove;
-     *   this should be a value >= 0 and <= (getViewCount() - offset)
+     *   this should be a value &gt;= 0 and &lt;= (getViewCount() - offset)
      * @param views the child views to add; this value can be
      *  <code>null</code>
      *   to indicate no children are being added (useful to remove)
@@ -223,7 +223,7 @@
      * render into. This enables finding out where various views
      * are located.
      *
-     * @param index the index of the child, >= 0 && < getViewCount()
+     * @param index the index of the child, &gt;= 0 &amp;&amp; &lt; getViewCount()
      * @param a  the allocation to this view
      * @return the allocation to the child
      */
@@ -237,7 +237,7 @@
      * Provides a mapping from the document model coordinate space
      * to the coordinate space of the view mapped to it.
      *
-     * @param pos the position to convert >= 0
+     * @param pos the position to convert &gt;= 0
      * @param a the allocated region to render into
      * @param b a bias value of either <code>Position.Bias.Forward</code>
      *  or <code>Position.Bias.Backward</code>
@@ -280,13 +280,13 @@
      * Provides a mapping from the document model coordinate space
      * to the coordinate space of the view mapped to it.
      *
-     * @param p0 the position to convert >= 0
+     * @param p0 the position to convert &gt;= 0
      * @param b0 the bias toward the previous character or the
      *  next character represented by p0, in case the
      *  position is a boundary of two views; either
      *  <code>Position.Bias.Forward</code> or
      *  <code>Position.Bias.Backward</code>
-     * @param p1 the position to convert >= 0
+     * @param p1 the position to convert &gt;= 0
      * @param b1 the bias toward the previous character or the
      *  next character represented by p1, in case the
      *  position is a boundary of two views
@@ -378,13 +378,13 @@
      * Provides a mapping from the view coordinate space to the logical
      * coordinate space of the model.
      *
-     * @param x   x coordinate of the view location to convert >= 0
-     * @param y   y coordinate of the view location to convert >= 0
+     * @param x   x coordinate of the view location to convert &gt;= 0
+     * @param y   y coordinate of the view location to convert &gt;= 0
      * @param a the allocated region to render into
      * @param bias either <code>Position.Bias.Forward</code> or
      *  <code>Position.Bias.Backward</code>
      * @return the location within the model that best represents the
-     *  given point in the view >= 0
+     *  given point in the view &gt;= 0
      * @see View#viewToModel
      */
     public int viewToModel(float x, float y, Shape a, Position.Bias[] bias) {
@@ -436,7 +436,7 @@
      * This is a convenience method for {@link #getNextNorthSouthVisualPositionFrom}
      * and {@link #getNextEastWestVisualPositionFrom}.
      *
-     * @param pos the position to convert >= 0
+     * @param pos the position to convert &gt;= 0
      * @param b a bias value of either <code>Position.Bias.Forward</code>
      *  or <code>Position.Bias.Backward</code>
      * @param a the allocated region to render into
@@ -484,7 +484,7 @@
      * <code>getViewIndexByPosition</code>
      * method for backward compatibility.
      *
-     * @param pos the position >= 0
+     * @param pos the position &gt;= 0
      * @return  index of the view representing the given position, or
      *   -1 if no view represents that position
      * @since 1.3
@@ -505,8 +505,8 @@
     /**
      * Tests whether a point lies before the rectangle range.
      *
-     * @param x the X coordinate >= 0
-     * @param y the Y coordinate >= 0
+     * @param x the X coordinate &gt;= 0
+     * @param y the Y coordinate &gt;= 0
      * @param alloc the rectangle
      * @return true if the point is before the specified range
      */
@@ -515,8 +515,8 @@
     /**
      * Tests whether a point lies after the rectangle range.
      *
-     * @param x the X coordinate >= 0
-     * @param y the Y coordinate >= 0
+     * @param x the X coordinate &gt;= 0
+     * @param y the Y coordinate &gt;= 0
      * @param alloc the rectangle
      * @return true if the point is after the specified range
      */
@@ -525,8 +525,8 @@
     /**
      * Fetches the child view at the given coordinates.
      *
-     * @param x the X coordinate >= 0
-     * @param y the Y coordinate >= 0
+     * @param x the X coordinate &gt;= 0
+     * @param y the Y coordinate &gt;= 0
      * @param alloc the parent's allocation on entry, which should
      *   be changed to the child's allocation on exit
      * @return the child view
@@ -536,7 +536,7 @@
     /**
      * Returns the allocation for a given child.
      *
-     * @param index the index of the child, >= 0 && < getViewCount()
+     * @param index the index of the child, &gt;= 0 &amp;&amp; &lt; getViewCount()
      * @param a  the allocation to the interior of the box on entry,
      *   and the allocation of the child view at the index on exit.
      */
@@ -547,7 +547,7 @@
      * the model.  This is implemented to fetch the view in the case
      * where there is a child view for each child element.
      *
-     * @param pos the position >= 0
+     * @param pos the position &gt;= 0
      * @param a  the allocation to the interior of the box on entry,
      *   and the allocation of the view containing the position on exit
      * @return  the view representing the given position, or
@@ -570,7 +570,7 @@
      * the model.  This is implemented to fetch the view in the case
      * where there is a child view for each child element.
      *
-     * @param pos the position >= 0
+     * @param pos the position &gt;= 0
      * @return  index of the view representing the given position, or
      *   -1 if no view represents that position
      */
@@ -639,10 +639,10 @@
     /**
      * Sets the insets for the view.
      *
-     * @param top the top inset >= 0
-     * @param left the left inset >= 0
-     * @param bottom the bottom inset >= 0
-     * @param right the right inset >= 0
+     * @param top the top inset &gt;= 0
+     * @param left the left inset &gt;= 0
+     * @param bottom the bottom inset &gt;= 0
+     * @param right the right inset &gt;= 0
      */
     protected void setInsets(short top, short left, short bottom, short right) {
         this.top = top;
@@ -654,7 +654,7 @@
     /**
      * Gets the left inset.
      *
-     * @return the inset >= 0
+     * @return the inset &gt;= 0
      */
     protected short getLeftInset() {
         return left;
@@ -663,7 +663,7 @@
     /**
      * Gets the right inset.
      *
-     * @return the inset >= 0
+     * @return the inset &gt;= 0
      */
     protected short getRightInset() {
         return right;
@@ -672,7 +672,7 @@
     /**
      * Gets the top inset.
      *
-     * @return the inset >= 0
+     * @return the inset &gt;= 0
      */
     protected short getTopInset() {
         return top;
@@ -681,7 +681,7 @@
     /**
      * Gets the bottom inset.
      *
-     * @return the inset >= 0
+     * @return the inset &gt;= 0
      */
     protected short getBottomInset() {
         return bottom;
@@ -691,7 +691,7 @@
      * Returns the next visual position for the cursor, in either the
      * north or south direction.
      *
-     * @param pos the position to convert >= 0
+     * @param pos the position to convert &gt;= 0
      * @param b a bias value of either <code>Position.Bias.Forward</code>
      *  or <code>Position.Bias.Backward</code>
      * @param a the allocated region to render into
@@ -723,7 +723,7 @@
      * Returns the next visual position for the cursor, in either the
      * east or west direction.
      *
-    * @param pos the position to convert >= 0
+    * @param pos the position to convert &gt;= 0
      * @param b a bias value of either <code>Position.Bias.Forward</code>
      *  or <code>Position.Bias.Backward</code>
      * @param a the allocated region to render into
--- a/jdk/src/share/classes/javax/swing/text/DefaultCaret.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/DefaultCaret.java	Thu Sep 26 17:18:12 2013 -0700
@@ -962,8 +962,8 @@
         // focus lost notification can come in later after the
         // caret has been deinstalled, in which case the component
         // will be null.
+        active = e;
         if (component != null) {
-            active = e;
             TextUI mapper = component.getUI();
             if (visible != e) {
                 visible = e;
@@ -1211,12 +1211,9 @@
 
     boolean isPositionLTR(int position, Position.Bias bias) {
         Document doc = component.getDocument();
-        if(doc instanceof AbstractDocument ) {
-            if(bias == Position.Bias.Backward && --position < 0)
-                position = 0;
-            return ((AbstractDocument)doc).isLeftToRight(position, position);
-        }
-        return true;
+        if(bias == Position.Bias.Backward && --position < 0)
+            position = 0;
+        return AbstractDocument.isLeftToRight(doc, position, position);
     }
 
     Position.Bias guessBiasForOffset(int offset, Position.Bias lastBias,
--- a/jdk/src/share/classes/javax/swing/text/DefaultEditorKit.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/DefaultEditorKit.java	Thu Sep 26 17:18:12 2013 -0700
@@ -140,7 +140,7 @@
      * @param in  The stream to read from
      * @param doc The destination for the insertion.
      * @param pos The location in the document to place the
-     *   content >= 0.
+     *   content &gt;=0.
      * @exception IOException on any I/O error
      * @exception BadLocationException if pos represents an invalid
      *   location within the document.
@@ -158,8 +158,8 @@
      * @param out The stream to write to
      * @param doc The source for the write.
      * @param pos The location in the document to fetch the
-     *   content >= 0.
-     * @param len The amount to write out >= 0.
+     *   content &gt;=0.
+     * @param len The amount to write out &gt;=0.
      * @exception IOException on any I/O error
      * @exception BadLocationException if pos represents an invalid
      *   location within the document.
@@ -191,7 +191,7 @@
      * @param in  The stream to read from
      * @param doc The destination for the insertion.
      * @param pos The location in the document to place the
-     *   content >= 0.
+     *   content &gt;=0.
      * @exception IOException on any I/O error
      * @exception BadLocationException if pos represents an invalid
      *   location within the document.
@@ -300,8 +300,8 @@
      * @param out  The stream to write to
      * @param doc The source for the write.
      * @param pos The location in the document to fetch the
-     *   content from >= 0.
-     * @param len The amount to write out >= 0.
+     *   content from &gt;=0.
+     * @param len The amount to write out &gt;=0.
      * @exception IOException on any I/O error
      * @exception BadLocationException if pos is not within 0 and
      *   the length of the document.
--- a/jdk/src/share/classes/javax/swing/text/DefaultHighlighter.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/DefaultHighlighter.java	Thu Sep 26 17:18:12 2013 -0700
@@ -105,8 +105,8 @@
      * Adds a highlight to the view.  Returns a tag that can be used
      * to refer to the highlight.
      *
-     * @param p0   the start offset of the range to highlight >= 0
-     * @param p1   the end offset of the range to highlight >= p0
+     * @param p0   the start offset of the range to highlight &gt;= 0
+     * @param p1   the end offset of the range to highlight &gt;= p0
      * @param p    the painter to use to actually render the highlight
      * @return     an object that can be used as a tag
      *   to refer to the highlight
@@ -220,8 +220,8 @@
      * Changes a highlight.
      *
      * @param tag the highlight tag
-     * @param p0 the beginning of the range >= 0
-     * @param p1 the end of the range >= p0
+     * @param p0 the beginning of the range &gt;= 0
+     * @param p1 the end of the range &gt;= p0
      * @exception BadLocationException if the specified location is invalid
      */
     public void changeHighlight(Object tag, int p0, int p1) throws BadLocationException {
@@ -395,8 +395,8 @@
          * Paints a highlight.
          *
          * @param g the graphics context
-         * @param offs0 the starting model offset >= 0
-         * @param offs1 the ending model offset >= offs1
+         * @param offs0 the starting model offset &gt;= 0
+         * @param offs1 the ending model offset &gt;= offs1
          * @param bounds the bounding box for the highlight
          * @param c the editor
          */
@@ -441,8 +441,8 @@
          * Paints a portion of a highlight.
          *
          * @param g the graphics context
-         * @param offs0 the starting model offset >= 0
-         * @param offs1 the ending model offset >= offs1
+         * @param offs0 the starting model offset &gt;= 0
+         * @param offs1 the ending model offset &gt;= offs1
          * @param bounds the bounding box of the view, which is not
          *        necessarily the region to paint.
          * @param c the editor
--- a/jdk/src/share/classes/javax/swing/text/DefaultStyledDocument.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/DefaultStyledDocument.java	Thu Sep 26 17:18:12 2013 -0700
@@ -176,7 +176,7 @@
      * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      *
-     * @param offset the starting offset >= 0
+     * @param offset the starting offset &gt;= 0
      * @param data the element data
      * @exception BadLocationException for an invalid starting offset
      */
@@ -429,7 +429,7 @@
      * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      *
-     * @param pos the offset from the start of the document >= 0
+     * @param pos the offset from the start of the document &gt;= 0
      * @param s  the logical style to assign to the paragraph, null if none
      */
     public void setLogicalStyle(int pos, Style s) {
@@ -458,7 +458,7 @@
      * represented by the given position.
      *
      * @param p the location to translate to a paragraph
-     *  and determine the logical style assigned >= 0.  This
+     *  and determine the logical style assigned &gt;= 0.  This
      *  is an offset from the start of the document.
      * @return the style, null if none
      */
@@ -486,8 +486,8 @@
      * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      *
-     * @param offset the offset in the document >= 0
-     * @param length the length >= 0
+     * @param offset the offset in the document &gt;= 0
+     * @param length the length &gt;= 0
      * @param s the attributes
      * @param replace true if the previous attributes should be replaced
      *  before setting the new attributes
@@ -539,8 +539,8 @@
      * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      *
-     * @param offset the offset into the paragraph >= 0
-     * @param length the number of characters affected >= 0
+     * @param offset the offset into the paragraph &gt;= 0
+     * @param length the number of characters affected &gt;= 0
      * @param s the attributes
      * @param replace whether to replace existing attributes, or merge them
      */
@@ -589,7 +589,7 @@
      * A paragraph consists of at least one child Element, which is usually
      * a leaf.
      *
-     * @param pos the starting offset >= 0
+     * @param pos the starting offset &gt;= 0
      * @return the element
      */
     public Element getParagraphElement(int pos) {
@@ -606,7 +606,7 @@
     /**
      * Gets a character element based on a position.
      *
-     * @param pos the position in the document >= 0
+     * @param pos the position in the document &gt;= 0
      * @return the element
      */
     public Element getCharacterElement(int pos) {
@@ -1233,7 +1233,7 @@
          * @param a the attributes for the element
          * @param type the type of the element (StartTagType, EndTagType,
          *  ContentType)
-         * @param len the length >= 0
+         * @param len the length &gt;= 0
          */
         public ElementSpec(AttributeSet a, short type, int len) {
             this(a, type, null, 0, len);
@@ -1247,8 +1247,8 @@
          * @param type the type of the element (StartTagType, EndTagType,
          *  ContentType)
          * @param txt the text for the element
-         * @param offs the offset into the text >= 0
-         * @param len the length of the text >= 0
+         * @param offs the offset into the text &gt;= 0
+         * @param len the length of the text &gt;= 0
          */
         public ElementSpec(AttributeSet a, short type, char[] txt,
                                   int offs, int len) {
@@ -1321,7 +1321,7 @@
         /**
          * Gets the starting offset.
          *
-         * @return the offset >= 0
+         * @return the offset &gt;= 0
          */
         public int getOffset() {
             return offs;
@@ -1330,7 +1330,7 @@
         /**
          * Gets the length.
          *
-         * @return the length >= 0
+         * @return the length &gt;= 0
          */
         public int getLength() {
             return len;
@@ -1420,8 +1420,8 @@
         /**
          * Inserts new content.
          *
-         * @param offset the starting offset >= 0
-         * @param length the length >= 0
+         * @param offset the starting offset &gt;= 0
+         * @param length the length &gt;= 0
          * @param data the data to insert
          * @param de the event capturing this edit
          */
@@ -1500,8 +1500,8 @@
         /**
          * Removes content.
          *
-         * @param offset the starting offset >= 0
-         * @param length the length >= 0
+         * @param offset the starting offset &gt;= 0
+         * @param length the length &gt;= 0
          * @param de the event capturing this edit
          */
         public void remove(int offset, int length, DefaultDocumentEvent de) {
@@ -1513,8 +1513,8 @@
         /**
          * Changes content.
          *
-         * @param offset the starting offset >= 0
-         * @param length the length >= 0
+         * @param offset the starting offset &gt;= 0
+         * @param length the length &gt;= 0
          * @param de the event capturing this edit
          */
         public void change(int offset, int length, DefaultDocumentEvent de) {
--- a/jdk/src/share/classes/javax/swing/text/Document.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/Document.java	Thu Sep 26 17:18:12 2013 -0700
@@ -58,9 +58,9 @@
  * <p>The following methods give access to the character data
  * that makes up the content.
  * <ul>
- * <li><a href="#getLength()">getLength()</a>
- * <li><a href="#getText(int, int)">getText(int, int)</a>
- * <li><a href="#getText(int, int, javax.swing.text.Segment)">getText(int, int, Segment)</a>
+ * <li>{@link #getLength()}
+ * <li>{@link #getText(int, int)}
+ * <li>{@link #getText(int, int, javax.swing.text.Segment)}
  * </ul>
  * <p><b><font size=+1>Structure</font></b>
  * <p>
@@ -79,8 +79,8 @@
  * <a href="AttributeSet.html">AttributeSet</a> interface.
  * <p>The following methods give access to the document structure.
  * <ul>
- * <li><a href="#getDefaultRootElement()">getDefaultRootElement</a>
- * <li><a href="#getRootElements()">getRootElements</a>
+ * <li>{@link #getDefaultRootElement()}
+ * <li>{@link #getRootElements()}
  * </ul>
  *
  * <p><b><font size=+1>Mutations</font></b>
@@ -93,9 +93,9 @@
  * <p>The following methods are related to mutation of the
  * document content:
  * <ul>
- * <li><a href="#insertString(int, java.lang.String, javax.swing.text.AttributeSet)">insertString(int, String, AttributeSet)</a>
- * <li><a href="#remove(int, int)">remove(int, int)</a>
- * <li><a href="#createPosition(int)">createPosition(int)</a>
+ * <li>{@link #insertString(int, java.lang.String, javax.swing.text.AttributeSet)}
+ * <li>{@link #remove(int, int)}
+ * <li>{@link #createPosition(int)}
  * </ul>
  *
  * <p><b><font size=+1>Notification</font></b>
@@ -161,8 +161,8 @@
  * and the <a href="#TitleProperty">TitleProperty</a>, which can be used to
  * name the <code>Document</code>.  The methods related to the properties are:
  * <ul>
- * <li><a href="#getProperty(java.lang.Object)">getProperty(Object)</a>
- * <li><a href="#putProperty(java.lang.Object, java.lang.Object)">putProperty(Object, Object)</a>
+ * <li>{@link #getProperty(java.lang.Object)}
+ * <li>{@link #putProperty(java.lang.Object, java.lang.Object)}
  * </ul>
  *
  * <p>For more information on the <code>Document</code> class, see
--- a/jdk/src/share/classes/javax/swing/text/DocumentFilter.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/DocumentFilter.java	Thu Sep 26 17:18:12 2013 -0700
@@ -68,8 +68,8 @@
      * necessary.
      *
      * @param fb FilterBypass that can be used to mutate Document
-     * @param offset the offset from the beginning >= 0
-     * @param length the number of characters to remove >= 0
+     * @param offset the offset from the beginning &gt;= 0
+     * @param length the number of characters to remove &gt;= 0
      * @exception BadLocationException  some portion of the removal range
      *   was not a valid part of the document.  The location in the exception
      *   is the first bad position encountered.
@@ -86,7 +86,7 @@
      * necessary, or call directly into the FilterBypass.
      *
      * @param fb FilterBypass that can be used to mutate Document
-     * @param offset  the offset into the document to insert the content >= 0.
+     * @param offset  the offset into the document to insert the content &gt;= 0.
      *    All positions that track change at or after the given location
      *    will move.
      * @param string the string to insert
@@ -141,8 +141,8 @@
          * Removes the specified region of text, bypassing the
          * DocumentFilter.
          *
-         * @param offset the offset from the beginning >= 0
-         * @param length the number of characters to remove >= 0
+         * @param offset the offset from the beginning &gt;= 0
+         * @param length the number of characters to remove &gt;= 0
          * @exception BadLocationException some portion of the removal range
          *   was not a valid part of the document.  The location in the
          *   exception is the first bad position encountered.
@@ -154,7 +154,7 @@
          * Inserts the specified text, bypassing the
          * DocumentFilter.
          * @param offset  the offset into the document to insert the
-         *   content >= 0. All positions that track change at or after the
+         *   content &gt;= 0. All positions that track change at or after the
          *   given location will move.
          * @param string the string to insert
          * @param attr the attributes to associate with the inserted
--- a/jdk/src/share/classes/javax/swing/text/EditorKit.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/EditorKit.java	Thu Sep 26 17:18:12 2013 -0700
@@ -55,7 +55,7 @@
 
     /**
      * Creates a copy of the editor kit.  This is implemented
-     * to use Object.clone</em>.  If the kit cannot be cloned,
+     * to use <code>Object.clone()</code>.  If the kit cannot be cloned,
      * null is returned.
      *
      * @return the copy
@@ -139,7 +139,7 @@
      * @param in  The stream to read from
      * @param doc The destination for the insertion.
      * @param pos The location in the document to place the
-     *   content >= 0.
+     *   content &gt;= 0.
      * @exception IOException on any I/O error
      * @exception BadLocationException if pos represents an invalid
      *   location within the document.
@@ -154,8 +154,8 @@
      * @param out  The stream to write to
      * @param doc The source for the write.
      * @param pos The location in the document to fetch the
-     *   content from >= 0.
-     * @param len The amount to write out >= 0.
+     *   content from &gt;= 0.
+     * @param len The amount to write out &gt;= 0.
      * @exception IOException on any I/O error
      * @exception BadLocationException if pos represents an invalid
      *   location within the document.
@@ -176,7 +176,7 @@
      * @param in  The stream to read from
      * @param doc The destination for the insertion.
      * @param pos The location in the document to place the
-     *   content >= 0.
+     *   content &gt;= 0.
      * @exception IOException on any I/O error
      * @exception BadLocationException if pos represents an invalid
      *   location within the document.
@@ -196,8 +196,8 @@
      * @param out  The stream to write to
      * @param doc The source for the write.
      * @param pos The location in the document to fetch the
-     *   content >= 0.
-     * @param len The amount to write out >= 0.
+     *   content &gt;= 0.
+     * @param len The amount to write out &gt;= 0.
      * @exception IOException on any I/O error
      * @exception BadLocationException if pos represents an invalid
      *   location within the document.
--- a/jdk/src/share/classes/javax/swing/text/FieldView.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/FieldView.java	Thu Sep 26 17:18:12 2013 -0700
@@ -200,7 +200,7 @@
      * axis.
      *
      * @param axis may be either View.X_AXIS or View.Y_AXIS
-     * @return   the span the view would like to be rendered into >= 0.
+     * @return   the span the view would like to be rendered into &gt;= 0.
      *           Typically the view is told to render into the span
      *           that is returned, although there is no guarantee.
      *           The parent may choose to resize or break the view.
@@ -241,7 +241,7 @@
      * given axis.  A value of 0 or less is not resizable.
      *
      * @param axis View.X_AXIS or View.Y_AXIS
-     * @return the weight -> 1 for View.X_AXIS, else 0
+     * @return the weight -&gt; 1 for View.X_AXIS, else 0
      */
     public int getResizeWeight(int axis) {
         if (axis == View.X_AXIS) {
@@ -254,7 +254,7 @@
      * Provides a mapping from the document model coordinate space
      * to the coordinate space of the view mapped to it.
      *
-     * @param pos the position to convert >= 0
+     * @param pos the position to convert &gt;= 0
      * @param a the allocated region to render into
      * @return the bounding box of the given position
      * @exception BadLocationException  if the given position does not
@@ -269,8 +269,8 @@
      * Provides a mapping from the view coordinate space to the logical
      * coordinate space of the model.
      *
-     * @param fx the X coordinate >= 0.0f
-     * @param fy the Y coordinate >= 0.0f
+     * @param fx the X coordinate &gt;= 0.0f
+     * @param fy the Y coordinate &gt;= 0.0f
      * @param a the allocated region to render into
      * @return the location within the model that best represents the
      *  given point in the view
--- a/jdk/src/share/classes/javax/swing/text/FlowView.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/FlowView.java	Thu Sep 26 17:18:12 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2013, 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
@@ -88,7 +88,7 @@
      * is returned.
      *
      * @param index the index of the row being updated.
-     *   This should be a value >= 0 and < getViewCount().
+     *   This should be a value &gt;= 0 and &lt; getViewCount().
      * @see #getFlowStart
      */
     public int getFlowSpan(int index) {
@@ -103,7 +103,7 @@
      * for the row constraints.
 
      * @param index the index of the row being updated.
-     *   This should be a value >= 0 and < getViewCount().
+     *   This should be a value &gt;= 0 and &lt; getViewCount().
      * @see #getFlowSpan
      */
     public int getFlowStart(int index) {
@@ -147,7 +147,7 @@
      * Fetches the child view index representing the given position in
      * the model.
      *
-     * @param pos the position >= 0
+     * @param pos the position &gt;= 0
      * @return  index of the view representing the given position, or
      *   -1 if no view represents that position
      */
@@ -175,9 +175,9 @@
      * a preferenceChanged is called.  Following all of that,
      * the normal box layout of the superclass is performed.
      *
-     * @param width  the width to lay out against >= 0.  This is
+     * @param width  the width to lay out against &gt;= 0.  This is
      *   the width inside of the inset area.
-     * @param height the height to lay out against >= 0 This
+     * @param height the height to lay out against &gt;= 0 This
      *   is the height inside of the inset area.
      */
     protected void layout(int width, int height) {
@@ -580,7 +580,7 @@
          *
          * @param rowIndex the row to adjust to the current layout
          *  span.
-         * @param desiredSpan the current layout span >= 0
+         * @param desiredSpan the current layout span &gt;= 0
          * @param x the location r starts at.
          */
         protected void adjustRow(FlowView fv, int rowIndex, int desiredSpan, int x) {
@@ -796,6 +796,22 @@
             v.setParent(parent);
         }
 
+        /** {@inheritDoc} */
+        @Override
+        protected void forwardUpdate(DocumentEvent.ElementChange ec,
+                                          DocumentEvent e, Shape a, ViewFactory f) {
+            calculateUpdateIndexes(e);
+            // Send update event to all views followed by the changed place.
+            lastUpdateIndex = Math.max((getViewCount() - 1), 0);
+            for (int i = firstUpdateIndex; i <= lastUpdateIndex; i++) {
+                View v = getView(i);
+                if (v != null) {
+                    Shape childAlloc = getChildAllocation(i, a);
+                    forwardUpdateToView(v, e, childAlloc, f);
+                }
+            }
+        }
+
         // The following methods don't do anything useful, they
         // simply keep the class from being abstract.
 
@@ -816,8 +832,8 @@
          * Implemented to return false, as hit detection is not
          * performed on the logical view.
          *
-         * @param x the X coordinate >= 0
-         * @param y the Y coordinate >= 0
+         * @param x the X coordinate &gt;= 0
+         * @param y the Y coordinate &gt;= 0
          * @param alloc the rectangle
          * @return true if the point is before the specified range
          */
@@ -830,8 +846,8 @@
          * Implemented to return false, as hit detection is not
          * performed on the logical view.
          *
-         * @param x the X coordinate >= 0
-         * @param y the Y coordinate >= 0
+         * @param x the X coordinate &gt;= 0
+         * @param y the Y coordinate &gt;= 0
          * @param alloc the rectangle
          * @return true if the point is after the specified range
          */
@@ -844,8 +860,8 @@
          * Implemented to return null, as hit detection is not
          * performed on the logical view.
          *
-         * @param x the X coordinate >= 0
-         * @param y the Y coordinate >= 0
+         * @param x the X coordinate &gt;= 0
+         * @param y the Y coordinate &gt;= 0
          * @param alloc the parent's allocation on entry, which should
          *   be changed to the child's allocation on exit
          * @return the child view
@@ -859,7 +875,7 @@
          * Implemented to do nothing, as the logical view doesn't
          * perform layout on the children.
          *
-         * @param index the index of the child, >= 0 && < getViewCount()
+         * @param index the index of the child, &gt;= 0 &amp;&amp; &lt; getViewCount()
          * @param a  the allocation to the interior of the box on entry,
          *   and the allocation of the child view at the index on exit.
          */
--- a/jdk/src/share/classes/javax/swing/text/GapContent.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/GapContent.java	Thu Sep 26 17:18:12 2013 -0700
@@ -107,7 +107,7 @@
     /**
      * Returns the length of the content.
      *
-     * @return the length >= 1
+     * @return the length &gt;= 1
      * @see AbstractDocument.Content#length
      */
     public int length() {
@@ -118,7 +118,7 @@
     /**
      * Inserts a string into the content.
      *
-     * @param where the starting position >= 0, < length()
+     * @param where the starting position &gt;= 0, &lt; length()
      * @param str the non-null string to insert
      * @return an UndoableEdit object for undoing
      * @exception BadLocationException if the specified position is invalid
@@ -136,8 +136,8 @@
     /**
      * Removes part of the content.
      *
-     * @param where the starting position >= 0, where + nitems < length()
-     * @param nitems the number of characters to remove >= 0
+     * @param where the starting position &gt;= 0, where + nitems &lt; length()
+     * @param nitems the number of characters to remove &gt;= 0
      * @return an UndoableEdit object for undoing
      * @exception BadLocationException if the specified position is invalid
      * @see AbstractDocument.Content#remove
@@ -156,8 +156,8 @@
     /**
      * Retrieves a portion of the content.
      *
-     * @param where the starting position >= 0
-     * @param len the length to retrieve >= 0
+     * @param where the starting position &gt;= 0
+     * @param len the length to retrieve &gt;= 0
      * @return a string representing the content
      * @exception BadLocationException if the specified position is invalid
      * @see AbstractDocument.Content#getString
@@ -174,8 +174,8 @@
      * span the gap, the actual store is returned to avoid the copy since
      * it is contiguous.
      *
-     * @param where the starting position >= 0, where + len <= length()
-     * @param len the number of characters to retrieve >= 0
+     * @param where the starting position &gt;= 0, where + len &lt;= length()
+     * @param len the number of characters to retrieve &gt;= 0
      * @param chars the Segment object to return the characters in
      * @exception BadLocationException if the specified position is invalid
      * @see AbstractDocument.Content#getChars
@@ -222,7 +222,7 @@
      * Creates a position within the content that will
      * track change as the content is mutated.
      *
-     * @param offset the offset to track >= 0
+     * @param offset the offset to track &gt;= 0
      * @return the position
      * @exception BadLocationException if the specified position is invalid
      */
@@ -705,8 +705,8 @@
      * there. The vector with the resulting Positions are returned.
      *
      * @param v the Vector to use, with a new one created on null
-     * @param offset the starting offset >= 0
-     * @param length the length >= 0
+     * @param offset the starting offset &gt;= 0
+     * @param length the length &gt;= 0
      * @return the set of instances
      */
     protected Vector getPositionsInRange(Vector v, int offset, int length) {
--- a/jdk/src/share/classes/javax/swing/text/GlyphPainter2.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/GlyphPainter2.java	Thu Sep 26 17:18:12 2013 -0700
@@ -239,10 +239,10 @@
                                              Position.Bias[] biasRet)
             throws BadLocationException {
 
+            Document doc = v.getDocument();
             int startOffset = v.getStartOffset();
             int endOffset = v.getEndOffset();
             Segment text;
-            AbstractDocument doc;
             boolean viewIsLeftToRight;
             TextHitInfo currentHit, nextHit;
 
@@ -252,8 +252,7 @@
             case View.SOUTH:
                 break;
             case View.EAST:
-                doc = (AbstractDocument)v.getDocument();
-                viewIsLeftToRight = doc.isLeftToRight(startOffset, endOffset);
+                viewIsLeftToRight = AbstractDocument.isLeftToRight(doc, startOffset, endOffset);
 
                 if(startOffset == doc.getLength()) {
                     if(pos == -1) {
@@ -313,8 +312,7 @@
                 }
                 return pos;
             case View.WEST:
-                doc = (AbstractDocument)v.getDocument();
-                viewIsLeftToRight = doc.isLeftToRight(startOffset, endOffset);
+                viewIsLeftToRight = AbstractDocument.isLeftToRight(doc, startOffset, endOffset);
 
                 if(startOffset == doc.getLength()) {
                     if(pos == -1) {
--- a/jdk/src/share/classes/javax/swing/text/GlyphView.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/GlyphView.java	Thu Sep 26 17:18:12 2013 -0700
@@ -121,8 +121,8 @@
      * the GlyphPainter to determine what characters
      * it should render glyphs for.
      *
-     * @param p0  the starting document offset >= 0
-     * @param p1  the ending document offset >= p0
+     * @param p0  the starting document offset &gt;= 0
+     * @param p1  the ending document offset &gt;= p0
      * @return    the <code>Segment</code> containing the text
      */
      public Segment getText(int p0, int p1) {
@@ -282,9 +282,9 @@
      * tab expansion implementation.
      *
      * @param x the position the view would be located
-     *  at for the purpose of tab expansion >= 0.
+     *  at for the purpose of tab expansion &gt;= 0.
      * @param e how to expand the tabs when encountered.
-     * @return the desired span >= 0
+     * @return the desired span &gt;= 0
      * @see TabableView#getTabbedSpan
      */
     public float getTabbedSpan(float x, TabExpander e) {
@@ -321,9 +321,9 @@
      * arrange for its own text buffer to make the
      * measurements.
      *
-     * @param p0 the starting document offset >= 0
-     * @param p1 the ending document offset >= p0
-     * @return the span >= 0
+     * @param p0 the starting document offset &gt;= 0
+     * @param p1 the ending document offset &gt;= p0
+     * @return the span &gt;= 0
      */
     public float getPartialSpan(int p0, int p1) {
         checkPainter();
@@ -572,7 +572,7 @@
      * axis.
      *
      * @param axis may be either View.X_AXIS or View.Y_AXIS
-     * @return   the span the view would like to be rendered into >= 0.
+     * @return   the span the view would like to be rendered into &gt;= 0.
      *           Typically the view is told to render into the span
      *           that is returned, although there is no guarantee.
      *           The parent may choose to resize or break the view.
@@ -639,7 +639,7 @@
      * Provides a mapping from the document model coordinate space
      * to the coordinate space of the view mapped to it.
      *
-     * @param pos the position to convert >= 0
+     * @param pos the position to convert &gt;= 0
      * @param a   the allocated region to render into
      * @param b   either <code>Position.Bias.Forward</code>
      *                or <code>Position.Bias.Backward</code>
@@ -657,14 +657,14 @@
      * Provides a mapping from the view coordinate space to the logical
      * coordinate space of the model.
      *
-     * @param x the X coordinate >= 0
-     * @param y the Y coordinate >= 0
+     * @param x the X coordinate &gt;= 0
+     * @param y the Y coordinate &gt;= 0
      * @param a the allocated region to render into
      * @param biasReturn either <code>Position.Bias.Forward</code>
      *  or <code>Position.Bias.Backward</code> is returned as the
      *  zero-th element of this array
      * @return the location within the model that best represents the
-     *  given point of view >= 0
+     *  given point of view &gt;= 0
      * @see View#viewToModel
      */
     public int viewToModel(float x, float y, Shape a, Position.Bias[] biasReturn) {
@@ -702,10 +702,10 @@
      *
      * @param axis may be either View.X_AXIS or View.Y_AXIS
      * @param pos the potential location of the start of the
-     *   broken view >= 0.  This may be useful for calculating tab
+     *   broken view &gt;= 0.  This may be useful for calculating tab
      *   positions.
      * @param len specifies the relative length from <em>pos</em>
-     *   where a potential break is desired >= 0.
+     *   where a potential break is desired &gt;= 0.
      * @return the weight, which should be a value between
      *   View.ForcedBreakWeight and View.BadBreakWeight.
      * @see LabelView
@@ -736,12 +736,12 @@
      *
      * @param axis may be either View.X_AXIS or View.Y_AXIS
      * @param p0 the location in the model where the
-     *  fragment should start it's representation >= 0.
+     *  fragment should start it's representation &gt;= 0.
      * @param pos the position along the axis that the
-     *  broken view would occupy >= 0.  This may be useful for
+     *  broken view would occupy &gt;= 0.  This may be useful for
      *  things like tab calculations.
      * @param len specifies the distance along the axis
-     *  where a potential break is desired >= 0.
+     *  where a potential break is desired &gt;= 0.
      * @return the fragment of the view that represents the
      *  given span, if the view can be broken.  If the view
      *  doesn't support breaking behavior, the view itself is
@@ -852,10 +852,10 @@
      * to return a nested class that shares state in this view
      * representing only a portion of the view.
      *
-     * @param p0 the starting offset >= 0.  This should be a value
+     * @param p0 the starting offset &gt;= 0.  This should be a value
      *   greater or equal to the element starting offset and
      *   less than the element ending offset.
-     * @param p1 the ending offset > p0.  This should be a value
+     * @param p1 the ending offset &gt; p0.  This should be a value
      *   less than or equal to the elements end offset and
      *   greater than the elements starting offset.
      * @return the view fragment, or itself if the view doesn't
@@ -880,7 +880,7 @@
      * they just might not allow access to some of the locations in the
      * model.
      *
-     * @param pos the position to convert >= 0
+     * @param pos the position to convert &gt;= 0
      * @param a the allocated region to render into
      * @param direction the direction from the current position that can
      *  be thought of as the arrow keys typically found on a keyboard.
@@ -1196,12 +1196,12 @@
          *
          * @param v the view to find the model location to break at.
          * @param p0 the location in the model where the
-         *  fragment should start it's representation >= 0.
+         *  fragment should start it's representation &gt;= 0.
          * @param x  the graphic location along the axis that the
-         *  broken view would occupy >= 0.  This may be useful for
+         *  broken view would occupy &gt;= 0.  This may be useful for
          *  things like tab calculations.
          * @param len specifies the distance into the view
-         *  where a potential break is desired >= 0.
+         *  where a potential break is desired &gt;= 0.
          * @return the maximum model location possible for a break.
          * @see View#breakView
          */
@@ -1214,8 +1214,8 @@
          * the painter doesn't hold any significant state, it can
          * return itself.  The default behavior is to return itself.
          * @param v  the <code>GlyphView</code> to provide a painter for
-         * @param p0 the starting document offset >= 0
-         * @param p1 the ending document offset >= p0
+         * @param p0 the starting document offset &gt;= 0
+         * @param p1 the ending document offset &gt;= p0
          */
         public GlyphPainter getPainter(GlyphView v, int p0, int p1) {
             return this;
@@ -1229,7 +1229,7 @@
          * model.
          *
          * @param v the view to use
-         * @param pos the position to convert >= 0
+         * @param pos the position to convert &gt;= 0
          * @param b   either <code>Position.Bias.Forward</code>
          *                or <code>Position.Bias.Backward</code>
          * @param a the allocated region to render into
--- a/jdk/src/share/classes/javax/swing/text/Highlighter.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/Highlighter.java	Thu Sep 26 17:18:12 2013 -0700
@@ -66,8 +66,8 @@
      * Adds a highlight to the view.  Returns a tag that can be used
      * to refer to the highlight.
      *
-     * @param p0 the beginning of the range >= 0
-     * @param p1 the end of the range >= p0
+     * @param p0 the beginning of the range &gt;= 0
+     * @param p1 the end of the range &gt;= p0
      * @param p the painter to use for the actual highlighting
      * @return an object that refers to the highlight
      * @exception BadLocationException for an invalid range specification
@@ -93,8 +93,8 @@
      * with a mouse) by damaging only what changed.
      *
      * @param tag  which highlight to change
-     * @param p0 the beginning of the range >= 0
-     * @param p1 the end of the range >= p0
+     * @param p0 the beginning of the range &gt;= 0
+     * @param p1 the end of the range &gt;= p0
      * @exception BadLocationException for an invalid range specification
      */
     public void changeHighlight(Object tag, int p0, int p1) throws BadLocationException;
@@ -115,8 +115,8 @@
          * Renders the highlight.
          *
          * @param g the graphics context
-         * @param p0 the starting offset in the model >= 0
-         * @param p1 the ending offset in the model >= p0
+         * @param p0 the starting offset in the model &gt;= 0
+         * @param p1 the ending offset in the model &gt;= p0
          * @param bounds the bounding box for the highlight
          * @param c the editor
          */
@@ -129,14 +129,14 @@
         /**
          * Gets the starting model offset for the highlight.
          *
-         * @return the starting offset >= 0
+         * @return the starting offset &gt;= 0
          */
         public int getStartOffset();
 
         /**
          * Gets the ending model offset for the highlight.
          *
-         * @return the ending offset >= 0
+         * @return the ending offset &gt;= 0
          */
         public int getEndOffset();
 
--- a/jdk/src/share/classes/javax/swing/text/IconView.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/IconView.java	Thu Sep 26 17:18:12 2013 -0700
@@ -101,7 +101,7 @@
      * along the x axis.
      *
      * @param axis may be either View.X_AXIS or View.Y_AXIS
-     * @return the desired alignment >= 0.0f && <= 1.0f.  This should be
+     * @return the desired alignment &gt;= 0.0f &amp;&amp; &lt;= 1.0f.  This should be
      *   a value between 0.0 and 1.0 where 0 indicates alignment at the
      *   origin and 1.0 indicates alignment to the full span
      *   away from the origin.  An alignment of 0.5 would be the
@@ -120,7 +120,7 @@
      * Provides a mapping from the document model coordinate space
      * to the coordinate space of the view mapped to it.
      *
-     * @param pos the position to convert >= 0
+     * @param pos the position to convert &gt;= 0
      * @param a the allocated region to render into
      * @return the bounding box of the given position
      * @exception BadLocationException  if the given position does not
@@ -145,11 +145,11 @@
      * Provides a mapping from the view coordinate space to the logical
      * coordinate space of the model.
      *
-     * @param x the X coordinate >= 0
-     * @param y the Y coordinate >= 0
+     * @param x the X coordinate &gt;= 0
+     * @param y the Y coordinate &gt;= 0
      * @param a the allocated region to render into
      * @return the location within the model that best represents the
-     *  given point of view >= 0
+     *  given point of view &gt;= 0
      * @see View#viewToModel
      */
     public int viewToModel(float x, float y, Shape a, Position.Bias[] bias) {
--- a/jdk/src/share/classes/javax/swing/text/JTextComponent.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/JTextComponent.java	Thu Sep 26 17:18:12 2013 -0700
@@ -1562,8 +1562,10 @@
     /**
      * Sets the key accelerator that will cause the receiving text
      * component to get the focus.  The accelerator will be the
-     * key combination of the <em>alt</em> key and the character
-     * given (converted to upper case).  By default, there is no focus
+     * key combination of the platform-specific modifier key and
+     * the character given (converted to upper case).  For example,
+     * the ALT key is used as a modifier on Windows and the CTRL+ALT
+     * combination is used on Mac.  By default, there is no focus
      * accelerator key.  Any previous key accelerator setting will be
      * superseded.  A '\0' key setting will be registered, and has the
      * effect of turning off the focus accelerator.  When the new key
--- a/jdk/src/share/classes/javax/swing/text/NavigationFilter.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/NavigationFilter.java	Thu Sep 26 17:18:12 2013 -0700
@@ -57,7 +57,7 @@
      * on the <code>FilterBypass</code>
      *
      * @param fb FilterBypass that can be used to mutate caret position
-     * @param dot the position >= 0
+     * @param dot the position &gt;= 0
      * @param bias Bias to place the dot at
      */
     public void setDot(FilterBypass fb, int dot, Position.Bias bias) {
@@ -72,7 +72,7 @@
      * methods on the <code>FilterBypass</code>.
      *
      * @param fb FilterBypass that can be used to mutate caret position
-     * @param dot the position >= 0
+     * @param dot the position &gt;= 0
      * @param bias Bias for new location
      */
     public void moveDot(FilterBypass fb, int dot, Position.Bias bias) {
@@ -131,7 +131,7 @@
         /**
          * Sets the caret location, bypassing the NavigationFilter.
          *
-         * @param dot the position >= 0
+         * @param dot the position &gt;= 0
          * @param bias Bias to place the dot at
          */
         public abstract void setDot(int dot, Position.Bias bias);
@@ -139,7 +139,7 @@
         /**
          * Moves the caret location, bypassing the NavigationFilter.
          *
-         * @param dot the position >= 0
+         * @param dot the position &gt;= 0
          * @param bias Bias for new location
          */
         public abstract void moveDot(int dot, Position.Bias bias);
--- a/jdk/src/share/classes/javax/swing/text/ParagraphView.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/ParagraphView.java	Thu Sep 26 17:18:12 2013 -0700
@@ -267,8 +267,6 @@
               throws BadLocationException {
         JTextComponent text = (JTextComponent)getContainer();
         Document doc = getDocument();
-        AbstractDocument aDoc = (doc instanceof AbstractDocument) ?
-                                (AbstractDocument)doc : null;
         View row = getView(rowIndex);
         int lastPos = -1;
         // This could be made better to check backward positions too.
@@ -276,8 +274,7 @@
         for(int vc = 0, numViews = row.getViewCount(); vc < numViews; vc++) {
             View v = row.getView(vc);
             int start = v.getStartOffset();
-            boolean ltr = (aDoc != null) ? aDoc.isLeftToRight
-                           (start, start + 1) : true;
+            boolean ltr = AbstractDocument.isLeftToRight(doc, start, start + 1);
             if(ltr) {
                 lastPos = start;
                 for(int end = v.getEndOffset(); lastPos < end; lastPos++) {
@@ -338,12 +335,8 @@
     protected boolean flipEastAndWestAtEnds(int position,
                                             Position.Bias bias) {
         Document doc = getDocument();
-        if(doc instanceof AbstractDocument &&
-           !((AbstractDocument)doc).isLeftToRight(getStartOffset(),
-                                                  getStartOffset() + 1)) {
-            return true;
-        }
-        return false;
+        position = getStartOffset();
+        return !AbstractDocument.isLeftToRight(doc, position, position + 1);
     }
 
     // --- FlowView methods ---------------------------------------------
@@ -416,8 +409,8 @@
      *
      * @param x the X reference position
      * @param tabOffset the position within the text stream
-     *   that the tab occurred at >= 0
-     * @return the trailing end of the tab expansion >= 0
+     *   that the tab occurred at &gt;= 0
+     * @return the trailing end of the tab expansion &gt;= 0
      * @see TabSet
      * @see TabStop
      * @see LabelView
@@ -496,9 +489,9 @@
      * the <code>TabableView</code> interface,
      * the <code>preferredSpan</code> will be used.
      *
-     * @param startOffset the starting document offset >= 0
-     * @param endOffset the ending document offset >= startOffset
-     * @return the size >= 0
+     * @param startOffset the starting document offset &gt;= 0
+     * @param endOffset the ending document offset &gt;= startOffset
+     * @return the size &gt;= 0
      */
     protected float getPartialSize(int startOffset, int endOffset) {
         float size = 0.0f;
@@ -536,7 +529,7 @@
      * there are no characters found, -1 will be returned.
      *
      * @param string the string of characters
-     * @param start where to start in the model >= 0
+     * @param start where to start in the model &gt;= 0
      * @return the document offset, or -1 if no characters found
      */
     protected int findOffsetToCharactersInString(char[] string,
@@ -649,7 +642,7 @@
      * @param axis may be either <code>View.X_AXIS</code>
      *  or <code>View.Y_AXIS</code>
      * @param len specifies where a potential break is desired
-     *  along the given axis >= 0
+     *  along the given axis &gt;= 0
      * @param a the current allocation of the view
      * @return the fragment of the view that represents the
      *  given span, if the view can be broken; if the view
@@ -682,7 +675,7 @@
      *
      * @param axis may be either <code>View.X_AXIS</code>
      *  or <code>View.Y_AXIS</code>
-     * @param len specifies where a potential break is desired >= 0
+     * @param len specifies where a potential break is desired &gt;= 0
      * @return a value indicating the attractiveness of breaking here;
      *  either <code>GoodBreakWeight</code> or <code>BadBreakWeight</code>
      * @see View#getBreakWeight
@@ -1148,7 +1141,7 @@
          * Fetches the child view index representing the given position in
          * the model.
          *
-         * @param pos the position >= 0
+         * @param pos the position &gt;= 0
          * @return  index of the view representing the given position, or
          *   -1 if no view represents that position
          */
--- a/jdk/src/share/classes/javax/swing/text/PasswordView.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/PasswordView.java	Thu Sep 26 17:18:12 2013 -0700
@@ -55,11 +55,11 @@
      * using the value returned by getEchoChar().
      *
      * @param g the graphics context
-     * @param x the starting X coordinate >= 0
-     * @param y the starting Y coordinate >= 0
-     * @param p0 the starting offset in the model >= 0
-     * @param p1 the ending offset in the model >= p0
-     * @return the X location of the end of the range >= 0
+     * @param x the starting X coordinate &gt;= 0
+     * @param y the starting Y coordinate &gt;= 0
+     * @param p0 the starting offset in the model &gt;= 0
+     * @param p1 the ending offset in the model &gt;= p0
+     * @return the X location of the end of the range &gt;= 0
      * @exception BadLocationException if p0 or p1 are out of range
      */
     protected int drawUnselectedText(Graphics g, int x, int y,
@@ -94,11 +94,11 @@
      * display the characters.
      *
      * @param g the graphics context
-     * @param x the starting X coordinate >= 0
-     * @param y the starting Y coordinate >= 0
-     * @param p0 the starting offset in the model >= 0
-     * @param p1 the ending offset in the model >= p0
-     * @return the X location of the end of the range >= 0
+     * @param x the starting X coordinate &gt;= 0
+     * @param y the starting Y coordinate &gt;= 0
+     * @param p0 the starting offset in the model &gt;= 0
+     * @param p1 the ending offset in the model &gt;= p0
+     * @return the X location of the end of the range &gt;= 0
      * @exception BadLocationException if p0 or p1 are out of range
      */
     protected int drawSelectedText(Graphics g, int x,
@@ -126,10 +126,10 @@
      * or unselected text.
      *
      * @param g the graphics context
-     * @param x the starting X coordinate >= 0
-     * @param y the starting Y coordinate >= 0
+     * @param x the starting X coordinate &gt;= 0
+     * @param y the starting Y coordinate &gt;= 0
      * @param c the echo character
-     * @return the updated X position >= 0
+     * @return the updated X position &gt;= 0
      */
     protected int drawEchoCharacter(Graphics g, int x, int y, char c) {
         ONE[0] = c;
@@ -142,7 +142,7 @@
      * Provides a mapping from the document model coordinate space
      * to the coordinate space of the view mapped to it.
      *
-     * @param pos the position to convert >= 0
+     * @param pos the position to convert &gt;= 0
      * @param a the allocated region to render into
      * @return the bounding box of the given position
      * @exception BadLocationException  if the given position does not
@@ -172,8 +172,8 @@
      * Provides a mapping from the view coordinate space to the logical
      * coordinate space of the model.
      *
-     * @param fx the X coordinate >= 0.0f
-     * @param fy the Y coordinate >= 0.0f
+     * @param fx the X coordinate &gt;= 0.0f
+     * @param fy the Y coordinate &gt;= 0.0f
      * @param a the allocated region to render into
      * @return the location within the model that best represents the
      *  given point in the view
@@ -210,7 +210,7 @@
      * axis.
      *
      * @param axis may be either View.X_AXIS or View.Y_AXIS
-     * @return   the span the view would like to be rendered into >= 0.
+     * @return   the span the view would like to be rendered into &gt;= 0.
      *           Typically the view is told to render into the span
      *           that is returned, although there is no guarantee.
      *           The parent may choose to resize or break the view.
--- a/jdk/src/share/classes/javax/swing/text/PlainDocument.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/PlainDocument.java	Thu Sep 26 17:18:12 2013 -0700
@@ -103,7 +103,7 @@
      * <A HREF="http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html">Concurrency
      * in Swing</A> for more information.
      *
-     * @param offs the starting offset >= 0
+     * @param offs the starting offset &gt;= 0
      * @param str the string to insert; does nothing with null/empty strings
      * @param a the attributes for the inserted content
      * @exception BadLocationException  the given insert position is not a valid
--- a/jdk/src/share/classes/javax/swing/text/PlainView.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/PlainView.java	Thu Sep 26 17:18:12 2013 -0700
@@ -66,10 +66,10 @@
      * <code>drawSelectedText</code> so that the way selected and
      * unselected text are rendered can be customized.
      *
-     * @param lineIndex the line to draw >= 0
+     * @param lineIndex the line to draw &gt;= 0
      * @param g the <code>Graphics</code> context
-     * @param x the starting X position >= 0
-     * @param y the starting Y position >= 0
+     * @param x the starting X position &gt;= 0
+     * @param y the starting Y position &gt;= 0
      * @see #drawUnselectedText
      * @see #drawSelectedText
      */
@@ -138,11 +138,11 @@
      * text.  Uses the foreground or disabled color to render the text.
      *
      * @param g the graphics context
-     * @param x the starting X coordinate >= 0
-     * @param y the starting Y coordinate >= 0
-     * @param p0 the beginning position in the model >= 0
-     * @param p1 the ending position in the model >= 0
-     * @return the X location of the end of the range >= 0
+     * @param x the starting X coordinate &gt;= 0
+     * @param y the starting Y coordinate &gt;= 0
+     * @param p0 the beginning position in the model &gt;= 0
+     * @param p1 the ending position in the model &gt;= 0
+     * @return the X location of the end of the range &gt;= 0
      * @exception BadLocationException if the range is invalid
      */
     protected int drawUnselectedText(Graphics g, int x, int y,
@@ -163,10 +163,10 @@
      * the selected background.
      *
      * @param g the graphics context
-     * @param x the starting X coordinate >= 0
-     * @param y the starting Y coordinate >= 0
-     * @param p0 the beginning position in the model >= 0
-     * @param p1 the ending position in the model >= 0
+     * @param x the starting X coordinate &gt;= 0
+     * @param y the starting Y coordinate &gt;= 0
+     * @param p0 the beginning position in the model &gt;= 0
+     * @param p1 the ending position in the model &gt;= 0
      * @return the location of the end of the range
      * @exception BadLocationException if the range is invalid
      */
@@ -218,7 +218,7 @@
      * axis.
      *
      * @param axis may be either View.X_AXIS or View.Y_AXIS
-     * @return   the span the view would like to be rendered into >= 0.
+     * @return   the span the view would like to be rendered into &gt;= 0.
      *           Typically the view is told to render into the span
      *           that is returned, although there is no guarantee.
      *           The parent may choose to resize or break the view.
@@ -332,7 +332,7 @@
      * Provides a mapping from the document model coordinate space
      * to the coordinate space of the view mapped to it.
      *
-     * @param pos the position to convert >= 0
+     * @param pos the position to convert &gt;= 0
      * @param a the allocated region to render into
      * @return the bounding box of the given position
      * @exception BadLocationException  if the given position does not
@@ -369,11 +369,11 @@
      * Provides a mapping from the view coordinate space to the logical
      * coordinate space of the model.
      *
-     * @param fx the X coordinate >= 0
-     * @param fy the Y coordinate >= 0
+     * @param fx the X coordinate &gt;= 0
+     * @param fy the Y coordinate &gt;= 0
      * @param a the allocated region to render into
      * @return the location within the model that best represents the
-     *  given point in the view >= 0
+     *  given point in the view &gt;= 0
      * @see View#viewToModel
      */
     public int viewToModel(float fx, float fy, Shape a, Position.Bias[] bias) {
@@ -482,8 +482,8 @@
      * layout of the view along the given axis, if it
      * has any layout duties.
      *
-     * @param width the width >= 0
-     * @param height the height >= 0
+     * @param width the width &gt;= 0
+     * @param height the height &gt;= 0
      */
     public void setSize(float width, float height) {
         super.setSize(width, height);
@@ -497,10 +497,10 @@
      * This implementation does not support things like centering so it
      * ignores the tabOffset argument.
      *
-     * @param x the current position >= 0
+     * @param x the current position &gt;= 0
      * @param tabOffset the position within the text stream
-     *   that the tab occurred at >= 0.
-     * @return the tab stop, measured in points >= 0
+     *   that the tab occurred at &gt;= 0.
+     * @return the tab stop, measured in points &gt;= 0
      */
     public float nextTabStop(float x, int tabOffset) {
         if (tabSize == 0) {
--- a/jdk/src/share/classes/javax/swing/text/Position.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/Position.java	Thu Sep 26 17:18:12 2013 -0700
@@ -51,7 +51,7 @@
     /**
      * Fetches the current offset within the document.
      *
-     * @return the offset >= 0
+     * @return the offset &gt;= 0
      */
     public int getOffset();
 
--- a/jdk/src/share/classes/javax/swing/text/StringContent.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/StringContent.java	Thu Sep 26 17:18:12 2013 -0700
@@ -61,7 +61,7 @@
 
     /**
      * Creates a new StringContent object, with the initial
-     * size specified.  If the length is < 1, a size of 1 is used.
+     * size specified.  If the length is &lt; 1, a size of 1 is used.
      *
      * @param initialLength the initial size
      */
@@ -77,7 +77,7 @@
     /**
      * Returns the length of the content.
      *
-     * @return the length >= 1
+     * @return the length &gt;= 1
      * @see AbstractDocument.Content#length
      */
     public int length() {
@@ -87,7 +87,7 @@
     /**
      * Inserts a string into the content.
      *
-     * @param where the starting position >= 0 && < length()
+     * @param where the starting position &gt;= 0 &amp;&amp; &lt; length()
      * @param str the non-null string to insert
      * @return an UndoableEdit object for undoing
      * @exception BadLocationException if the specified position is invalid
@@ -106,10 +106,10 @@
     }
 
     /**
-     * Removes part of the content.  where + nitems must be < length().
+     * Removes part of the content.  where + nitems must be &lt; length().
      *
-     * @param where the starting position >= 0
-     * @param nitems the number of characters to remove >= 0
+     * @param where the starting position &gt;= 0
+     * @param nitems the number of characters to remove &gt;= 0
      * @return an UndoableEdit object for undoing
      * @exception BadLocationException if the specified position is invalid
      * @see AbstractDocument.Content#remove
@@ -129,10 +129,10 @@
     }
 
     /**
-     * Retrieves a portion of the content.  where + len must be <= length().
+     * Retrieves a portion of the content.  where + len must be &lt;= length().
      *
-     * @param where the starting position >= 0
-     * @param len the length to retrieve >= 0
+     * @param where the starting position &gt;= 0
+     * @param len the length to retrieve &gt;= 0
      * @return a string representing the content; may be empty
      * @exception BadLocationException if the specified position is invalid
      * @see AbstractDocument.Content#getString
@@ -145,10 +145,10 @@
     }
 
     /**
-     * Retrieves a portion of the content.  where + len must be <= length()
+     * Retrieves a portion of the content.  where + len must be &lt;= length()
      *
-     * @param where the starting position >= 0
-     * @param len the number of characters to retrieve >= 0
+     * @param where the starting position &gt;= 0
+     * @param len the number of characters to retrieve &gt;= 0
      * @param chars the Segment object to return the characters in
      * @exception BadLocationException if the specified position is invalid
      * @see AbstractDocument.Content#getChars
@@ -166,7 +166,7 @@
      * Creates a position within the content that will
      * track change as the content is mutated.
      *
-     * @param offset the offset to create a position for >= 0
+     * @param offset the offset to create a position for &gt;= 0
      * @return the position
      * @exception BadLocationException if the specified position is invalid
      */
@@ -266,8 +266,8 @@
      * to subclasses.
      *
      * @param v the Vector to use, with a new one created on null
-     * @param offset the starting offset >= 0
-     * @param length the length >= 0
+     * @param offset the starting offset &gt;= 0
+     * @param length the length &gt;= 0
      * @return the set of instances
      */
     protected Vector getPositionsInRange(Vector v, int offset,
--- a/jdk/src/share/classes/javax/swing/text/StyleContext.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/StyleContext.java	Thu Sep 26 17:18:12 2013 -0700
@@ -241,7 +241,7 @@
      *
      * @param family the font family (such as "Monospaced")
      * @param style the style of the font (such as Font.PLAIN)
-     * @param size the point size >= 1
+     * @param size the point size &gt;= 1
      * @return the new font
      */
     public Font getFont(String family, int style, int size) {
@@ -1387,7 +1387,7 @@
         /**
          * Gets the number of attributes that are defined.
          *
-         * @return the number of attributes >= 0
+         * @return the number of attributes &gt;= 0
          * @see AttributeSet#getAttributeCount
          */
         public int getAttributeCount() {
--- a/jdk/src/share/classes/javax/swing/text/StyledDocument.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/StyledDocument.java	Thu Sep 26 17:18:12 2013 -0700
@@ -76,8 +76,8 @@
      * giving an Attributes argument that has no attributes defined
      * and setting replace to true.
      *
-     * @param offset the start of the change >= 0
-     * @param length the length of the change >= 0
+     * @param offset the start of the change &gt;= 0
+     * @param length the length of the change &gt;= 0
      * @param s    the non-null attributes to change to.  Any attributes
      *  defined will be applied to the text for the given range.
      * @param replace indicates whether or not the previous
@@ -91,8 +91,8 @@
     /**
      * Sets paragraph attributes.
      *
-     * @param offset the start of the change >= 0
-     * @param length the length of the change >= 0
+     * @param offset the start of the change &gt;= 0
+     * @param length the length of the change &gt;= 0
      * @param s    the non-null attributes to change to.  Any attributes
      *  defined will be applied to the text for the given range.
      * @param replace indicates whether or not the previous
@@ -111,7 +111,7 @@
      * in turn may resolve through some hierarchy completely
      * independent of the element hierarchy in the document.
      *
-     * @param pos the starting position >= 0
+     * @param pos the starting position &gt;= 0
      * @param s the style to set
      */
     public void setLogicalStyle(int pos, Style s);
@@ -119,7 +119,7 @@
     /**
      * Gets a logical style for a given position in a paragraph.
      *
-     * @param p the position >= 0
+     * @param p the position &gt;= 0
      * @return the style
      */
     public Style getLogicalStyle(int p);
@@ -128,7 +128,7 @@
      * Gets the element that represents the paragraph that
      * encloses the given offset within the document.
      *
-     * @param pos the offset >= 0
+     * @param pos the offset &gt;= 0
      * @return the element
      */
     public Element getParagraphElement(int pos);
@@ -137,7 +137,7 @@
      * Gets the element that represents the character that
      * is at the given offset within the document.
      *
-     * @param pos the offset >= 0
+     * @param pos the offset &gt;= 0
      * @return the element
      */
     public Element getCharacterElement(int pos);
--- a/jdk/src/share/classes/javax/swing/text/StyledEditorKit.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/StyledEditorKit.java	Thu Sep 26 17:18:12 2013 -0700
@@ -689,7 +689,7 @@
          * Creates a new AlignmentAction.
          *
          * @param nm the action name
-         * @param a the alignment >= 0
+         * @param a the alignment &gt;= 0
          */
         public AlignmentAction(String nm, int a) {
             super(nm);
--- a/jdk/src/share/classes/javax/swing/text/TabExpander.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/TabExpander.java	Thu Sep 26 17:18:12 2013 -0700
@@ -37,10 +37,10 @@
      * Returns the next tab stop position given a reference
      * position.  Values are expressed in points.
      *
-     * @param x the position in points >= 0
+     * @param x the position in points &gt;= 0
      * @param tabOffset the position within the text stream
-     *   that the tab occurred at >= 0.
-     * @return the next tab stop >= 0
+     *   that the tab occurred at &gt;= 0.
+     * @return the next tab stop &gt;= 0
      */
     float nextTabStop(float x, int tabOffset);
 
--- a/jdk/src/share/classes/javax/swing/text/TabableView.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/TabableView.java	Thu Sep 26 17:18:12 2013 -0700
@@ -46,9 +46,9 @@
      * along the axis of tab expansion.
      *
      * @param x the position the view would be located
-     *  at for the purpose of tab expansion >= 0.
+     *  at for the purpose of tab expansion &gt;= 0.
      * @param e how to expand the tabs when encountered.
-     * @return the desired span >= 0
+     * @return the desired span &gt;= 0
      */
     float getTabbedSpan(float x, TabExpander e);
 
@@ -62,9 +62,9 @@
      * an assumption that the range given does not
      * contain tabs.
      *
-     * @param p0 the starting location in the text document >= 0
-     * @param p1 the ending location in the text document >= p0
-     * @return the span >= 0
+     * @param p0 the starting location in the text document &gt;= 0
+     * @param p1 the ending location in the text document &gt;= p0
+     * @return the span &gt;= 0
      */
     float getPartialSpan(int p0, int p1);
 }
--- a/jdk/src/share/classes/javax/swing/text/TableView.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/TableView.java	Thu Sep 26 17:18:12 2013 -0700
@@ -542,7 +542,7 @@
      * view the children do not necessarily have a one to one mapping
      * with the child elements.
      *
-     * @param pos  the search position >= 0
+     * @param pos  the search position &gt;= 0
      * @param a  the allocation to the table on entry, and the
      *   allocation of the view containing the position on exit
      * @return  the view representing the given position, or
@@ -755,7 +755,7 @@
          * view the children do not necessarily have a one to one mapping
          * with the child elements.
          *
-         * @param pos  the search position >= 0
+         * @param pos  the search position &gt;= 0
          * @param a  the allocation to the table on entry, and the
          *   allocation of the view containing the position on exit
          * @return  the view representing the given position, or
@@ -833,8 +833,8 @@
         /**
          * Sets the grid location.
          *
-         * @param row the row >= 0
-         * @param col the column >= 0
+         * @param row the row &gt;= 0
+         * @param col the column &gt;= 0
          */
         public void setGridLocation(int row, int col) {
             this.row = row;
@@ -871,8 +871,8 @@
         /**
          * Sets the grid location.
          *
-         * @param row the row >= 0
-         * @param col the column >= 0
+         * @param row the row &gt;= 0
+         * @param col the column &gt;= 0
          */
         public void setGridLocation(int row, int col);
 
--- a/jdk/src/share/classes/javax/swing/text/Utilities.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/Utilities.java	Thu Sep 26 17:18:12 2013 -0700
@@ -71,12 +71,12 @@
      * where ints are used and 72dpi is assumed.
      *
      * @param s  the source of the text
-     * @param x  the X origin >= 0
-     * @param y  the Y origin >= 0
+     * @param x  the X origin &gt;= 0
+     * @param y  the Y origin &gt;= 0
      * @param g  the graphics context
      * @param e  how to expand the tabs.  If this value is null,
      *   tabs will be expanded as a space character.
-     * @param startOffset starting offset of the text in the document >= 0
+     * @param startOffset starting offset of the text in the document &gt;= 0
      * @return  the X location at the end of the rendered text
      */
     public static final int drawTabbedText(Segment s, int x, int y, Graphics g,
@@ -92,12 +92,12 @@
      *
      * @param view View requesting rendering, may be null.
      * @param s  the source of the text
-     * @param x  the X origin >= 0
-     * @param y  the Y origin >= 0
+     * @param x  the X origin &gt;= 0
+     * @param y  the Y origin &gt;= 0
      * @param g  the graphics context
      * @param e  how to expand the tabs.  If this value is null,
      *   tabs will be expanded as a space character.
-     * @param startOffset starting offset of the text in the document >= 0
+     * @param startOffset starting offset of the text in the document &gt;= 0
      * @return  the X location at the end of the rendered text
      */
     static final int drawTabbedText(View view,
@@ -197,10 +197,10 @@
      *
      * @param s  the source of the text
      * @param metrics the font metrics to use for the calculation
-     * @param x  the X origin >= 0
+     * @param x  the X origin &gt;= 0
      * @param e  how to expand the tabs.  If this value is null,
      *   tabs will be expanded as a space character.
-     * @param startOffset starting offset of the text in the document >= 0
+     * @param startOffset starting offset of the text in the document &gt;= 0
      * @return  the width of the text
      */
     public static final int getTabbedTextWidth(Segment s, FontMetrics metrics, int x,
@@ -289,13 +289,13 @@
      * @param s  the source of the text
      * @param metrics the font metrics to use for the calculation
      * @param x0 the starting view location representing the start
-     *   of the given text >= 0.
+     *   of the given text &gt;= 0.
      * @param x  the target view location to translate to an
-     *   offset into the text >= 0.
+     *   offset into the text &gt;= 0.
      * @param e  how to expand the tabs.  If this value is null,
      *   tabs will be expanded as a space character.
-     * @param startOffset starting offset of the text in the document >= 0
-     * @return  the offset into the text >= 0
+     * @param startOffset starting offset of the text in the document &gt;= 0
+     * @return  the offset into the text &gt;= 0
      */
     public static final int getTabbedTextOffset(Segment s, FontMetrics metrics,
                                              int x0, int x, TabExpander e,
@@ -488,8 +488,8 @@
      * a value of -1 will be returned.
      *
      * @param c the editor
-     * @param offs the offset in the document >= 0
-     * @return the position >= 0 if the request can be computed, otherwise
+     * @param offs the offset in the document &gt;= 0
+     * @return the position &gt;= 0 if the request can be computed, otherwise
      *  a value of -1 will be returned.
      * @exception BadLocationException if the offset is out of range
      */
@@ -518,8 +518,8 @@
      * a value of -1 will be returned.
      *
      * @param c the editor
-     * @param offs the offset in the document >= 0
-     * @return the position >= 0 if the request can be computed, otherwise
+     * @param offs the offset in the document &gt;= 0
+     * @return the position &gt;= 0 if the request can be computed, otherwise
      *  a value of -1 will be returned.
      * @exception BadLocationException if the offset is out of range
      */
@@ -549,9 +549,9 @@
      * a value of -1 will be returned.
      *
      * @param c the editor
-     * @param offs the offset in the document >= 0
-     * @param x the X coordinate >= 0
-     * @return the position >= 0 if the request can be computed, otherwise
+     * @param offs the offset in the document &gt;= 0
+     * @param x the X coordinate &gt;= 0
+     * @return the position &gt;= 0 if the request can be computed, otherwise
      *  a value of -1 will be returned.
      * @exception BadLocationException if the offset is out of range
      */
@@ -586,9 +586,9 @@
      * a value of -1 will be returned.
      *
      * @param c the editor
-     * @param offs the offset in the document >= 0
-     * @param x the X coordinate >= 0
-     * @return the position >= 0 if the request can be computed, otherwise
+     * @param offs the offset in the document &gt;= 0
+     * @param x the X coordinate &gt;= 0
+     * @return the position &gt;= 0 if the request can be computed, otherwise
      *  a value of -1 will be returned.
      * @exception BadLocationException if the offset is out of range
      */
@@ -622,8 +622,8 @@
      * Uses BreakIterator.getWordInstance() to actually get the words.
      *
      * @param c the editor
-     * @param offs the offset in the document >= 0
-     * @return the location in the model of the word start >= 0
+     * @param offs the offset in the document &gt;= 0
+     * @return the location in the model of the word start &gt;= 0
      * @exception BadLocationException if the offset is out of range
      */
     public static final int getWordStart(JTextComponent c, int offs) throws BadLocationException {
@@ -656,8 +656,8 @@
      * Uses BreakIterator.getWordInstance() to actually get the words.
      *
      * @param c the editor
-     * @param offs the offset in the document >= 0
-     * @return the location in the model of the word end >= 0
+     * @param offs the offset in the document &gt;= 0
+     * @return the location in the model of the word end &gt;= 0
      * @exception BadLocationException if the offset is out of range
      */
     public static final int getWordEnd(JTextComponent c, int offs) throws BadLocationException {
@@ -689,8 +689,8 @@
      * Uses BreakIterator.getWordInstance() to actually get the words.
      *
      * @param c the editor
-     * @param offs the offset in the document >= 0
-     * @return the location in the model of the word start >= 0
+     * @param offs the offset in the document &gt;= 0
+     * @return the location in the model of the word start &gt;= 0
      * @exception BadLocationException if the offset is out of range
      */
     public static final int getNextWord(JTextComponent c, int offs) throws BadLocationException {
@@ -767,8 +767,8 @@
      * Uses BreakIterator.getWordInstance() to actually get the words.
      *
      * @param c the editor
-     * @param offs the offset in the document >= 0
-     * @return the location in the model of the word start >= 0
+     * @param offs the offset in the document &gt;= 0
+     * @return the location in the model of the word start &gt;= 0
      * @exception BadLocationException if the offset is out of range
      */
     public static final int getPreviousWord(JTextComponent c, int offs) throws BadLocationException {
@@ -841,7 +841,7 @@
      * Determines the element to use for a paragraph/line.
      *
      * @param c the editor
-     * @param offs the starting offset in the document >= 0
+     * @param offs the starting offset in the document &gt;= 0
      * @return the element
      */
     public static final Element getParagraphElement(JTextComponent c, int offs) {
@@ -972,7 +972,7 @@
      * must then override the <code>flipEastAndWestAtEnds</code> method.
      *
      * @param v View to query
-     * @param pos the position to convert >= 0
+     * @param pos the position to convert &gt;= 0
      * @param a the allocated region to render into
      * @param direction the direction from the current position that can
      *  be thought of as the arrow keys typically found on a keyboard;
--- a/jdk/src/share/classes/javax/swing/text/View.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/View.java	Thu Sep 26 17:18:12 2013 -0700
@@ -72,12 +72,12 @@
                      alt="The above text describes this graphic.">
     <p>The minimum set of methods for layout are:
     <ul>
-    <li><a href="#getMinimumSpan(int)">getMinimumSpan</a>
-    <li><a href="#getPreferredSpan(int)">getPreferredSpan</a>
-    <li><a href="#getMaximumSpan(int)">getMaximumSpan</a>
-    <li><a href="#getAlignment(int)">getAlignment</a>
-    <li><a href="#preferenceChanged(javax.swing.text.View, boolean, boolean)">preferenceChanged</a>
-    <li><a href="#setSize(float, float)">setSize</a>
+    <li>{@link #getMinimumSpan(int) getMinimumSpan}
+    <li>{@link #getPreferredSpan(int) getPreferredSpan}
+    <li>{@link #getMaximumSpan(int) getMaximumSpan}
+    <li>{@link #getAlignment(int) getAlignment}
+    <li>{@link #preferenceChanged(javax.swing.text.View, boolean, boolean) preferenceChanged}
+    <li>{@link #setSize(float, float) setSize}
     </ul>
 
   <p>The <code>setSize</code> method should be prepared to be called a number of times
@@ -142,7 +142,7 @@
     </ul>
     <p>The methods for rendering are:
     <ul>
-    <li><a href="#paint(java.awt.Graphics, java.awt.Shape)">paint</a>
+    <li>{@link #paint(java.awt.Graphics, java.awt.Shape) paint}
     </ul>
     <p>
 
@@ -153,12 +153,12 @@
     to perform translation to properly locate spatial representation of the model.
     The methods for doing this are:
     <ul>
-    <li><a href="#modelToView(int, javax.swing.text.Position.Bias, int, javax.swing.text.Position.Bias, java.awt.Shape)">modelToView</a>
-    <li><a href="#viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])">viewToModel</a>
-    <li><a href="#getDocument()">getDocument</a>
-    <li><a href="#getElement()">getElement</a>
-    <li><a href="#getStartOffset()">getStartOffset</a>
-    <li><a href="#getEndOffset()">getEndOffset</a>
+    <li>{@link #modelToView(int, javax.swing.text.Position.Bias, int, javax.swing.text.Position.Bias, java.awt.Shape) modelToView}
+    <li>{@link #viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[]) viewToModel}
+    <li>{@link #getDocument() getDocument}
+    <li>{@link #getElement() getElement}
+    <li>{@link #getStartOffset() getStartOffset}
+    <li>{@link #getEndOffset() getEndOffset}
     </ul>
     <p>The layout must be valid prior to attempting to make the translation.
     The translation is not valid, and must not be attempted while changes
@@ -1137,32 +1137,9 @@
      */
     protected void forwardUpdate(DocumentEvent.ElementChange ec,
                                       DocumentEvent e, Shape a, ViewFactory f) {
-        Element elem = getElement();
-        int pos = e.getOffset();
-        int index0 = getViewIndex(pos, Position.Bias.Forward);
-        if (index0 == -1 && e.getType() == DocumentEvent.EventType.REMOVE &&
-            pos >= getEndOffset()) {
-            // Event beyond our offsets. We may have represented this, that is
-            // the remove may have removed one of our child Elements that
-            // represented this, so, we should foward to last element.
-            index0 = getViewCount() - 1;
-        }
-        int index1 = index0;
-        View v = (index0 >= 0) ? getView(index0) : null;
-        if (v != null) {
-            if ((v.getStartOffset() == pos) && (pos > 0)) {
-                // If v is at a boundary, forward the event to the previous
-                // view too.
-                index0 = Math.max(index0 - 1, 0);
-            }
-        }
-        if (e.getType() != DocumentEvent.EventType.REMOVE) {
-            index1 = getViewIndex(pos + e.getLength(), Position.Bias.Forward);
-            if (index1 < 0) {
-                index1 = getViewCount() - 1;
-            }
-        }
-        int hole0 = index1 + 1;
+        calculateUpdateIndexes(e);
+
+        int hole0 = lastUpdateIndex + 1;
         int hole1 = hole0;
         Element[] addedElems = (ec != null) ? ec.getChildrenAdded() : null;
         if ((addedElems != null) && (addedElems.length > 0)) {
@@ -1173,11 +1150,9 @@
         // forward to any view not in the forwarding hole
         // formed by added elements (i.e. they will be updated
         // by initialization.
-        index0 = Math.max(index0, 0);
-        index1 = Math.max((getViewCount() - 1), 0);
-        for (int i = index0; i <= index1; i++) {
+        for (int i = firstUpdateIndex; i <= lastUpdateIndex; i++) {
             if (! ((i >= hole0) && (i <= hole1))) {
-                v = getView(i);
+                View v = getView(i);
                 if (v != null) {
                     Shape childAlloc = getChildAllocation(i, a);
                     forwardUpdateToView(v, e, childAlloc, f);
@@ -1187,6 +1162,39 @@
     }
 
     /**
+     * Calculates the first and the last indexes of the child views
+     * that need to be notified of the change to the model.
+     * @param e the change information from the associated document
+     */
+    void calculateUpdateIndexes(DocumentEvent e) {
+        int pos = e.getOffset();
+        firstUpdateIndex = getViewIndex(pos, Position.Bias.Forward);
+        if (firstUpdateIndex == -1 && e.getType() == DocumentEvent.EventType.REMOVE &&
+            pos >= getEndOffset()) {
+            // Event beyond our offsets. We may have represented this, that is
+            // the remove may have removed one of our child Elements that
+            // represented this, so, we should forward to last element.
+            firstUpdateIndex = getViewCount() - 1;
+        }
+        lastUpdateIndex = firstUpdateIndex;
+        View v = (firstUpdateIndex >= 0) ? getView(firstUpdateIndex) : null;
+        if (v != null) {
+            if ((v.getStartOffset() == pos) && (pos > 0)) {
+                // If v is at a boundary, forward the event to the previous
+                // view too.
+                firstUpdateIndex = Math.max(firstUpdateIndex - 1, 0);
+            }
+        }
+        if (e.getType() != DocumentEvent.EventType.REMOVE) {
+            lastUpdateIndex = getViewIndex(pos + e.getLength(), Position.Bias.Forward);
+            if (lastUpdateIndex < 0) {
+                lastUpdateIndex = getViewCount() - 1;
+            }
+        }
+        firstUpdateIndex = Math.max(firstUpdateIndex, 0);
+    }
+
+    /**
      * Forwards the <code>DocumentEvent</code> to the give child view.  This
      * simply messages the view with a call to <code>insertUpdate</code>,
      * <code>removeUpdate</code>, or <code>changedUpdate</code> depending
@@ -1345,4 +1353,14 @@
     private View parent;
     private Element elem;
 
+    /**
+     * The index of the first child view to be notified.
+     */
+    int firstUpdateIndex;
+
+    /**
+     * The index of the last child view to be notified.
+     */
+    int lastUpdateIndex;
+
 };
--- a/jdk/src/share/classes/javax/swing/text/WrappedPlainView.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/WrappedPlainView.java	Thu Sep 26 17:18:12 2013 -0700
@@ -93,11 +93,11 @@
      * <code>drawSelectedText</code> so that the way selected and
      * unselected text are rendered can be customized.
      *
-     * @param p0 the starting document location to use >= 0
-     * @param p1 the ending document location to use >= p1
+     * @param p0 the starting document location to use &gt;= 0
+     * @param p1 the ending document location to use &gt;= p1
      * @param g the graphics context
-     * @param x the starting X position >= 0
-     * @param y the starting Y position >= 0
+     * @param x the starting X position &gt;= 0
+     * @param y the starting Y position &gt;= 0
      * @see #drawUnselectedText
      * @see #drawSelectedText
      */
@@ -165,11 +165,11 @@
      * text.
      *
      * @param g the graphics context
-     * @param x the starting X coordinate >= 0
-     * @param y the starting Y coordinate >= 0
-     * @param p0 the beginning position in the model >= 0
-     * @param p1 the ending position in the model >= p0
-     * @return the X location of the end of the range >= 0
+     * @param x the starting X coordinate &gt;= 0
+     * @param y the starting Y coordinate &gt;= 0
+     * @param p0 the beginning position in the model &gt;= 0
+     * @param p1 the ending position in the model &gt;= p0
+     * @return the X location of the end of the range &gt;= 0
      * @exception BadLocationException if the range is invalid
      */
     protected int drawUnselectedText(Graphics g, int x, int y,
@@ -190,10 +190,10 @@
      * the selected background.
      *
      * @param g the graphics context
-     * @param x the starting X coordinate >= 0
-     * @param y the starting Y coordinate >= 0
-     * @param p0 the beginning position in the model >= 0
-     * @param p1 the ending position in the model >= p0
+     * @param x the starting X coordinate &gt;= 0
+     * @param y the starting Y coordinate &gt;= 0
+     * @param p0 the beginning position in the model &gt;= 0
+     * @param p1 the ending position in the model &gt;= p0
      * @return the location of the end of the range.
      * @exception BadLocationException if the range is invalid
      */
@@ -326,10 +326,10 @@
      * This implementation does not support things like centering so it
      * ignores the tabOffset argument.
      *
-     * @param x the current position >= 0
+     * @param x the current position &gt;= 0
      * @param tabOffset the position within the text stream
-     *   that the tab occurred at >= 0.
-     * @return the tab stop, measured in points >= 0
+     *   that the tab occurred at &gt;= 0.
+     * @return the tab stop, measured in points &gt;= 0
      */
     public float nextTabStop(float x, int tabOffset) {
         if (tabSize == 0)
@@ -374,8 +374,8 @@
      * layout of the view along the given axis, if it
      * has any layout duties.
      *
-     * @param width the width >= 0
-     * @param height the height >= 0
+     * @param width the width &gt;= 0
+     * @param height the height &gt;= 0
      */
     public void setSize(float width, float height) {
         updateMetrics();
--- a/jdk/src/share/classes/javax/swing/text/ZoneView.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/ZoneView.java	Thu Sep 26 17:18:12 2013 -0700
@@ -130,7 +130,7 @@
      *
      * @param mzl the desired maximum number of zones
      *  to be actively loaded, must be greater than 0
-     * @exception IllegalArgumentException if <code>mzl</code> is < 1
+     * @exception IllegalArgumentException if <code>mzl</code> is &lt; 1
      */
     public void setMaxZonesLoaded(int mzl) {
         if (mzl < 1) {
@@ -198,11 +198,11 @@
      * implementation for a zone by changing this method.
      *
      * @param p0 the start of the desired zone.  This should
-     *  be >= getStartOffset() and < getEndOffset().  This
-     *  value should also be < p1.
+     *  be &gt;= getStartOffset() and &lt; getEndOffset().  This
+     *  value should also be &lt; p1.
      * @param p1 the end of the desired zone.  This should
-     *  be > getStartOffset() and <= getEndOffset().  This
-     *  value should also be > p0.
+     *  be &gt; getStartOffset() and &lt;= getEndOffset().  This
+     *  value should also be &gt; p0.
      */
     protected View createZone(int p0, int p1) {
         Document doc = getDocument();
@@ -242,7 +242,7 @@
      * Returns the child view index representing the given position in
      * the model.
      *
-     * @param pos the position >= 0
+     * @param pos the position &gt;= 0
      * @return  index of the view representing the given position, or
      *   -1 if no view represents that position
      */
--- a/jdk/src/share/classes/javax/swing/text/html/BlockView.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/html/BlockView.java	Thu Sep 26 17:18:12 2013 -0700
@@ -352,7 +352,7 @@
      *
      * @param axis may be either <code>View.X_AXIS</code>
      *           or <code>View.Y_AXIS</code>
-     * @return   the span the view would like to be rendered into >= 0;
+     * @return   the span the view would like to be rendered into &gt;= 0;
      *           typically the view is told to render into the span
      *           that is returned, although there is no guarantee;
      *           the parent may choose to resize or break the view
@@ -368,7 +368,7 @@
      *
      * @param axis may be either <code>View.X_AXIS</code>
      *           or <code>View.Y_AXIS</code>
-     * @return  the span the view would like to be rendered into >= 0;
+     * @return  the span the view would like to be rendered into &gt;= 0;
      *           typically the view is told to render into the span
      *           that is returned, although there is no guarantee;
      *           the parent may choose to resize or break the view
@@ -384,7 +384,7 @@
      *
      * @param axis may be either <code>View.X_AXIS</code>
      *           or <code>View.Y_AXIS</code>
-     * @return   the span the view would like to be rendered into >= 0;
+     * @return   the span the view would like to be rendered into &gt;= 0;
      *           typically the view is told to render into the span
      *           that is returned, although there is no guarantee;
      *           the parent may choose to resize or break the view
--- a/jdk/src/share/classes/javax/swing/text/html/CSS.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/html/CSS.java	Thu Sep 26 17:18:12 2013 -0700
@@ -117,7 +117,7 @@
  * </ul>
  * <p><b>Note: for the time being we do not fully support relative units,
  * unless noted, so that
- * p { margin-top: 10% } will be treated as if no margin-top was specified.
+ * p { margin-top: 10% } will be treated as if no margin-top was specified.</b>
  *
  * @author  Timothy Prinzing
  * @author  Scott Violet
--- a/jdk/src/share/classes/javax/swing/text/html/FormView.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/html/FormView.java	Thu Sep 26 17:18:12 2013 -0700
@@ -380,7 +380,7 @@
      * axis of interest.
      *
      * @param axis may be either View.X_AXIS or View.Y_AXIS
-     * @return   the span the view would like to be rendered into >= 0.
+     * @return   the span the view would like to be rendered into &gt;= 0.
      *           Typically the view is told to render into the span
      *           that is returned, although there is no guarantee.
      *           The parent may choose to resize or break the view.
--- a/jdk/src/share/classes/javax/swing/text/html/HTMLDocument.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/html/HTMLDocument.java	Thu Sep 26 17:18:12 2013 -0700
@@ -107,21 +107,21 @@
  * <p>With the following HTML content:</p>
  *
  * <pre>
- * &lt;html>
- *   &lt;head>
- *     &lt;title>An example HTMLDocument&lt;/title>
- *     &lt;style type="text/css">
+ * &lt;html&gt;
+ *   &lt;head&gt;
+ *     &lt;title&gt;An example HTMLDocument&lt;/title&gt;
+ *     &lt;style type="text/css"&gt;
  *       div { background-color: silver; }
  *       ul { color: red; }
- *     &lt;/style>
- *   &lt;/head>
- *   &lt;body>
- *     &lt;div id="BOX">
- *       &lt;p>Paragraph 1&lt;/p>
- *       &lt;p>Paragraph 2&lt;/p>
- *     &lt;/div>
- *   &lt;/body>
- * &lt;/html>
+ *     &lt;/style&gt;
+ *   &lt;/head&gt;
+ *   &lt;body&gt;
+ *     &lt;div id="BOX"&gt;
+ *       &lt;p&gt;Paragraph 1&lt;/p&gt;
+ *       &lt;p&gt;Paragraph 2&lt;/p&gt;
+ *     &lt;/div&gt;
+ *   &lt;/body&gt;
+ * &lt;/html&gt;
  * </pre>
  *
  * <p>All the methods for modifying an HTML document require an {@link
@@ -149,10 +149,10 @@
  * of any non-leaf element by using the methods
  * <code>insertAfterStart</code> and <code>insertBeforeEnd</code>.
  * For example, if <code>e</code> is the <code>DIV</code> element,
- * <code>d.insertAfterStart(e, "&lt;ul>&lt;li>List
- * Item&lt;/li>&lt;/ul>")</code> inserts the list before the first
- * paragraph, and <code>d.insertBeforeEnd(e, "&lt;ul>&lt;li>List
- * Item&lt;/li>&lt;/ul>")</code> inserts the list after the last
+ * <code>d.insertAfterStart(e, "&lt;ul&gt;&lt;li&gt;List
+ * Item&lt;/li&gt;&lt;/ul&gt;")</code> inserts the list before the first
+ * paragraph, and <code>d.insertBeforeEnd(e, "&lt;ul&gt;&lt;li&gt;List
+ * Item&lt;/li&gt;&lt;/ul&gt;")</code> inserts the list after the last
  * paragraph.  The <code>DIV</code> block becomes the parent of the
  * newly inserted elements.</p>
  *
@@ -160,9 +160,9 @@
  * using the methods <code>insertBeforeStart</code> and
  * <code>insertAfterEnd</code>.  For example, if <code>e</code> is the
  * <code>DIV</code> element, <code>d.insertBeforeStart(e,
- * "&lt;ul>&lt;li>List Item&lt;/li>&lt;/ul>")</code> inserts the list
+ * "&lt;ul&gt;&lt;li&gt;List Item&lt;/li&gt;&lt;/ul&gt;")</code> inserts the list
  * before the <code>DIV</code> element, and <code>d.insertAfterEnd(e,
- * "&lt;ul>&lt;li>List Item&lt;/li>&lt;/ul>")</code> inserts the list
+ * "&lt;ul&gt;&lt;li&gt;List Item&lt;/li&gt;&lt;/ul&gt;")</code> inserts the list
  * after the <code>DIV</code> element.  The newly inserted elements
  * become siblings of the <code>DIV</code> element.</p>
  *
@@ -171,10 +171,10 @@
  * <p>Elements and all their descendants can be replaced by using the
  * methods <code>setInnerHTML</code> and <code>setOuterHTML</code>.
  * For example, if <code>e</code> is the <code>DIV</code> element,
- * <code>d.setInnerHTML(e, "&lt;ul>&lt;li>List
- * Item&lt;/li>&lt;/ul>")</code> replaces all children paragraphs with
- * the list, and <code>d.setOuterHTML(e, "&lt;ul>&lt;li>List
- * Item&lt;/li>&lt;/ul>")</code> replaces the <code>DIV</code> element
+ * <code>d.setInnerHTML(e, "&lt;ul&gt;&lt;li&gt;List
+ * Item&lt;/li&gt;&lt;/ul&gt;")</code> replaces all children paragraphs with
+ * the list, and <code>d.setOuterHTML(e, "&lt;ul&gt;&lt;li&gt;List
+ * Item&lt;/li&gt;&lt;/ul&gt;")</code> replaces the <code>DIV</code> element
  * itself.  In latter case the parent of the list is the
  * <code>BODY</code> element.
  *
@@ -184,6 +184,7 @@
  * of various methods described above.</p>
  *
  * <table border=1 cellspacing=0>
+ *   <caption></caption>
  *   <tr>
  *     <th>Example</th>
  *     <th><code>insertAfterStart</code></th>
@@ -985,25 +986,25 @@
      * parameter is <b>in bold</b>).</p>
      *
      * <pre>
-     *     &lt;body>
+     *     &lt;body&gt;
      *       |
-     *     <b>&lt;div></b>
+     *     <b>&lt;div&gt;</b>
      *      /  \
-     *    &lt;p>   &lt;p>
+     *    &lt;p&gt;   &lt;p&gt;
      * </pre>
      *
-     * <p>Invoking <code>setInnerHTML(elem, "&lt;ul>&lt;li>")</code>
+     * <p>Invoking <code>setInnerHTML(elem, "&lt;ul&gt;&lt;li&gt;")</code>
      * results in the following structure (new elements are <font
      * color="red">in red</font>).</p>
      *
      * <pre>
-     *     &lt;body>
+     *     &lt;body&gt;
      *       |
-     *     <b>&lt;div></b>
+     *     <b>&lt;div&gt;</b>
      *         \
-     *         <font color="red">&lt;ul></font>
+     *         <font color="red">&lt;ul&gt;</font>
      *           \
-     *           <font color="red">&lt;li></font>
+     *           <font color="red">&lt;li&gt;</font>
      * </pre>
      *
      * <p>Parameter <code>elem</code> must not be a leaf element,
@@ -1066,23 +1067,23 @@
      * parameter is <b>in bold</b>).</p>
      *
      * <pre>
-     *     &lt;body>
+     *     &lt;body&gt;
      *       |
-     *     <b>&lt;div></b>
+     *     <b>&lt;div&gt;</b>
      *      /  \
-     *    &lt;p>   &lt;p>
+     *    &lt;p&gt;   &lt;p&gt;
      * </pre>
      *
-     * <p>Invoking <code>setOuterHTML(elem, "&lt;ul>&lt;li>")</code>
+     * <p>Invoking <code>setOuterHTML(elem, "&lt;ul&gt;&lt;li&gt;")</code>
      * results in the following structure (new elements are <font
      * color="red">in red</font>).</p>
      *
      * <pre>
-     *    &lt;body>
+     *    &lt;body&gt;
      *      |
-     *     <font color="red">&lt;ul></font>
+     *     <font color="red">&lt;ul&gt;</font>
      *       \
-     *       <font color="red">&lt;li></font>
+     *       <font color="red">&lt;li&gt;</font>
      * </pre>
      *
      * <p>If either <code>elem</code> or <code>htmlText</code>
@@ -1136,25 +1137,25 @@
      * parameter is <b>in bold</b>).</p>
      *
      * <pre>
-     *     &lt;body>
+     *     &lt;body&gt;
      *       |
-     *     <b>&lt;div></b>
+     *     <b>&lt;div&gt;</b>
      *      /  \
-     *    &lt;p>   &lt;p>
+     *    &lt;p&gt;   &lt;p&gt;
      * </pre>
      *
      * <p>Invoking <code>insertAfterStart(elem,
-     * "&lt;ul>&lt;li>")</code> results in the following structure
+     * "&lt;ul&gt;&lt;li&gt;")</code> results in the following structure
      * (new elements are <font color="red">in red</font>).</p>
      *
      * <pre>
-     *        &lt;body>
+     *        &lt;body&gt;
      *          |
-     *        <b>&lt;div></b>
+     *        <b>&lt;div&gt;</b>
      *       /  |  \
-     *    <font color="red">&lt;ul></font> &lt;p> &lt;p>
+     *    <font color="red">&lt;ul&gt;</font> &lt;p&gt; &lt;p&gt;
      *     /
-     *  <font color="red">&lt;li></font>
+     *  <font color="red">&lt;li&gt;</font>
      * </pre>
      *
      * <p>Unlike the <code>insertBeforeStart</code> method, new
@@ -1206,25 +1207,25 @@
      * parameter is <b>in bold</b>).</p>
      *
      * <pre>
-     *     &lt;body>
+     *     &lt;body&gt;
      *       |
-     *     <b>&lt;div></b>
+     *     <b>&lt;div&gt;</b>
      *      /  \
-     *    &lt;p>   &lt;p>
+     *    &lt;p&gt;   &lt;p&gt;
      * </pre>
      *
-     * <p>Invoking <code>insertBeforeEnd(elem, "&lt;ul>&lt;li>")</code>
+     * <p>Invoking <code>insertBeforeEnd(elem, "&lt;ul&gt;&lt;li&gt;")</code>
      * results in the following structure (new elements are <font
      * color="red">in red</font>).</p>
      *
      * <pre>
-     *        &lt;body>
+     *        &lt;body&gt;
      *          |
-     *        <b>&lt;div></b>
+     *        <b>&lt;div&gt;</b>
      *       /  |  \
-     *     &lt;p> &lt;p> <font color="red">&lt;ul></font>
+     *     &lt;p&gt; &lt;p&gt; <font color="red">&lt;ul&gt;</font>
      *               \
-     *               <font color="red">&lt;li></font>
+     *               <font color="red">&lt;li&gt;</font>
      * </pre>
      *
      * <p>Unlike the <code>insertAfterEnd</code> method, new elements
@@ -1273,23 +1274,23 @@
      * parameter is <b>in bold</b>).</p>
      *
      * <pre>
-     *     &lt;body>
+     *     &lt;body&gt;
      *       |
-     *     <b>&lt;div></b>
+     *     <b>&lt;div&gt;</b>
      *      /  \
-     *    &lt;p>   &lt;p>
+     *    &lt;p&gt;   &lt;p&gt;
      * </pre>
      *
      * <p>Invoking <code>insertBeforeStart(elem,
-     * "&lt;ul>&lt;li>")</code> results in the following structure
+     * "&lt;ul&gt;&lt;li&gt;")</code> results in the following structure
      * (new elements are <font color="red">in red</font>).</p>
      *
      * <pre>
-     *        &lt;body>
+     *        &lt;body&gt;
      *         /  \
-     *      <font color="red">&lt;ul></font> <b>&lt;div></b>
+     *      <font color="red">&lt;ul&gt;</font> <b>&lt;div&gt;</b>
      *       /    /  \
-     *     <font color="red">&lt;li></font> &lt;p>  &lt;p>
+     *     <font color="red">&lt;li&gt;</font> &lt;p&gt;  &lt;p&gt;
      * </pre>
      *
      * <p>Unlike the <code>insertAfterStart</code> method, new
@@ -1331,23 +1332,23 @@
      * parameter is <b>in bold</b>).</p>
      *
      * <pre>
-     *     &lt;body>
+     *     &lt;body&gt;
      *       |
-     *     <b>&lt;div></b>
+     *     <b>&lt;div&gt;</b>
      *      /  \
-     *    &lt;p>   &lt;p>
+     *    &lt;p&gt;   &lt;p&gt;
      * </pre>
      *
-     * <p>Invoking <code>insertAfterEnd(elem, "&lt;ul>&lt;li>")</code>
+     * <p>Invoking <code>insertAfterEnd(elem, "&lt;ul&gt;&lt;li&gt;")</code>
      * results in the following structure (new elements are <font
      * color="red">in red</font>).</p>
      *
      * <pre>
-     *        &lt;body>
+     *        &lt;body&gt;
      *         /  \
-     *      <b>&lt;div></b> <font color="red">&lt;ul></font>
+     *      <b>&lt;div&gt;</b> <font color="red">&lt;ul&gt;</font>
      *       / \    \
-     *     &lt;p> &lt;p>  <font color="red">&lt;li></font>
+     *     &lt;p&gt; &lt;p&gt;  <font color="red">&lt;li&gt;</font>
      * </pre>
      *
      * <p>Unlike the <code>insertBeforeEnd</code> method, new elements
@@ -2166,7 +2167,7 @@
      * <tr><td><code>HTML.Tag.VAR</code>       <td>CharacterAction
      * </table>
      * <p>
-     * Once &lt;/html> is encountered, the Actions are no longer notified.
+     * Once &lt;/html&gt; is encountered, the Actions are no longer notified.
      */
     public class HTMLReader extends HTMLEditorKit.ParserCallback {
 
--- a/jdk/src/share/classes/javax/swing/text/html/HTMLEditorKit.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/html/HTMLEditorKit.java	Thu Sep 26 17:18:12 2013 -0700
@@ -55,7 +55,6 @@
  * an effect upon the way that HTML is modeled.  These
  * have influenced its design in a substantial way.
  * <dl>
- * <p>
  * <dt>
  * Support editing
  * <dd>
--- a/jdk/src/share/classes/javax/swing/text/html/ImageView.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/html/ImageView.java	Thu Sep 26 17:18:12 2013 -0700
@@ -554,8 +554,8 @@
      * Sets the size of the view.  This should cause
      * layout of the view if it has any layout duties.
      *
-     * @param width the width >= 0
-     * @param height the height >= 0
+     * @param width the width &gt;= 0
+     * @param height the height &gt;= 0
      */
     public void setSize(float width, float height) {
         sync();
--- a/jdk/src/share/classes/javax/swing/text/html/InlineView.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/html/InlineView.java	Thu Sep 26 17:18:12 2013 -0700
@@ -130,10 +130,10 @@
      *
      * @param axis may be either View.X_AXIS or View.Y_AXIS
      * @param pos the potential location of the start of the
-     *   broken view >= 0.  This may be useful for calculating tab
+     *   broken view &gt;= 0.  This may be useful for calculating tab
      *   positions.
      * @param len specifies the relative length from <em>pos</em>
-     *   where a potential break is desired >= 0.
+     *   where a potential break is desired &gt;= 0.
      * @return the weight, which should be a value between
      *   ForcedBreakWeight and BadBreakWeight.
      * @see LabelView
@@ -162,14 +162,14 @@
      * @param axis may be either <code>View.X_AXIS</code> or
      *          <code>View.Y_AXIS</code>
      * @param offset the location in the document model
-     *   that a broken fragment would occupy >= 0.  This
+     *   that a broken fragment would occupy &gt;= 0.  This
      *   would be the starting offset of the fragment
      *   returned
      * @param pos the position along the axis that the
-     *  broken view would occupy >= 0.  This may be useful for
+     *  broken view would occupy &gt;= 0.  This may be useful for
      *  things like tab calculations
      * @param len specifies the distance along the axis
-     *  where a potential break is desired >= 0
+     *  where a potential break is desired &gt;= 0
      * @return the fragment of the view that represents the
      *  given span.
      * @since 1.5
--- a/jdk/src/share/classes/javax/swing/text/html/StyleSheet.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/html/StyleSheet.java	Thu Sep 26 17:18:12 2013 -0700
@@ -74,7 +74,7 @@
  * is stored to translate the context of an element to a
  * rule quickly.  The following code fragment will display
  * the named styles, and therefore the CSS rules contained.
- * <code><pre>
+ * <pre><code>
  * &nbsp;
  * &nbsp; import java.util.*;
  * &nbsp; import javax.swing.text.*;
@@ -97,7 +97,7 @@
  * &nbsp;     }
  * &nbsp; }
  * &nbsp;
- * </pre></code>
+ * </code></pre>
  * <p>
  * The semantics for when a CSS style should overide visual attributes
  * defined by an element are not well defined. For example, the html
--- a/jdk/src/share/classes/javax/swing/text/html/parser/ContentModel.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/html/parser/ContentModel.java	Thu Sep 26 17:18:12 2013 -0700
@@ -42,7 +42,7 @@
  */
 public final class ContentModel implements Serializable {
     /**
-     * Type. Either '*', '?', '+', ',', '|', '&'.
+     * Type. Either '*', '?', '+', ',', '|', '&amp;'.
      */
     public int type;
 
@@ -52,7 +52,7 @@
     public Object content;
 
     /**
-     * The next content model (in a ',', '|' or '&' expression).
+     * The next content model (in a ',', '|' or '&amp;' expression).
      */
     public ContentModel next;
 
--- a/jdk/src/share/classes/javax/swing/text/html/parser/DocumentParser.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/html/parser/DocumentParser.java	Thu Sep 26 17:18:12 2013 -0700
@@ -48,8 +48,8 @@
  *     <li><i>handleStartTag(head, ...)</i></li>
  *     <li><i>handleEndTag(head)</i></li>
  *     <li><i>handleStartTag(body, ...)</i></li>
- *     <li>handleStartTag(p, ...)</i></li>
- *     <li>handleText(...)</li>
+ *     <li><i>handleStartTag(p, ...)</i></li>
+ *     <li><i>handleText(...)</i></li>
  *     <li><i>handleEndTag(p)</i></li>
  *     <li><i>handleEndTag(body)</i></li>
  *     <li><i>handleEndTag(html)</i></li>
--- a/jdk/src/share/classes/javax/swing/text/html/parser/Parser.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/text/html/parser/Parser.java	Thu Sep 26 17:18:12 2013 -0700
@@ -58,12 +58,12 @@
  * space should be used here, but I am using &amp;nbsp to force the space to
  * be displayed):
  * <p>
- * '&lt;b>blah&nbsp;&lt;i>&nbsp;&lt;strike>&nbsp;foo' which can be treated as:
- * '&lt;b>blah&nbsp;&lt;i>&lt;strike>foo'
+ * '&lt;b&gt;blah&nbsp;&lt;i&gt;&nbsp;&lt;strike&gt;&nbsp;foo' which can be treated as:
+ * '&lt;b&gt;blah&nbsp;&lt;i&gt;&lt;strike&gt;foo'
  * <p>as well as:
- * '&lt;p>&lt;a href="xx">&nbsp;&lt;em>Using&lt;/em>&lt;/a>&lt;/p>'
+ * '&lt;p&gt;&lt;a href="xx"&gt;&nbsp;&lt;em&gt;Using&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;'
  * which appears to be treated as:
- * '&lt;p>&lt;a href="xx">&lt;em>Using&lt;/em>&lt;/a>&lt;/p>'
+ * '&lt;p&gt;&lt;a href="xx"&gt;&lt;em&gt;Using&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;'
  * <p>
  * If <code>strict</code> is false, when a tag that breaks flow,
  * (<code>TagElement.breaksFlows</code>) or trailing whitespace is
--- a/jdk/src/share/classes/javax/swing/tree/AbstractLayoutCache.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/tree/AbstractLayoutCache.java	Thu Sep 26 17:18:12 2013 -0700
@@ -60,7 +60,7 @@
     protected boolean            rootVisible;
 
     /**
-      * Height to use for each row.  If this is <= 0 the renderer will be
+      * Height to use for each row.  If this is &lt;= 0 the renderer will be
       * used to determine the height for each row.
       */
     protected int                rowHeight;
--- a/jdk/src/share/classes/javax/swing/tree/DefaultTreeCellEditor.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/tree/DefaultTreeCellEditor.java	Thu Sep 26 17:18:12 2013 -0700
@@ -430,7 +430,7 @@
 
     /**
      * Returns true if <code>event</code> is <code>null</code>,
-     * or it is a <code>MouseEvent</code> with a click count > 2
+     * or it is a <code>MouseEvent</code> with a click count &gt; 2
      * and <code>inHitRegion</code> returns true.
      * @param event the event being studied
      */
@@ -448,7 +448,7 @@
     /**
      * Returns true if the passed in location is a valid mouse location
      * to start editing from. This is implemented to return false if
-     * <code>x</code> is <= the width of the icon and icon gap displayed
+     * <code>x</code> is &lt;= the width of the icon and icon gap displayed
      * by the renderer. In other words this returns true if the user
      * clicks over the text part displayed by the renderer, and false
      * otherwise.
--- a/jdk/src/share/classes/javax/swing/tree/DefaultTreeCellRenderer.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/tree/DefaultTreeCellRenderer.java	Thu Sep 26 17:18:12 2013 -0700
@@ -60,8 +60,7 @@
  * that have a value of type {@code UIResource} are refreshed from the
  * defaults table. The following table lists the mapping between
  * {@code DefaultTreeCellRenderer} property and defaults table key:
- * <table border="1" cellpadding="1" cellspacing="0"
- *         valign="top" >
+ * <table border="1" cellpadding="1" cellspacing="0" summary="">
  *   <tr valign="top"  align="left">
  *     <th bgcolor="#CCCCFF" align="left">Property:
  *     <th bgcolor="#CCCCFF" align="left">Key:
--- a/jdk/src/share/classes/javax/swing/tree/DefaultTreeModel.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/tree/DefaultTreeModel.java	Thu Sep 26 17:18:12 2013 -0700
@@ -164,8 +164,8 @@
      * Returns the child of <I>parent</I> at index <I>index</I> in the parent's
      * child array.  <I>parent</I> must be a node previously obtained from
      * this data source. This should not return null if <i>index</i>
-     * is a valid index for <i>parent</i> (that is <i>index</i> >= 0 &&
-     * <i>index</i> < getChildCount(<i>parent</i>)).
+     * is a valid index for <i>parent</i> (that is <i>index</i> &gt;= 0 &amp;&amp;
+     * <i>index</i> &lt; getChildCount(<i>parent</i>)).
      *
      * @param   parent  a node in the tree, obtained from this data source
      * @return  the child of <I>parent</I> at index <I>index</I>
--- a/jdk/src/share/classes/javax/swing/tree/TreeCellRenderer.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/tree/TreeCellRenderer.java	Thu Sep 26 17:18:12 2013 -0700
@@ -59,8 +59,8 @@
      * <pre>
      *     JTree.DropLocation dropLocation = tree.getDropLocation();
      *     if (dropLocation != null
-     *             && dropLocation.getChildIndex() == -1
-     *             && tree.getRowForPath(dropLocation.getPath()) == row) {
+     *             &amp;&amp; dropLocation.getChildIndex() == -1
+     *             &amp;&amp; tree.getRowForPath(dropLocation.getPath()) == row) {
      *
      *         // this row represents the current drop location
      *         // so render it specially, perhaps with a different color
--- a/jdk/src/share/classes/javax/swing/tree/TreeModel.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/tree/TreeModel.java	Thu Sep 26 17:18:12 2013 -0700
@@ -76,8 +76,8 @@
      * child array.  <code>parent</code> must be a node previously obtained
      * from this data source. This should not return <code>null</code>
      * if <code>index</code>
-     * is a valid index for <code>parent</code> (that is <code>index >= 0 &&
-     * index < getChildCount(parent</code>)).
+     * is a valid index for <code>parent</code> (that is <code>index &gt;= 0 &amp;&amp;
+     * index &lt; getChildCount(parent</code>)).
      *
      * @param   parent  a node in the tree, obtained from this data source
      * @return  the child of <code>parent</code> at index <code>index</code>
--- a/jdk/src/share/classes/javax/swing/undo/UndoManager.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/javax/swing/undo/UndoManager.java	Thu Sep 26 17:18:12 2013 -0700
@@ -57,9 +57,9 @@
  * and italicized are insignificant.
  * <p>
  * <a name="figure1"></a>
- * <table border=0>
+ * <table border=0 summary="">
  * <tr><td>
- *     <img src="doc-files/UndoManager-1.gif">
+ *     <img src="doc-files/UndoManager-1.gif" alt="">
  * <tr><td align=center>Figure 1
  * </table>
  * <p>
@@ -70,9 +70,9 @@
  * figure.
  * <p>
  * <a name="figure2"></a>
- * <table border=0>
+ * <table border=0 summary="">
  * <tr><td>
- *     <img src="doc-files/UndoManager-2.gif">
+ *     <img src="doc-files/UndoManager-2.gif" alt="">
  * <tr><td align=center>Figure 2
  * </table>
  * <p>
@@ -82,9 +82,9 @@
  * next edit to 0, as shown in the following figure.
  * <p>
  * <a name="figure3"></a>
- * <table border=0>
+ * <table border=0 summary="">
  * <tr><td>
- *     <img src="doc-files/UndoManager-3.gif">
+ *     <img src="doc-files/UndoManager-3.gif" alt="">
  * <tr><td align=center>Figure 3
  * </table>
  * <p>
@@ -108,9 +108,9 @@
  * figure.
  * <p>
  * <a name="figure4"></a>
- * <table border=0>
+ * <table border=0 summary="">
  * <tr><td>
- *     <img src="doc-files/UndoManager-4.gif">
+ *     <img src="doc-files/UndoManager-4.gif" alt="">
  * <tr><td align=center>Figure 4
  * </table>
  * <p>
--- a/jdk/src/share/classes/sun/awt/AWTAccessor.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/sun/awt/AWTAccessor.java	Thu Sep 26 17:18:12 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2013, 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
@@ -39,6 +39,7 @@
 import java.security.AccessControlContext;
 
 import java.io.File;
+import java.util.ResourceBundle;
 import java.util.Vector;
 
 /**
@@ -236,6 +237,11 @@
          */
         AccessControlContext getAccessControlContext(Component comp);
 
+        /**
+         * Revalidates the component synchronously.
+         */
+        void revalidateSynchronously(Component comp);
+
     }
 
     /*
@@ -246,6 +252,14 @@
          * Validates the container unconditionally.
          */
         void validateUnconditionally(Container cont);
+
+        /**
+         *
+         * Access to the private version of findComponentAt method which has
+         * a controllable behavior. Setting 'ignoreEnabled' to 'false'
+         * bypasses disabled Components during the search.
+         */
+        Component findComponentAt(Container cont, int x, int y, boolean ignoreEnabled);
     }
 
     /*
@@ -700,6 +714,13 @@
     }
 
     /*
+     * An accessor for the Toolkit class
+     */
+    public interface ToolkitAccessor {
+        void setPlatformResources(ResourceBundle bundle);
+    }
+
+    /*
      * Accessor instances are initialized in the static initializers of
      * corresponding AWT classes by using setters defined below.
      */
@@ -726,6 +747,7 @@
     private static TrayIconAccessor trayIconAccessor;
     private static DefaultKeyboardFocusManagerAccessor defaultKeyboardFocusManagerAccessor;
     private static SequencedEventAccessor sequencedEventAccessor;
+    private static ToolkitAccessor toolkitAccessor;
 
     /*
      * Set an accessor object for the java.awt.Component class.
@@ -1119,4 +1141,22 @@
         // (so not a single instance of the event has been created).
         return sequencedEventAccessor;
     }
+
+    /*
+     * Set an accessor object for the java.awt.Toolkit class.
+     */
+    public static void setToolkitAccessor(ToolkitAccessor ta) {
+        toolkitAccessor = ta;
+    }
+
+    /*
+     * Get the accessor object for the java.awt.Toolkit class.
+     */
+    public static ToolkitAccessor getToolkitAccessor() {
+        if (toolkitAccessor == null) {
+            unsafe.ensureClassInitialized(Toolkit.class);
+        }
+
+        return toolkitAccessor;
+    }
 }
--- a/jdk/src/share/classes/sun/awt/GlobalCursorManager.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/sun/awt/GlobalCursorManager.java	Thu Sep 26 17:18:12 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2013, 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
@@ -134,7 +134,6 @@
      */
     protected abstract void getCursorPos(Point p);
 
-    protected abstract Component findComponentAt(Container con, int x, int y);
     protected abstract Point getLocationOnScreen(Component com);
 
     /**
@@ -190,9 +189,10 @@
             if (p != null) {
                 queryPos = new Point();
                 getCursorPos(queryPos);
-                Component c = findComponentAt((Container)comp,
-                                              queryPos.x - p.x,
-                                              queryPos.y - p.y);
+                Component c = AWTAccessor.getContainerAccessor().
+                        findComponentAt((Container) comp,
+                        queryPos.x - p.x, queryPos.y - p.y, false);
+
                 // If findComponentAt returns null, then something bad has
                 // happened. For example, the heavyweight Component may
                 // have been hidden or disabled by another thread. In that
--- a/jdk/src/share/classes/sun/awt/datatransfer/DataTransferer.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/sun/awt/datatransfer/DataTransferer.java	Thu Sep 26 17:18:12 2013 -0700
@@ -1765,7 +1765,14 @@
             Reader reader = new InputStreamReader(is, unicode);
 
             theObject = constructFlavoredObject(reader, flavor, Reader.class);
-
+            // Target data is a byte array
+        } else if (byteArrayClass.equals(flavor.getRepresentationClass())) {
+            if(isFlavorCharsetTextType(flavor) && isTextFormat(format)) {
+                theObject = translateBytesToString(inputStreamToByteArray(str), format, localeTransferable)
+                        .getBytes(DataTransferer.getTextCharset(flavor));
+            } else {
+                theObject = inputStreamToByteArray(str);
+            }
             // Target data is an RMI object
         } else if (flavor.isRepresentationClassRemote()) {
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/src/share/classes/sun/swing/AbstractFilterComboBoxModel.java	Thu Sep 26 17:18:12 2013 -0700
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2013, 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * 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.
+ */
+package sun.swing;
+
+import javax.swing.AbstractListModel;
+import javax.swing.ComboBoxModel;
+import javax.swing.JFileChooser;
+import javax.swing.filechooser.FileFilter;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+
+/**
+ * Data model for a type-face selection combo-box.
+ */
+public abstract class AbstractFilterComboBoxModel
+        extends AbstractListModel<FileFilter>
+        implements ComboBoxModel<FileFilter>, PropertyChangeListener {
+
+    protected FileFilter[] filters;
+
+    protected AbstractFilterComboBoxModel() {
+        this.filters = getFileChooser().getChoosableFileFilters();
+    }
+
+    protected abstract JFileChooser getFileChooser();
+
+    @Override
+    public void propertyChange(PropertyChangeEvent event) {
+        String property = event.getPropertyName();
+        if (property == JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY) {
+            this.filters = (FileFilter[]) event.getNewValue();
+            fireContentsChanged(this, -1, -1);
+        } else if (property == JFileChooser.FILE_FILTER_CHANGED_PROPERTY) {
+            fireContentsChanged(this, -1, -1);
+        }
+    }
+
+    @Override
+    public void setSelectedItem(Object filter) {
+        if (filter != null) {
+            getFileChooser().setFileFilter((FileFilter) filter);
+            fireContentsChanged(this, -1, -1);
+        }
+    }
+
+    @Override
+    public Object getSelectedItem() {
+        // Ensure that the current filter is in the list.
+        // NOTE: we should not have to do this, since JFileChooser adds
+        // the filter to the choosable filters list when the filter
+        // is set. Lets be paranoid just in case someone overrides
+        // setFileFilter in JFileChooser.
+        FileFilter currentFilter = getFileChooser().getFileFilter();
+        if (currentFilter != null) {
+            for (FileFilter filter : this.filters) {
+                if (filter == currentFilter) {
+                    return currentFilter;
+                }
+            }
+            getFileChooser().addChoosableFileFilter(currentFilter);
+        }
+        return currentFilter;
+    }
+
+    @Override
+    public int getSize() {
+        return (this.filters != null)
+                ? filters.length
+                : 0;
+    }
+
+    @Override
+    public FileFilter getElementAt(int index) {
+        if (index >= getSize()) {
+            // This shouldn't happen. Try to recover gracefully.
+            return getFileChooser().getFileFilter();
+        }
+        return (this.filters != null)
+                ? filters[index]
+                : null;
+    }
+}
--- a/jdk/src/share/classes/sun/swing/FilePane.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/sun/swing/FilePane.java	Thu Sep 26 17:18:12 2013 -0700
@@ -1980,18 +1980,18 @@
         }
 
         if (f instanceof ShellFolder) {
-            return ((ShellFolder) f).isFileSystem();
+            return f.canWrite();
         } else {
             if (usesShellFolder(getFileChooser())) {
                 try {
-                    return ShellFolder.getShellFolder(f).isFileSystem();
+                    return ShellFolder.getShellFolder(f).canWrite();
                 } catch (FileNotFoundException ex) {
                     // File doesn't exist
                     return false;
                 }
             } else {
                 // Ordinary file
-                return true;
+                return f.canWrite();
             }
         }
     }
--- a/jdk/src/share/classes/sun/swing/JLightweightFrame.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/sun/swing/JLightweightFrame.java	Thu Sep 26 17:18:12 2013 -0700
@@ -33,8 +33,9 @@
 import java.awt.EventQueue;
 import java.awt.Graphics;
 import java.awt.Graphics2D;
+import java.awt.MouseInfo;
+import java.awt.Point;
 import java.awt.Rectangle;
-import java.awt.event.ComponentListener;
 import java.awt.event.ContainerEvent;
 import java.awt.event.ContainerListener;
 import java.awt.image.BufferedImage;
@@ -48,6 +49,7 @@
 import javax.swing.JRootPane;
 import javax.swing.LayoutFocusTraversalPolicy;
 import javax.swing.RootPaneContainer;
+import javax.swing.SwingUtilities;
 
 import sun.awt.LightweightFrame;
 import sun.security.action.GetPropertyAction;
@@ -88,6 +90,15 @@
 
     private PropertyChangeListener layoutSizeListener;
 
+    static {
+        SwingAccessor.setJLightweightFrameAccessor(new SwingAccessor.JLightweightFrameAccessor() {
+            @Override
+            public void updateCursor(JLightweightFrame frame) {
+                frame.updateClientCursor();
+            }
+        });
+    }
+
     /**
      * Constructs a new, initially invisible {@code JLightweightFrame}
      * instance.
@@ -95,7 +106,7 @@
     public JLightweightFrame() {
         super();
         copyBufferEnabled = "true".equals(AccessController.
-            doPrivileged(new GetPropertyAction("jlf.copyBufferEnabled", "true")));
+            doPrivileged(new GetPropertyAction("swing.jlf.copyBufferEnabled", "true")));
 
         add(rootPane, BorderLayout.CENTER);
         setFocusTraversalPolicy(new LayoutFocusTraversalPolicy());
@@ -239,6 +250,11 @@
         };
         contentPane.setLayout(new BorderLayout());
         contentPane.add(component);
+        if ("true".equals(AccessController.
+            doPrivileged(new GetPropertyAction("swing.jlf.contentPaneTransparent", "false"))))
+        {
+            contentPane.setOpaque(false);
+        }
         setContentPane(contentPane);
 
         contentPane.addContainerListener(new ContainerListener() {
@@ -358,4 +374,21 @@
     public Component getGlassPane() {
         return getRootPane().getGlassPane();
     }
+
+
+    /*
+     * Notifies client toolkit that it should change a cursor.
+     *
+     * Called from the peer via SwingAccessor, because the
+     * Component.updateCursorImmediately method is final
+     * and could not be overridden.
+     */
+    private void updateClientCursor() {
+        Point p = MouseInfo.getPointerInfo().getLocation();
+        SwingUtilities.convertPointFromScreen(p, this);
+        Component target = SwingUtilities.getDeepestComponentAt(this, p.x, p.y);
+        if (target != null) {
+            content.setCursor(target.getCursor());
+        }
+    }
 }
--- a/jdk/src/share/classes/sun/swing/LightweightContent.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/sun/swing/LightweightContent.java	Thu Sep 26 17:18:12 2013 -0700
@@ -26,6 +26,7 @@
 package sun.swing;
 
 import javax.swing.JComponent;
+import java.awt.Cursor;
 
 /**
  * The interface by means of which the {@link JLightweightFrame} class
@@ -179,4 +180,11 @@
      * application that the content minimum size has changed.
      */
     public void minimumSizeChanged(int width, int height);
+
+    /**
+     * {@code JLightweightFrame} calls this method to notify the client
+     * application that in needs to set a cursor
+     * @param cursor a cursor to set
+     */
+    default public void setCursor(Cursor cursor) { }
 }
--- a/jdk/src/share/classes/sun/swing/SwingAccessor.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/sun/swing/SwingAccessor.java	Thu Sep 26 17:18:12 2013 -0700
@@ -72,6 +72,16 @@
     }
 
     /**
+     * An accessor for the JLightweightFrame class.
+     */
+    public interface JLightweightFrameAccessor {
+        /**
+         * Notifies the JLightweight frame that it needs to update a cursor
+         */
+        void updateCursor(JLightweightFrame frame);
+    }
+
+    /**
      * The javax.swing.text.JTextComponent class accessor object.
      */
     private static JTextComponentAccessor jtextComponentAccessor;
@@ -93,4 +103,23 @@
 
         return jtextComponentAccessor;
     }
+
+    /**
+     * The JLightweightFrame class accessor object
+     */
+    private static JLightweightFrameAccessor jLightweightFrameAccessor;
+
+    /**
+     * Set an accessor object for the JLightweightFrame class.
+     */
+    public static void setJLightweightFrameAccessor(JLightweightFrameAccessor accessor) {
+        jLightweightFrameAccessor = accessor;
+    }
+
+    /**
+     * Retrieve the accessor object for the JLightweightFrame class
+     */
+    public static JLightweightFrameAccessor getJLightweightFrameAccessor() {
+        return jLightweightFrameAccessor;
+    }
 }
--- a/jdk/src/share/classes/sun/swing/SwingUtilities2.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/sun/swing/SwingUtilities2.java	Thu Sep 26 17:18:12 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2013, 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
@@ -33,6 +33,7 @@
 import java.awt.font.*;
 import java.awt.geom.*;
 import java.awt.print.PrinterGraphics;
+import java.text.CharacterIterator;
 import java.text.AttributedCharacterIterator;
 import java.text.AttributedString;
 
@@ -504,22 +505,25 @@
                  * it to fit in the screen width. This distributes the spacing
                  * more evenly than directly laying out to the screen advances.
                  */
-                float screenWidth = (float)
-                   g2d.getFont().getStringBounds(text, DEFAULT_FRC).getWidth();
-                TextLayout layout = createTextLayout(c, text, g2d.getFont(),
-                                                   g2d.getFontRenderContext());
+                String trimmedText = trimTrailingSpaces(text);
+                if (!trimmedText.isEmpty()) {
+                    float screenWidth = (float) g2d.getFont().getStringBounds
+                            (trimmedText, DEFAULT_FRC).getWidth();
+                    TextLayout layout = createTextLayout(c, text, g2d.getFont(),
+                                                       g2d.getFontRenderContext());
 
-                layout = layout.getJustifiedLayout(screenWidth);
-                /* Use alternate print color if specified */
-                Color col = g2d.getColor();
-                if (col instanceof PrintColorUIResource) {
-                    g2d.setColor(((PrintColorUIResource)col).getPrintColor());
+                    layout = layout.getJustifiedLayout(screenWidth);
+                    /* Use alternate print color if specified */
+                    Color col = g2d.getColor();
+                    if (col instanceof PrintColorUIResource) {
+                        g2d.setColor(((PrintColorUIResource)col).getPrintColor());
+                    }
+
+                    layout.draw(g2d, x, y);
+
+                    g2d.setColor(col);
                 }
 
-                layout.draw(g2d, x, y);
-
-                g2d.setColor(col);
-
                 return;
             }
         }
@@ -789,25 +793,27 @@
                 if (frc != null &&
                     !isFontRenderContextPrintCompatible
                     (deviceFontRenderContext, frc)) {
-                    TextLayout layout =
-                        createTextLayout(c, new String(data, offset, length),
-                                       g2d.getFont(),
-                                       deviceFontRenderContext);
-                    float screenWidth = (float)g2d.getFont().
-                        getStringBounds(data, offset, offset + length, frc).
-                        getWidth();
-                    layout = layout.getJustifiedLayout(screenWidth);
+
+                    String text = new String(data, offset, length);
+                    TextLayout layout = new TextLayout(text, g2d.getFont(),
+                                    deviceFontRenderContext);
+                    String trimmedText = trimTrailingSpaces(text);
+                    if (!trimmedText.isEmpty()) {
+                        float screenWidth = (float)g2d.getFont().
+                            getStringBounds(trimmedText, frc).getWidth();
+                        layout = layout.getJustifiedLayout(screenWidth);
 
-                    /* Use alternate print color if specified */
-                    Color col = g2d.getColor();
-                    if (col instanceof PrintColorUIResource) {
-                        g2d.setColor(((PrintColorUIResource)col).getPrintColor());
+                        /* Use alternate print color if specified */
+                        Color col = g2d.getColor();
+                        if (col instanceof PrintColorUIResource) {
+                            g2d.setColor(((PrintColorUIResource)col).getPrintColor());
+                        }
+
+                        layout.draw(g2d,x,y);
+
+                        g2d.setColor(col);
                     }
 
-                    layout.draw(g2d,x,y);
-
-                    g2d.setColor(col);
-
                     return nextX;
                 }
             }
@@ -888,14 +894,23 @@
             } else {
                 frc = g2d.getFontRenderContext();
             }
-            TextLayout layout = new TextLayout(iterator, frc);
+            TextLayout layout;
             if (isPrinting) {
                 FontRenderContext deviceFRC = g2d.getFontRenderContext();
                 if (!isFontRenderContextPrintCompatible(frc, deviceFRC)) {
-                    float screenWidth = layout.getAdvance();
                     layout = new TextLayout(iterator, deviceFRC);
-                    layout = layout.getJustifiedLayout(screenWidth);
+                    AttributedCharacterIterator trimmedIt =
+                            getTrimmedTrailingSpacesIterator(iterator);
+                    if (trimmedIt != null) {
+                        float screenWidth = new TextLayout(trimmedIt, frc).
+                                getAdvance();
+                        layout = layout.getJustifiedLayout(screenWidth);
+                    }
+                } else {
+                    layout = new TextLayout(iterator, frc);
                 }
+            } else {
+                layout = new TextLayout(iterator, frc);
             }
             layout.draw(g2d, x, y);
             retVal = layout.getAdvance();
@@ -1047,6 +1062,39 @@
         return (g instanceof PrinterGraphics || g instanceof PrintGraphics);
     }
 
+    private static String trimTrailingSpaces(String s) {
+        int i = s.length() - 1;
+        while(i >= 0 && Character.isWhitespace(s.charAt(i))) {
+            i--;
+        }
+        return s.substring(0, i + 1);
+    }
+
+    private static AttributedCharacterIterator getTrimmedTrailingSpacesIterator
+            (AttributedCharacterIterator iterator) {
+        int curIdx = iterator.getIndex();
+
+        char c = iterator.last();
+        while(c != CharacterIterator.DONE && Character.isWhitespace(c)) {
+            c = iterator.previous();
+        }
+
+        if (c != CharacterIterator.DONE) {
+            int endIdx = iterator.getIndex();
+
+            if (endIdx == iterator.getEndIndex() - 1) {
+                iterator.setIndex(curIdx);
+                return iterator;
+            } else {
+                AttributedString trimmedText = new AttributedString(iterator,
+                        iterator.getBeginIndex(), endIdx + 1);
+                return trimmedText.getIterator();
+            }
+        } else {
+            return null;
+        }
+    }
+
     /**
      * Determines whether the SelectedTextColor should be used for painting text
      * foreground for the specified highlight.
--- a/jdk/src/share/classes/sun/swing/plaf/synth/SynthFileChooserUIImpl.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/classes/sun/swing/plaf/synth/SynthFileChooserUIImpl.java	Thu Sep 26 17:18:12 2013 -0700
@@ -923,70 +923,9 @@
     /**
      * Data model for a type-face selection combo-box.
      */
-    protected class FilterComboBoxModel extends AbstractListModel<FileFilter> implements ComboBoxModel<FileFilter>,
-            PropertyChangeListener {
-        protected FileFilter[] filters;
-        protected FilterComboBoxModel() {
-            super();
-            filters = getFileChooser().getChoosableFileFilters();
-        }
-
-        public void propertyChange(PropertyChangeEvent e) {
-            String prop = e.getPropertyName();
-            if(prop == JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY) {
-                filters = (FileFilter[]) e.getNewValue();
-                fireContentsChanged(this, -1, -1);
-            } else if (prop == JFileChooser.FILE_FILTER_CHANGED_PROPERTY) {
-                fireContentsChanged(this, -1, -1);
-            }
-        }
-
-        public void setSelectedItem(Object filter) {
-            if(filter != null) {
-                getFileChooser().setFileFilter((FileFilter) filter);
-                fireContentsChanged(this, -1, -1);
-            }
-        }
-
-        public Object getSelectedItem() {
-            // Ensure that the current filter is in the list.
-            // NOTE: we shouldnt' have to do this, since JFileChooser adds
-            // the filter to the choosable filters list when the filter
-            // is set. Lets be paranoid just in case someone overrides
-            // setFileFilter in JFileChooser.
-            FileFilter currentFilter = getFileChooser().getFileFilter();
-            boolean found = false;
-            if(currentFilter != null) {
-                for (FileFilter filter : filters) {
-                    if (filter == currentFilter) {
-                        found = true;
-                    }
-                }
-                if(found == false) {
-                    getFileChooser().addChoosableFileFilter(currentFilter);
-                }
-            }
-            return getFileChooser().getFileFilter();
-        }
-
-        public int getSize() {
-            if(filters != null) {
-                return filters.length;
-            } else {
-                return 0;
-            }
-        }
-
-        public FileFilter getElementAt(int index) {
-            if(index > getSize() - 1) {
-                // This shouldn't happen. Try to recover gracefully.
-                return getFileChooser().getFileFilter();
-            }
-            if(filters != null) {
-                return filters[index];
-            } else {
-                return null;
-            }
+    protected class FilterComboBoxModel extends AbstractFilterComboBoxModel {
+        protected JFileChooser getFileChooser() {
+            return SynthFileChooserUIImpl.this.getFileChooser();
         }
     }
 
--- a/jdk/src/share/demo/applets/MoleculeViewer/XYZApp.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/demo/applets/MoleculeViewer/XYZApp.java	Thu Sep 26 17:18:12 2013 -0700
@@ -348,7 +348,7 @@
         InputStream is = null;
         try {
             Thread.currentThread().setPriority(Thread.MIN_PRIORITY);
-            is = new URL(getDocumentBase(), mdname).openStream();
+            is = getClass().getResourceAsStream(mdname);
             XYZChemModel m = new XYZChemModel(is);
             Atom.setApplet(this);
             md = m;
--- a/jdk/src/share/demo/applets/MoleculeViewer/example1.html	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/demo/applets/MoleculeViewer/example1.html	Thu Sep 26 17:18:12 2013 -0700
@@ -2,10 +2,10 @@
   <head>
       <title>MoleculeViewer (example 1)</title>
   </head>
-  <body> 
+  <body>
       <h1>MoleculeViewer (example 1)</h1>
       <hr>
-      <applet code=XYZApp.class width=300 height=300>
+      <applet code=XYZApp.class archive=MoleculeViewer.jar width=300 height=300>
 	<param name=model value="models/HyaluronicAcid.xyz">
 	alt="Your browser understands the &lt;APPLET&gt; tag but isn't running the applet, for some reason."
 	Your browser is completely ignoring the &lt;APPLET&gt; tag!
@@ -13,7 +13,7 @@
       <hr>
       <a href="XYZApp.java">The source</a>.
   </body>
-</html>	  
+</html>
 
 
 
--- a/jdk/src/share/demo/applets/MoleculeViewer/example2.html	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/demo/applets/MoleculeViewer/example2.html	Thu Sep 26 17:18:12 2013 -0700
@@ -2,10 +2,10 @@
   <head>
       <title>MoleculeViewer (example 2)</title>
   </head>
-  <body> 
+  <body>
       <h1>MoleculeViewer (example 2)</h1>
       <hr>
-      <applet code=XYZApp.class width=300 height=300>
+      <applet code=XYZApp.class archive=MoleculeViewer.jar width=300 height=300>
 	<param name=model value="models/buckminsterfullerine.xyz">
 	  alt="Your browser understands the &lt;APPLET&gt; tag but isn't running the applet, for some reason."
 	  Your browser is completely ignoring the &lt;APPLET&gt; tag!
@@ -13,4 +13,4 @@
       <hr>
       <a href="XYZApp.java">The source</a>.
   </body>
-</html>	  
+</html>
--- a/jdk/src/share/demo/applets/MoleculeViewer/example3.html	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/demo/applets/MoleculeViewer/example3.html	Thu Sep 26 17:18:12 2013 -0700
@@ -5,25 +5,25 @@
   <body>
       <h1>MoleculeViewer (example 3)</h1>
       <hr>
-      <applet code=XYZApp.class width=100 height=100>
+      <applet code=XYZApp.class archive=MoleculeViewer.jar width=100 height=100>
 	<param name=model value="models/water.xyz">
 	alt="Your browser understands the &lt;APPLET&gt; tag but isn't running the applet, for some reason."
 	Your browser is completely ignoring the &lt;APPLET&gt; tag!
       </applet>
       <p>
-	<applet code=XYZApp.class width=100 height=100>
+	<applet code=XYZApp.class archive=MoleculeViewer.jar width=100 height=100>
           <param name=model value="models/benzene.xyz">
 	  alt="Your browser understands the &lt;APPLET&gt; tag but isn't running the applet, for some reason."
 	  Your browser is completely ignoring the &lt;APPLET&gt; tag!
 	</applet>
       <p>
-	<applet code=XYZApp.class width=100 height=100>
+	<applet code=XYZApp.class archive=MoleculeViewer.jar width=100 height=100>
 	  <param name=model value="models/ethane.xyz">
 	  alt="Your browser understands the &lt;APPLET&gt; tag but isn't running the applet, for some reason."
 	  Your browser is completely ignoring the &lt;APPLET&gt; tag!
 	</applet>
       <p>
-	<applet code=XYZApp.class width=100 height=100>
+	<applet code=XYZApp.class archive=MoleculeViewer.jar width=100 height=100>
 	  <param name=model value="models/cyclohexane.xyz">
 	  alt="Your browser understands the &lt;APPLET&gt; tag but isn't running the applet, for some reason."
 	  Your browser is completely ignoring the &lt;APPLET&gt; tag!
@@ -31,5 +31,5 @@
       <hr>
       <a href="XYZApp.java">The source</a>.
   </body>
-</html>	  
+</html>
 
--- a/jdk/src/share/demo/applets/WireFrame/ThreeD.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/demo/applets/WireFrame/ThreeD.java	Thu Sep 26 17:18:12 2013 -0700
@@ -416,7 +416,7 @@
         InputStream is = null;
         try {
             Thread.currentThread().setPriority(Thread.MIN_PRIORITY);
-            is = new URL(getDocumentBase(), mdname).openStream();
+            is = getClass().getResourceAsStream(mdname);
             Model3D m = new Model3D(is);
             md = m;
             m.findBB();
--- a/jdk/src/share/demo/applets/WireFrame/example1.html	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/demo/applets/WireFrame/example1.html	Thu Sep 26 17:18:12 2013 -0700
@@ -5,7 +5,7 @@
   <body>
     <h1>3D Model: Cube</h1>
       <hr>
-      <applet code=ThreeD.class width=100 height=100>
+      <applet code=ThreeD.class archive=WireFrame.jar width=100 height=100>
 	<param name=model value="models/cube.obj">
 	  alt="Your browser understands the &lt;APPLET&gt; tag but isn't running the applet, for some reason."
 	  Your browser is completely ignoring the &lt;APPLET&gt; tag!
--- a/jdk/src/share/demo/applets/WireFrame/example2.html	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/demo/applets/WireFrame/example2.html	Thu Sep 26 17:18:12 2013 -0700
@@ -5,7 +5,7 @@
   <body>
       <h1>3D Model: Dinosaur</h1>
       <hr>
-      <applet code=ThreeD.class width=300 height=300>
+      <applet code=ThreeD.class archive=WireFrame.jar width=300 height=300>
 	<param name=model value="models/dinasaur.obj">
 	  alt="Your browser understands the &lt;APPLET&gt; tag but isn't running the applet, for some reason."
 	  Your browser is completely ignoring the &lt;APPLET&gt; tag!
--- a/jdk/src/share/demo/applets/WireFrame/example3.html	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/demo/applets/WireFrame/example3.html	Thu Sep 26 17:18:12 2013 -0700
@@ -5,7 +5,7 @@
   <body>
       <h1>3D Model: Hughes</h1>
       <hr>
-      <applet code=ThreeD.class width=300 height=300>
+      <applet code=ThreeD.class archive=WireFrame.jar width=300 height=300>
 	<param name=model value="models/hughes_500.obj">
 	  alt="Your browser understands the &lt;APPLET&gt; tag but isn't running the applet, for some reason."
 	  Your browser is completely ignoring the &lt;APPLET&gt; tag!
--- a/jdk/src/share/demo/applets/WireFrame/example4.html	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/share/demo/applets/WireFrame/example4.html	Thu Sep 26 17:18:12 2013 -0700
@@ -5,7 +5,7 @@
   <body>
       <h1>3D Model: knoxS</h1>
       <hr>
-      <applet code=ThreeD.class width=300 height=300>
+      <applet code=ThreeD.class archive=WireFrame.jar width=300 height=300>
 	<param name=model value="models/knoxS.obj">
 	  alt="Your browser understands the &lt;APPLET&gt; tag but isn't running the applet, for some reason."
 	  Your browser is completely ignoring the &lt;APPLET&gt; tag!
--- a/jdk/src/solaris/classes/sun/awt/X11/XGlobalCursorManager.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XGlobalCursorManager.java	Thu Sep 26 17:18:12 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
@@ -145,13 +145,8 @@
     }
 
     /*
-     * two native methods to call corresponding methods in Container and
-     * Component
+     * native method to call corresponding methods in Component
      */
-    protected  Component findComponentAt(Container con, int x, int y) {
-        return con.findComponentAt(x,y);
-    }
-
     protected  Point getLocationOnScreen(Component c) {
         return c.getLocationOnScreen();
     }
--- a/jdk/src/solaris/classes/sun/awt/X11/XLightweightFramePeer.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XLightweightFramePeer.java	Thu Sep 26 17:18:12 2013 -0700
@@ -28,6 +28,8 @@
 import java.awt.Graphics;
 
 import sun.awt.LightweightFrame;
+import sun.swing.JLightweightFrame;
+import sun.swing.SwingAccessor;
 
 public class XLightweightFramePeer extends XFramePeer {
 
@@ -62,4 +64,9 @@
             getLwTarget().ungrabFocus();
         }
     }
+
+    @Override
+    public void updateCursorImmediately() {
+        SwingAccessor.getJLightweightFrameAccessor().updateCursor((JLightweightFrame)getLwTarget());
+    }
 }
--- a/jdk/src/solaris/classes/sun/awt/X11/XToolkit.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XToolkit.java	Thu Sep 26 17:18:12 2013 -0700
@@ -2249,6 +2249,8 @@
                                                      XConstants.XkbModifierMapMask |
                                                      XConstants.XkbVirtualModsMask,
                                                      XConstants.XkbUseCoreKbd);
+
+                        XlibWrapper.XkbSetDetectableAutoRepeat(getDisplay(), true);
                     }
                 }
             }
--- a/jdk/src/solaris/classes/sun/awt/X11/XTrayIconPeer.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XTrayIconPeer.java	Thu Sep 26 17:18:12 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, 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
@@ -459,7 +459,7 @@
             // other class tries to cast source field to Component).
             // We already filter DRAG events out (CR 6565779).
             e.setSource(xtiPeer.target);
-            Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(e);
+            XToolkit.postEvent(XToolkit.targetToAppContext(e.getSource()), e);
         }
         public void mouseClicked(MouseEvent e) {
             if ((e.getClickCount() > 1 || xtiPeer.balloon.isVisible()) &&
--- a/jdk/src/solaris/classes/sun/awt/X11/XWM.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XWM.java	Thu Sep 26 17:18:12 2013 -0700
@@ -592,7 +592,7 @@
     }
 
     static boolean isMutter() {
-        return isNetWMName("Mutter");
+        return isNetWMName("Mutter") || isNetWMName("GNOME Shell");
     }
 
     static boolean isNonReparentingWM() {
--- a/jdk/src/solaris/classes/sun/awt/X11/XlibWrapper.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XlibWrapper.java	Thu Sep 26 17:18:12 2013 -0700
@@ -509,6 +509,7 @@
     static native long XkbGetUpdatedMap(long display, long which, long xkb);
     static native void XkbFreeKeyboard(long xkb, long which, boolean free_all);
     static native boolean XkbTranslateKeyCode(long xkb, int keycode, long mods, long mods_rtrn, long keysym_rtrn);
+    static native void XkbSetDetectableAutoRepeat(long display, boolean detectable);
 
 
     static native void XConvertCase(long keysym,
--- a/jdk/src/solaris/native/sun/xawt/XlibWrapper.c	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/solaris/native/sun/xawt/XlibWrapper.c	Thu Sep 26 17:18:12 2013 -0700
@@ -523,8 +523,12 @@
     //printf("native, output:  keysym:0x%0X; mods:0x%0X\n", *(unsigned int *)jlong_to_ptr(keysym_rtrn), *(unsigned int *)jlong_to_ptr(mods_rtrn));
     return b;
 }
-
-
+JNIEXPORT void JNICALL Java_sun_awt_X11_XlibWrapper_XkbSetDetectableAutoRepeat
+(JNIEnv *env, jclass clazz, jlong display, jboolean detectable)
+{
+    AWT_CHECK_HAVE_LOCK();
+    XkbSetDetectableAutoRepeat((Display *) jlong_to_ptr(display), detectable, NULL);
+}
 /*
  * Class:     sun_awt_X11_XlibWrapper
  * Method:    XNextEvent
--- a/jdk/src/windows/classes/sun/awt/windows/WComponentPeer.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/windows/classes/sun/awt/windows/WComponentPeer.java	Thu Sep 26 17:18:12 2013 -0700
@@ -656,7 +656,7 @@
         _setFont(f);
     }
     public synchronized native void _setFont(Font f);
-    public final void updateCursorImmediately() {
+    public void updateCursorImmediately() {
         WGlobalCursorManager.getCursorManager().updateCursorImmediately();
     }
 
--- a/jdk/src/windows/classes/sun/awt/windows/WDataTransferer.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/windows/classes/sun/awt/windows/WDataTransferer.java	Thu Sep 26 17:18:12 2013 -0700
@@ -211,9 +211,9 @@
                         DataFlavor.allHtmlFlavor,
                         format);
             } else {
-                // handel other html flavor types, including custom and
+                // handle other html flavor types, including custom and
                 // fragment ones
-                bytes = HTMLCodec.convertToHTMLFormat(bytes);
+                bytes = HTMLCodec.convertToHTMLFormat(super.translateTransferable(contents, flavor, format));
             }
         } else {
             // we handle non-html types basing on  their
--- a/jdk/src/windows/classes/sun/awt/windows/WFileDialogPeer.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/windows/classes/sun/awt/windows/WFileDialogPeer.java	Thu Sep 26 17:18:12 2013 -0700
@@ -182,6 +182,7 @@
 
         AWTAccessor.getFileDialogAccessor().setFile(fileDialog, null);
         AWTAccessor.getFileDialogAccessor().setFiles(fileDialog, null);
+        AWTAccessor.getFileDialogAccessor().setDirectory(fileDialog, null);
 
         WToolkit.executeOnEventHandlerThread(fileDialog, new Runnable() {
              public void run() {
--- a/jdk/src/windows/classes/sun/awt/windows/WGlobalCursorManager.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/windows/classes/sun/awt/windows/WGlobalCursorManager.java	Thu Sep 26 17:18:12 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2000, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2013, 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
@@ -48,7 +48,6 @@
 
     protected native void setCursor(Component comp, Cursor cursor, boolean u);
     protected native void getCursorPos(Point p);
-    protected native Component findComponentAt(Container con, int x, int y);
     /*
      * two native methods to call corresponding methods in Container and
      * Component
--- a/jdk/src/windows/classes/sun/awt/windows/WLightweightFramePeer.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/windows/classes/sun/awt/windows/WLightweightFramePeer.java	Thu Sep 26 17:18:12 2013 -0700
@@ -31,6 +31,8 @@
 import java.awt.event.MouseEvent;
 
 import sun.awt.LightweightFrame;
+import sun.swing.JLightweightFrame;
+import sun.swing.SwingAccessor;
 
 public class WLightweightFramePeer extends WFramePeer {
 
@@ -83,4 +85,9 @@
     public void ungrab() {
         getLwTarget().ungrabFocus();
     }
+
+    @Override
+    public void updateCursorImmediately() {
+        SwingAccessor.getJLightweightFrameAccessor().updateCursor((JLightweightFrame)getLwTarget());
+    }
 }
--- a/jdk/src/windows/native/sun/windows/awt_Container.cpp	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/windows/native/sun/windows/awt_Container.cpp	Thu Sep 26 17:18:12 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, 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
@@ -31,7 +31,6 @@
  */
 
 jfieldID AwtContainer::layoutMgrID;
-jmethodID AwtContainer::findComponentAtMID;
 
 /************************************************************************
  * AwtContainer native methods
@@ -46,11 +45,7 @@
     AwtContainer::layoutMgrID =
         env->GetFieldID(cls, "layoutMgr", "Ljava/awt/LayoutManager;");
 
-    AwtContainer::findComponentAtMID =
-        env->GetMethodID(cls, "findComponentAt", "(IIZ)Ljava/awt/Component;");
-
     DASSERT(AwtContainer::layoutMgrID != NULL);
-    DASSERT(AwtContainer::findComponentAtMID);
 
     CATCH_BAD_ALLOC;
 }
--- a/jdk/src/windows/native/sun/windows/awt_Container.h	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/windows/native/sun/windows/awt_Container.h	Thu Sep 26 17:18:12 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, 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
@@ -38,7 +38,6 @@
 
     /* java.awt.Container field ids */
     static jfieldID layoutMgrID;
-    static jmethodID findComponentAtMID;
 
 };
 
--- a/jdk/src/windows/native/sun/windows/awt_Cursor.cpp	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/windows/native/sun/windows/awt_Cursor.cpp	Thu Sep 26 17:18:12 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -554,32 +554,6 @@
 
 /*
  * Class:     sun_awt_windows_WGlobalCursorManager
- * Method:    findComponentAt
- * Signature: (L/java/awt/Container;II)L/java/awt/Component
- */
-JNIEXPORT jobject JNICALL
-Java_sun_awt_windows_WGlobalCursorManager_findComponentAt(
-    JNIEnv *env, jobject, jobject container, jint x, jint y)
-{
-    TRY;
-
-    /*
-     * Call private version of Container.findComponentAt with the following
-     * flag set -- ignoreEnabled = false (i.e., don't return or recur into
-     * disabled Components);
-     * NOTE: it may return a JRootPane's glass pane as the target Component
-     */
-    JNI_CHECK_NULL_RETURN_NULL(container, "null container");
-    jobject comp =
-        env->CallObjectMethod(container, AwtContainer::findComponentAtMID,
-                              x, y, JNI_FALSE);
-    return comp;
-
-    CATCH_BAD_ALLOC_RET(NULL);
-}
-
-/*
- * Class:     sun_awt_windows_WGlobalCursorManager
  * Method:    getLocationOnScreen
  * Signature: (L/java/awt/Component;)L/java/awt/Point
  */
--- a/jdk/src/windows/native/sun/windows/awt_FileDialog.cpp	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/windows/native/sun/windows/awt_FileDialog.cpp	Thu Sep 26 17:18:12 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, 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
@@ -73,7 +73,7 @@
     int length = env->GetStringLength(filterDescription);
     DASSERT(length + 1 < MAX_FILTER_STRING);
     LPCTSTR tmp = JNU_GetStringPlatformChars(env, filterDescription, NULL);
-    _tcscpy(s_fileFilterString, tmp);
+    _tcscpy_s(s_fileFilterString, MAX_FILTER_STRING, tmp);
     JNU_ReleaseStringPlatformChars(env, filterDescription, tmp);
 
     //AdditionalString should be terminated by two NULL characters (Windows
@@ -353,7 +353,7 @@
         if (!result) {
             dlgerr = ::CommDlgExtendedError();
             if (dlgerr == FNERR_INVALIDFILENAME) {
-                _tcscpy(fileBuffer, TEXT(""));
+                _tcscpy_s(fileBuffer, bufferLimit, TEXT(""));
                 if (mode == java_awt_FileDialog_LOAD) {
                     result = AwtFileDialog::GetOpenFileName(&ofn);
                 } else {
@@ -372,7 +372,9 @@
 
         // Report result to peer.
         if (result) {
-            jint length = (jint)GetBufferLength(ofn.lpstrFile, ofn.nMaxFile);
+            jint length = multipleMode
+                    ? (jint)GetBufferLength(ofn.lpstrFile, ofn.nMaxFile)
+                    : (jint)_tcslen(ofn.lpstrFile);
             jcharArray jnames = env->NewCharArray(length);
             env->SetCharArrayRegion(jnames, 0, length, (jchar*)ofn.lpstrFile);
 
--- a/jdk/src/windows/native/sun/windows/awt_Font.cpp	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/windows/native/sun/windows/awt_Font.cpp	Thu Sep 26 17:18:12 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, 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
@@ -366,17 +366,6 @@
     return awtFont;
 }
 
-int CALLBACK FindFamilyName (ENUMLOGFONTEX *lpelfe,
-          NEWTEXTMETRICEX *lpntme, int FontType, LPARAM lParam)
-{
-    if(_tcsstr((LPTSTR)lParam, lpelfe->elfLogFont.lfFaceName)) {
-        _tcscpy((LPTSTR)lParam, lpelfe->elfLogFont.lfFaceName);
-        return 0;
-    } else {
-        return 1;
-    }
-}
-
 static void strip_tail(wchar_t* text, wchar_t* tail) { // strips tail and any possible whitespace before it from the end of text
     if (wcslen(text)<=wcslen(tail)) {
         return;
--- a/jdk/src/windows/native/sun/windows/awt_PrintControl.cpp	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/windows/native/sun/windows/awt_PrintControl.cpp	Thu Sep 26 17:18:12 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2013, 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
@@ -428,17 +428,17 @@
         devnames->wOutputOffset =
             static_cast<WORD>(sizeof(DEVNAMES)/sizeof(TCHAR) + lenDriverName + lenPrinterName);
         if (info2->pDriverName != NULL) {
-            _tcscpy(lpcDevnames + devnames->wDriverOffset, info2->pDriverName);
+            _tcscpy_s(lpcDevnames + devnames->wDriverOffset, devnameSize - devnames->wDriverOffset, info2->pDriverName);
         } else {
             *(lpcDevnames + devnames->wDriverOffset) = _T('\0');
         }
         if (pPrinterName != NULL) {
-            _tcscpy(lpcDevnames + devnames->wDeviceOffset, pPrinterName);
+            _tcscpy_s(lpcDevnames + devnames->wDeviceOffset, devnameSize - devnames->wDeviceOffset, pPrinterName);
         } else {
             *(lpcDevnames + devnames->wDeviceOffset) = _T('\0');
         }
         if (info2->pPortName != NULL) {
-            _tcscpy(lpcDevnames + devnames->wOutputOffset, info2->pPortName);
+            _tcscpy_s(lpcDevnames + devnames->wOutputOffset, devnameSize - devnames->wOutputOffset, info2->pPortName);
         } else {
             *(lpcDevnames + devnames->wOutputOffset) = _T('\0');
         }
--- a/jdk/src/windows/native/sun/windows/awt_Toolkit.cpp	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/windows/native/sun/windows/awt_Toolkit.cpp	Thu Sep 26 17:18:12 2013 -0700
@@ -228,7 +228,7 @@
         // create input locale string, e.g., "00000409", from hkl.
         TCHAR inputLocale[9];
         TCHAR buf[9];
-        _tcscpy(inputLocale, TEXT("00000000"));
+        _tcscpy_s(inputLocale, 9, TEXT("00000000"));
 
     // 64-bit: ::LoadKeyboardLayout() is such a weird API - a string of
     // the hex value you want?!  Here we're converting our HKL value to
--- a/jdk/src/windows/native/sun/windows/awt_TrayIcon.cpp	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/windows/native/sun/windows/awt_TrayIcon.cpp	Thu Sep 26 17:18:12 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, 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
@@ -711,7 +711,7 @@
         _tcsncpy(m_nid.szTip, tooltip, TRAY_ICON_TOOLTIP_MAX_SIZE);
         m_nid.szTip[TRAY_ICON_TOOLTIP_MAX_SIZE - 1] = '\0';
     } else {
-        _tcscpy(m_nid.szTip, tooltip);
+        _tcscpy_s(m_nid.szTip, TRAY_ICON_TOOLTIP_MAX_SIZE, tooltip);
     }
 
     SendTrayMessage(NIM_MODIFY);
@@ -817,7 +817,7 @@
         m_nid.szInfoTitle[TRAY_ICON_BALLOON_TITLE_MAX_SIZE - 1] = '\0';
 
     } else {
-        _tcscpy(m_nid.szInfoTitle, caption);
+        _tcscpy_s(m_nid.szInfoTitle, TRAY_ICON_BALLOON_TITLE_MAX_SIZE, caption);
     }
 
     if (text[0] == '\0') {
@@ -830,7 +830,7 @@
         m_nid.szInfo[TRAY_ICON_BALLOON_INFO_MAX_SIZE - 1] = '\0';
 
     } else {
-        _tcscpy(m_nid.szInfo, text);
+        _tcscpy_s(m_nid.szInfo, TRAY_ICON_BALLOON_INFO_MAX_SIZE, text);
     }
 
     SendTrayMessage(NIM_MODIFY);
--- a/jdk/src/windows/native/sun/windows/awt_ole.cpp	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/src/windows/native/sun/windows/awt_ole.cpp	Thu Sep 26 17:18:12 2013 -0700
@@ -70,7 +70,7 @@
             bErrorReport?_T("Error:"):_T(""),
             szBuffer) < 0)
         {
-            _tcscpy(szBuffer1 + DTRACE_BUF_LEN - 5, _T("...")); //reserver for \n
+            _tcscpy_s(szBuffer1 + DTRACE_BUF_LEN - 5, 5, _T("...")); //reserver for \n
         }
         memcpy(szBuffer1, szTime, iTimeLen*sizeof(TCHAR));
         _tcscat(szBuffer1, _T("\n"));
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Cursor/CursorOverlappedPanelsTest/CursorOverlappedPanelsTest.html	Thu Sep 26 17:18:12 2013 -0700
@@ -0,0 +1,32 @@
+<!--
+ Copyright (c) 2013, 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.
+-->
+
+<html>
+    <head>
+        <title>CursorOverlappedPanelsTest, bug ID 8007155</title>
+    </head>
+    <body>
+    <applet CODE="CursorOverlappedPanelsTest.class" WIDTH=300 HEIGHT=100></applet>
+    <p> See the dialog box (usually in upper left corner) for instructions</p>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Cursor/CursorOverlappedPanelsTest/CursorOverlappedPanelsTest.java	Thu Sep 26 17:18:12 2013 -0700
@@ -0,0 +1,226 @@
+/*
+ * Copyright (c) 2013, 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.
+ */
+
+import java.awt.*;
+//import java.applet.Applet;
+import javax.swing.BorderFactory;
+import javax.swing.JApplet;
+import javax.swing.JFrame;
+import javax.swing.JLayeredPane;
+import javax.swing.JPanel;
+
+/**
+ * @test
+ * @bug 8007155
+ * @summary [macosx] Disabled panel takes mouse input in JLayeredPane
+ * @author Alexander Scherbatiy: area=java.awt.Cursor
+ * @run applet/manual=yesno CursorOverlappedPanelsTest.html
+ */
+public class CursorOverlappedPanelsTest extends JApplet {
+    //Declare things used in the test, like buttons and labels here
+
+    public void init() {
+        //Create instructions for the user here, as well as set up
+        // the environment -- set the layout manager, add buttons,
+        // etc.
+        this.setLayout(new BorderLayout());
+
+        String[] instructions = {
+            "Verify that the Crosshair cursor from enabled panel"
+            + " is displayed on the panels intersection",
+            "1) Move the mosue cursor on the Enabled and Disabled panels"
+            + " intersection",
+            "2) Check that the Crosshair cursor is displayed ",
+            "If so, press PASS, else press FAIL."
+        };
+        Sysout.createDialogWithInstructions(instructions);
+
+    }//End  init()
+
+    public void start() {
+        //Get things going.  Request focus, set size, et cetera
+        setSize(200, 200);
+        setVisible(true);
+        validate();
+        try {
+            EventQueue.invokeAndWait(new Runnable() {
+                public void run() {
+                    createAndShowGUI();
+                }
+            });
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+    }// start()
+
+    //The rest of this class is the actions which perform the test...
+    //Use Sysout.println to communicate with the user NOT System.out!!
+    //Sysout.println ("Something Happened!");
+    private static JPanel createPanel(Point location, boolean enabled) {
+        final JPanel panel = new JPanel();
+        panel.setOpaque(false);
+        panel.setEnabled(enabled);
+        panel.setSize(new Dimension(200, 200));
+        panel.setLocation(location);
+        panel.setBorder(BorderFactory.createTitledBorder(
+                enabled ? "Enabled" : "Disabled"));
+        panel.setCursor(Cursor.getPredefinedCursor(
+                enabled ? Cursor.CROSSHAIR_CURSOR : Cursor.DEFAULT_CURSOR));
+        System.out.println("cursor: " + Cursor.getPredefinedCursor(enabled ? Cursor.CROSSHAIR_CURSOR : Cursor.DEFAULT_CURSOR));
+        return panel;
+    }
+
+    private static void createAndShowGUI() {
+        final JFrame frame = new JFrame("Test");
+        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+
+        JLayeredPane layeredPane = new JLayeredPane();
+        layeredPane.setPreferredSize(new Dimension(400, 400));
+        JPanel enabledPanel = createPanel(new Point(10, 10), true);
+        JPanel disabledPanel = createPanel(new Point(100, 100), false);
+        layeredPane.add(disabledPanel, JLayeredPane.PALETTE_LAYER);
+        layeredPane.add(enabledPanel, JLayeredPane.DEFAULT_LAYER);
+
+        frame.getContentPane().add(layeredPane);
+        frame.pack();
+        frame.setVisible(true);
+    }
+}// class BlockedWindowTest
+
+/* Place other classes related to the test after this line */
+/**
+ * **************************************************
+ * Standard Test Machinery DO NOT modify anything below -- it's a standard chunk
+ * of code whose purpose is to make user interaction uniform, and thereby make
+ * it simpler to read and understand someone else's test.
+ * **************************************************
+ */
+/**
+ * This is part of the standard test machinery. It creates a dialog (with the
+ * instructions), and is the interface for sending text messages to the user. To
+ * print the instructions, send an array of strings to Sysout.createDialog
+ * WithInstructions method. Put one line of instructions per array entry. To
+ * display a message for the tester to see, simply call Sysout.println with the
+ * string to be displayed. This mimics System.out.println but works within the
+ * test harness as well as standalone.
+ */
+class Sysout {
+
+    private static TestDialog dialog;
+
+    public static void createDialogWithInstructions(String[] instructions) {
+        dialog = new TestDialog(new Frame(), "Instructions");
+        dialog.printInstructions(instructions);
+        dialog.setVisible(true);
+        println("Any messages for the tester will display here.");
+    }
+
+    public static void createDialog() {
+        dialog = new TestDialog(new Frame(), "Instructions");
+        String[] defInstr = {"Instructions will appear here. ", ""};
+        dialog.printInstructions(defInstr);
+        dialog.setVisible(true);
+        println("Any messages for the tester will display here.");
+    }
+
+    public static void printInstructions(String[] instructions) {
+        dialog.printInstructions(instructions);
+    }
+
+    public static void println(String messageIn) {
+        dialog.displayMessage(messageIn);
+    }
+}// Sysout  class
+
+/**
+ * This is part of the standard test machinery. It provides a place for the test
+ * instructions to be displayed, and a place for interactive messages to the
+ * user to be displayed. To have the test instructions displayed, see Sysout. To
+ * have a message to the user be displayed, see Sysout. Do not call anything in
+ * this dialog directly.
+ */
+class TestDialog extends Dialog {
+
+    TextArea instructionsText;
+    TextArea messageText;
+    int maxStringLength = 80;
+
+    //DO NOT call this directly, go through Sysout
+    public TestDialog(Frame frame, String name) {
+        super(frame, name);
+        int scrollBoth = TextArea.SCROLLBARS_BOTH;
+        instructionsText = new TextArea("", 15, maxStringLength, scrollBoth);
+        add("North", instructionsText);
+
+        messageText = new TextArea("", 5, maxStringLength, scrollBoth);
+        add("Center", messageText);
+
+        pack();
+
+        setVisible(true);
+    }// TestDialog()
+
+    //DO NOT call this directly, go through Sysout
+    public void printInstructions(String[] instructions) {
+        //Clear out any current instructions
+        instructionsText.setText("");
+
+        //Go down array of instruction strings
+
+        String printStr, remainingStr;
+        for (int i = 0; i < instructions.length; i++) {
+            //chop up each into pieces maxSringLength long
+            remainingStr = instructions[ i];
+            while (remainingStr.length() > 0) {
+                //if longer than max then chop off first max chars to print
+                if (remainingStr.length() >= maxStringLength) {
+                    //Try to chop on a word boundary
+                    int posOfSpace = remainingStr.
+                            lastIndexOf(' ', maxStringLength - 1);
+
+                    if (posOfSpace <= 0) {
+                        posOfSpace = maxStringLength - 1;
+                    }
+
+                    printStr = remainingStr.substring(0, posOfSpace + 1);
+                    remainingStr = remainingStr.substring(posOfSpace + 1);
+                } //else just print
+                else {
+                    printStr = remainingStr;
+                    remainingStr = "";
+                }
+
+                instructionsText.append(printStr + "\n");
+
+            }// while
+
+        }// for
+
+    }//printInstructions()
+
+    //DO NOT call this directly, go through Sysout
+    public void displayMessage(String messageIn) {
+        messageText.append(messageIn + "\n");
+        System.out.println(messageIn);
+    }
+}// TestDialog  class
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Focus/KeyEventForBadFocusOwnerTest/KeyEventForBadFocusOwnerTest.java	Thu Sep 26 17:18:12 2013 -0700
@@ -0,0 +1,144 @@
+/*
+ * Copyright (c) 2013, 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 4476629
+  @library ../../../../javax/swing/regtesthelpers
+  @build Util
+  @summary KeyEvents dispatched to old focus owner that is no longer showing
+  @author son@sparc.spb.su: area=awt.focus
+  @run main KeyEventForBadFocusOwnerTest
+*/
+
+/**
+ * KeyEventForBadFocusOwnerTest.java
+ *
+ * summary: KeyEvents dispatched to old focus owner that is no longer showing
+ */
+
+
+import java.awt.Robot;
+import java.awt.Toolkit;
+
+import java.awt.event.*;
+
+import javax.swing.*;
+import javax.swing.event.*;
+import sun.awt.SunToolkit;
+
+public class KeyEventForBadFocusOwnerTest {
+    final static String ITEM_ONE_TEXT = "one";
+    final static String ITEM_TWO_TEXT = "two";
+
+    volatile static boolean itemOneSelected = false;
+    volatile static boolean itemTwoSelected = false;
+    volatile static boolean unexpectedItemSelected = false;
+
+    static Robot robot;
+    static SunToolkit toolkit;
+
+    public static void main(String[] args) throws Exception {
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                JFrame frame = new JFrame("TEST");
+                JMenuBar mb = new JMenuBar();
+                JMenu one = new JMenu(ITEM_ONE_TEXT);
+                JMenu two = new JMenu(ITEM_TWO_TEXT);
+
+                mb.add(one);
+                mb.add(two);
+
+                ActionListener al = new ActionListener() {
+                    public void actionPerformed(ActionEvent ae) {
+                        String itemText = ((JMenuItem)ae.getSource()).getText();
+                        System.out.println("--> " + itemText);
+                        unexpectedItemSelected = true;
+                    }
+                };
+                one.setMnemonic(KeyEvent.VK_O);
+                JMenuItem item = new JMenuItem("one 1");
+                item.setMnemonic(KeyEvent.VK_O);
+                item.addActionListener(al);
+                one.add(item);
+                one.add("two");
+                one.add("three");
+
+                two.setMnemonic(KeyEvent.VK_T);
+                item = new JMenuItem("two 2");
+                item.setMnemonic(KeyEvent.VK_T);
+                item.addActionListener(al);
+                two.add(item);
+                two.add("three");
+                two.add("four");
+
+                PopupMenuListener popupMenuListener = new PopupMenuListener() {
+                    public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
+                        System.out.print(e);
+                        System.out.print(e.getSource());
+                        String itemText = ((JPopupMenu)e.getSource()).getName();
+                        System.out.println("Menu " + itemText + "is opened.");
+                        switch(itemText) {
+                            case ITEM_ONE_TEXT:
+                                itemOneSelected = true;
+                                break;
+                            case ITEM_TWO_TEXT:
+                                itemTwoSelected = true;
+                                break;
+                        }
+                    }
+
+                    public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {}
+                    public void popupMenuCanceled(PopupMenuEvent e) {}
+                };
+                one.getPopupMenu().setName(ITEM_ONE_TEXT);
+                two.getPopupMenu().setName(ITEM_TWO_TEXT);
+                one.getPopupMenu().addPopupMenuListener(popupMenuListener);
+                two.getPopupMenu().addPopupMenuListener(popupMenuListener);
+                frame.setJMenuBar(mb);
+                frame.setSize(100,100);
+                frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+                frame.pack();
+                frame.setVisible(true);
+            }
+        });
+
+        toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+        toolkit.realSync();
+
+        robot = new Robot();
+        robot.setAutoDelay(100);
+
+        Util.hitMnemonics(robot, KeyEvent.VK_O);
+        Util.hitMnemonics(robot, KeyEvent.VK_T);
+
+        toolkit.realSync();
+        Thread.sleep(1000); // workaround for MacOS
+
+        if (unexpectedItemSelected) {
+            throw new Exception("Test failed. KeyEvent dispatched to old focus owner. ");
+        }
+        if (!itemOneSelected || !itemTwoSelected) {
+            throw new Exception("Not all expected events were received");
+        }
+    }
+}
--- a/jdk/test/java/awt/FullScreen/TranslucentWindow/TranslucentWindow.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/test/java/awt/FullScreen/TranslucentWindow/TranslucentWindow.java	Thu Sep 26 17:18:12 2013 -0700
@@ -42,6 +42,7 @@
         GraphicsDevice gd = ge.getDefaultScreenDevice();
 
         Frame f = new Frame("Test frame");
+        f.setUndecorated(true);
         f.setBounds(100, 100, 320, 240);
 
         // First, check it can be made fullscreen window without any effects applied
--- a/jdk/test/java/awt/MenuBar/MenuBarSetFont/MenuBarSetFont.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/test/java/awt/MenuBar/MenuBarSetFont/MenuBarSetFont.java	Thu Sep 26 17:18:12 2013 -0700
@@ -65,6 +65,12 @@
     }
 
     public static void main(final String[] args) throws Exception {
+
+        if (sun.awt.OSInfo.getOSType() == sun.awt.OSInfo.OSType.MACOSX) {
+            System.err.println("This test is not for OS X. Menu.setFont() is not supported on OS X.");
+            return;
+        }
+
         //Components initialization.
         frame.setMenuBar(mb);
         mb.setFont(new Font("Helvetica", Font.ITALIC, 5));
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Modal/ModalDialogOrderingTest/ModalDialogOrderingTest.java	Thu Sep 26 17:18:12 2013 -0700
@@ -0,0 +1,114 @@
+/*
+ * Copyright (c) 2011, 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.
+ */
+
+import java.awt.Color;
+import java.awt.Dialog;
+import java.awt.Frame;
+import java.awt.Rectangle;
+import java.awt.Robot;
+import java.awt.Toolkit;
+import java.awt.event.InputEvent;
+import sun.awt.SunToolkit;
+/*
+ * @test
+ * @bug 8008728
+ * @summary [macosx] Swing. JDialog. Modal dialog goes to background
+ * @author Alexandr Scherbatiy
+ * @run main ModalDialogOrderingTest
+ */
+
+public class ModalDialogOrderingTest {
+
+    private static final Color DIALOG_COLOR = Color.GREEN;
+    private static final Color FRAME_COLOR = Color.BLUE;
+
+    public static void main(String[] args) {
+
+        final Frame frame = new Frame("Test");
+        frame.setSize(100, 100);
+        frame.setBackground(FRAME_COLOR);
+        frame.setVisible(true);
+
+        final Dialog modalDialog = new Dialog((Frame) null, true);
+        modalDialog.setTitle("Modal Dialog");
+        modalDialog.setSize(50, 50);
+        modalDialog.setBackground(DIALOG_COLOR);
+        modalDialog.setModal(true);
+
+        new Thread(new Runnable() {
+
+            @Override
+            public void run() {
+                runTest(modalDialog, frame);
+            }
+        }).start();
+
+        modalDialog.setVisible(true);
+    }
+
+    private static void runTest(Dialog dialog, Frame frame) {
+        try {
+            SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+            Robot robot = new Robot();
+            robot.setAutoDelay(15);
+            robot.mouseMove(300, 300);
+
+            while (!dialog.isVisible()) {
+                toolkit.realSync();
+            }
+
+            Rectangle dialogBounds = dialog.getBounds();
+            Rectangle frameBounds = frame.getBounds();
+
+            double x0 = dialogBounds.getX();
+            double y0 = dialogBounds.getY();
+            double x1 = dialogBounds.getX() + dialogBounds.getWidth();
+            double y1 = dialogBounds.getY() + dialogBounds.getHeight();
+            double x2 = frameBounds.getX() + frameBounds.getWidth();
+            double y2 = frameBounds.getY() + frameBounds.getHeight();
+
+            int clickX = (int) ((x2 + x1) / 2);
+            int clickY = (int) ((y2 + y1) / 2);
+
+            robot.mouseMove(clickX, clickY);
+            robot.mousePress(InputEvent.BUTTON1_MASK);
+            robot.mouseRelease(InputEvent.BUTTON1_MASK);
+            toolkit.realSync();
+
+            int colorX = (int) ((x0 + x1) / 2);
+            int colorY = (int) ((y0 + y1) / 2);
+
+            Color color = robot.getPixelColor(colorX, colorY);
+
+            dialog.setVisible(false);
+            frame.setVisible(false);
+
+            if (!DIALOG_COLOR.equals(color)) {
+                throw new RuntimeException("The frame is on top"
+                        + " of the modal dialog!");
+            }
+        } catch (Exception ex) {
+            throw new RuntimeException(ex);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Mouse/GetMousePositionTest/GetMousePositionWithOverlay.java	Thu Sep 26 17:18:12 2013 -0700
@@ -0,0 +1,108 @@
+/*
+ * Copyright (c) 2013, 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.
+ */
+
+import test.java.awt.regtesthelpers.Util;
+
+import javax.swing.*;
+import java.awt.*;
+import java.util.concurrent.atomic.AtomicReference;
+
+/**
+ * @test
+ * @bug 8012026
+ * @summary Component.getMousePosition() does not work in an applet on MacOS
+ * @author Petr Pchelko
+ * @library ../../regtesthelpers
+ * @build Util
+ * @compile GetMousePositionWithOverlay.java
+ * @run main/othervm GetMousePositionWithOverlay
+ */
+
+public class GetMousePositionWithOverlay {
+
+    static Frame backFrame;
+    static Frame frontFrame;
+
+    public static void main(String[] args) throws Throwable {
+        try {
+            SwingUtilities.invokeAndWait(new Runnable() {
+                @Override
+                public void run() {
+                    constructTestUI();
+                }
+            });
+            Util.waitForIdle(null);
+
+            Robot r = new Robot();
+            Util.pointOnComp(frontFrame, r);
+            Util.waitForIdle(null);
+
+            Point pos = getMousePosition(backFrame);
+            if (pos != null) {
+                throw new RuntimeException("Test failed. Mouse position should be null but was" + pos);
+            }
+
+            pos = getMousePosition(frontFrame);
+            if (pos == null) {
+                throw new RuntimeException("Test failed. Mouse position should not be null");
+            }
+
+            r.mouseMove(189, 189);
+            Util.waitForIdle(null);
+
+            pos = getMousePosition(backFrame);
+            if (pos == null) {
+                throw new RuntimeException("Test failed. Mouse position should not be null");
+            }
+        } finally {
+            SwingUtilities.invokeLater(new Runnable() {
+                @Override
+                public void run() {
+                    backFrame.dispose();
+                    frontFrame.dispose();
+                }
+            });
+        }
+    }
+
+    private static Point getMousePosition(final Component component) throws Exception {
+        final AtomicReference<Point> pos = new AtomicReference<Point>();
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                pos.set(component.getMousePosition());
+            }
+        });
+        return pos.get();
+    }
+
+    private static void constructTestUI() {
+        backFrame = new Frame();
+        backFrame.setBounds(100, 100, 100, 100);
+        backFrame.setVisible(true);
+
+        frontFrame = new Frame();
+        frontFrame.setBounds(120, 120, 60, 60);
+        frontFrame.setVisible(true);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Mouse/GetMousePositionTest/GetMousePositionWithPopup.java	Thu Sep 26 17:18:12 2013 -0700
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2013, 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.
+ */
+
+import test.java.awt.regtesthelpers.Util;
+
+import javax.swing.*;
+import java.awt.*;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseMotionAdapter;
+
+/**
+ * @test
+ * @bug 8012026
+ * @summary Component.getMousePosition() does not work in an applet on MacOS
+ * @author Petr Pchelko
+ * @library ../../regtesthelpers
+ * @build Util
+ * @compile GetMousePositionWithPopup.java
+ * @run main/othervm GetMousePositionWithPopup
+ */
+
+public class GetMousePositionWithPopup {
+
+    private static Frame frame1;
+    private static Frame frame2;
+
+    public static void main(String[] args) throws Exception {
+        try {
+        Robot r = Util.createRobot();
+        r.mouseMove(0, 0);
+        Util.waitForIdle(null);
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                constructTestUI();
+            }
+        });
+
+        Util.waitForIdle(null);
+        r.mouseMove(149, 149);
+        Util.waitForIdle(null);
+        r.mouseMove(150, 150);
+        Util.waitForIdle(null);
+
+        } finally {
+            SwingUtilities.invokeLater(new Runnable() {
+                @Override
+                public void run() {
+                    frame1.dispose();
+                    frame2.dispose();
+                }
+            });
+        }
+    }
+
+    private static void constructTestUI() {
+        frame1 = new Frame();
+        frame1.setBounds(100, 100, 100, 100);
+        frame1.addMouseMotionListener(new MouseMotionAdapter() {
+
+            private boolean shown = false;
+
+            @Override
+            public void mouseMoved(MouseEvent e) {
+                if (shown) {
+                    return;
+                }
+
+                shown = true;
+
+                frame2 = new Frame();
+                frame2.setBounds(120, 120, 120, 120);
+                frame2.setVisible(true);
+
+                Point positionInFrame2 = frame2.getMousePosition();
+                if (positionInFrame2.x != 30 || positionInFrame2.y != 30) {
+                    throw new RuntimeException("Wrong position reported. Should be [30, 30] but was [" +
+                            positionInFrame2.x + ", " + positionInFrame2.y + "]");
+                }
+
+                Point positionInFrame1 = frame1.getMousePosition();
+                if (positionInFrame1 != null) {
+                    throw new RuntimeException("Wrong position reported. Should be null");
+                }
+
+            }
+        });
+        frame1.setVisible(true);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Toolkit/DynamicLayout/bug7172833.java	Thu Sep 26 17:18:12 2013 -0700
@@ -0,0 +1,314 @@
+/*
+ * Copyright (c) 2013, 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.
+ */
+
+
+import java.awt.*;
+import java.awt.datatransfer.Clipboard;
+import java.awt.dnd.DragGestureEvent;
+import java.awt.dnd.InvalidDnDOperationException;
+import java.awt.dnd.peer.DragSourceContextPeer;
+import java.awt.font.TextAttribute;
+import java.awt.im.InputMethodHighlight;
+import java.awt.image.ColorModel;
+import java.awt.image.ImageObserver;
+import java.awt.image.ImageProducer;
+import java.awt.peer.*;
+import java.net.URL;
+import java.util.Map;
+import java.util.Properties;
+
+
+/**
+ * @test
+ * @bug 7172833
+ * @summary java.awt.Toolkit methods is/setDynamicLayout() should be consistent.
+ * @author Sergey Bylokhov
+ */
+public final class bug7172833 {
+
+    public static void main(final String[] args) throws Exception {
+        final StubbedToolkit t = new StubbedToolkit();
+
+        t.setDynamicLayout(true);
+        if(!t.isDynamicLayoutSet()){
+            throw new RuntimeException("'true' expected but 'false' returned");
+        }
+
+        t.setDynamicLayout(false);
+        if(t.isDynamicLayoutSet()){
+            throw new RuntimeException("'false' expected but 'true' returned");
+        }
+    }
+
+    static final class StubbedToolkit extends Toolkit {
+
+        @Override
+        protected boolean isDynamicLayoutSet() throws HeadlessException {
+            return super.isDynamicLayoutSet();
+        }
+
+        @Override
+        protected DesktopPeer createDesktopPeer(final Desktop target)
+                throws HeadlessException {
+            return null;
+        }
+
+        @Override
+        protected ButtonPeer createButton(final Button target)
+                throws HeadlessException {
+            return null;
+        }
+
+        @Override
+        protected TextFieldPeer createTextField(final TextField target)
+                throws HeadlessException {
+            return null;
+        }
+
+        @Override
+        protected LabelPeer createLabel(final Label target) throws HeadlessException {
+            return null;
+        }
+
+        @Override
+        protected ListPeer createList(final List target) throws HeadlessException {
+            return null;
+        }
+
+        @Override
+        protected CheckboxPeer createCheckbox(final Checkbox target)
+                throws HeadlessException {
+            return null;
+        }
+
+        @Override
+        protected ScrollbarPeer createScrollbar(final Scrollbar target)
+                throws HeadlessException {
+            return null;
+        }
+
+        @Override
+        protected ScrollPanePeer createScrollPane(final ScrollPane target)
+                throws HeadlessException {
+            return null;
+        }
+
+        @Override
+        protected TextAreaPeer createTextArea(final TextArea target)
+                throws HeadlessException {
+            return null;
+        }
+
+        @Override
+        protected ChoicePeer createChoice(final Choice target)
+                throws HeadlessException {
+            return null;
+        }
+
+        @Override
+        protected FramePeer createFrame(final Frame target) throws HeadlessException {
+            return null;
+        }
+
+        @Override
+        protected CanvasPeer createCanvas(final Canvas target) {
+            return null;
+        }
+
+        @Override
+        protected PanelPeer createPanel(final Panel target) {
+            return null;
+        }
+
+        @Override
+        protected WindowPeer createWindow(final Window target)
+                throws HeadlessException {
+            return null;
+        }
+
+        @Override
+        protected DialogPeer createDialog(final Dialog target)
+                throws HeadlessException {
+            return null;
+        }
+
+        @Override
+        protected MenuBarPeer createMenuBar(final MenuBar target)
+                throws HeadlessException {
+            return null;
+        }
+
+        @Override
+        protected MenuPeer createMenu(final Menu target) throws HeadlessException {
+            return null;
+        }
+
+        @Override
+        protected PopupMenuPeer createPopupMenu(final PopupMenu target)
+                throws HeadlessException {
+            return null;
+        }
+
+        @Override
+        protected MenuItemPeer createMenuItem(final MenuItem target)
+                throws HeadlessException {
+            return null;
+        }
+
+        @Override
+        protected FileDialogPeer createFileDialog(final FileDialog target)
+                throws HeadlessException {
+            return null;
+        }
+
+        @Override
+        protected CheckboxMenuItemPeer createCheckboxMenuItem(
+                final CheckboxMenuItem target) throws HeadlessException {
+            return null;
+        }
+
+        @Override
+        protected FontPeer getFontPeer(final String name, final int style) {
+            return null;
+        }
+
+        @Override
+        public Dimension getScreenSize() throws HeadlessException {
+            return null;
+        }
+
+        @Override
+        public int getScreenResolution() throws HeadlessException {
+            return 0;
+        }
+
+        @Override
+        public ColorModel getColorModel() throws HeadlessException {
+            return null;
+        }
+
+        @Override
+        public String[] getFontList() {
+            return new String[0];
+        }
+
+        @Override
+        public FontMetrics getFontMetrics(final Font font) {
+            return null;
+        }
+
+        @Override
+        public void sync() {
+
+        }
+
+        @Override
+        public Image getImage(final String filename) {
+            return null;
+        }
+
+        @Override
+        public Image getImage(final URL url) {
+            return null;
+        }
+
+        @Override
+        public Image createImage(final String filename) {
+            return null;
+        }
+
+        @Override
+        public Image createImage(final URL url) {
+            return null;
+        }
+
+        @Override
+        public boolean prepareImage(
+                final Image image, final int width, final int height,
+                                    final ImageObserver observer) {
+            return false;
+        }
+
+        @Override
+        public int checkImage(final Image image, final int width, final int height,
+                              final ImageObserver observer) {
+            return 0;
+        }
+
+        @Override
+        public Image createImage(final ImageProducer producer) {
+            return null;
+        }
+
+        @Override
+        public Image createImage(final byte[] imagedata, final int imageoffset,
+                                 final int imagelength) {
+            return null;
+        }
+
+        @Override
+        public PrintJob getPrintJob(final Frame frame, final String jobtitle,
+                                    final Properties props) {
+            return null;
+        }
+
+        @Override
+        public void beep() {
+
+        }
+
+        @Override
+        public Clipboard getSystemClipboard() throws HeadlessException {
+            return null;
+        }
+
+        @Override
+        protected EventQueue getSystemEventQueueImpl() {
+            return null;
+        }
+
+        @Override
+        public DragSourceContextPeer createDragSourceContextPeer(
+                final DragGestureEvent dge) throws InvalidDnDOperationException {
+            return null;
+        }
+
+        @Override
+        public boolean isModalityTypeSupported(
+                final Dialog.ModalityType modalityType) {
+            return false;
+        }
+
+        @Override
+        public boolean isModalExclusionTypeSupported(
+                final Dialog.ModalExclusionType modalExclusionType) {
+            return false;
+        }
+
+        @Override
+        public Map<TextAttribute, ?> mapInputMethodHighlight(
+                final InputMethodHighlight highlight) throws HeadlessException {
+            return null;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Toolkit/ToolkitPropertyTest/bug7129133.java	Thu Sep 26 17:18:12 2013 -0700
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2013, 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 7129133
+ * @summary [macosx] Accelerators are displayed as Meta instead of the Command symbol
+ * @author leonid.romanov@oracle.com
+ * @run main bug7129133
+ */
+
+import java.awt.*;
+
+public class bug7129133 {
+    public static void main(String[] args) throws Exception {
+        if (sun.awt.OSInfo.getOSType() != sun.awt.OSInfo.OSType.MACOSX) {
+            System.out.println("This test is for MacOS only. Automatically passed on other platforms.");
+            return;
+        }
+
+        Toolkit.getDefaultToolkit();
+
+        String cmdSymbol = "\u2318";
+        String val = Toolkit.getProperty("AWT.meta", "Meta");
+
+        if (!val.equals(cmdSymbol)) {
+           throw new Exception("Wrong property value for AWT.meta. Expected: " + cmdSymbol + ", actual: " + val);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/TrayIcon/ShowAfterDisposeTest/ShowAfterDisposeTest.html	Thu Sep 26 17:18:12 2013 -0700
@@ -0,0 +1,43 @@
+<html>
+<!--
+ Copyright (c) 2013, 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 6384984 8004032
+  @summary TrayIcon try to dispay a tooltip when is not visible
+  @author Dmitry.Cherepanov@sun.com area=awt.tray
+  @run applet/manual=yesno ShowAfterDisposeTest.html
+  -->
+<head>
+<title> ShowAfterDisposeTest </title>
+</head>
+<body>
+
+<h1>ShowAfterDisposeTest<br>Bug ID: 6384984</h1>
+
+<p> See the dialog box (usually in upper left corner) for instructions</p>
+
+<APPLET CODE="ShowAfterDisposeTest.class" WIDTH=200 HEIGHT=200></APPLET>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/TrayIcon/ShowAfterDisposeTest/ShowAfterDisposeTest.java	Thu Sep 26 17:18:12 2013 -0700
@@ -0,0 +1,246 @@
+/*
+ * Copyright (c) 2013, 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 6384984 8004032
+  @summary TrayIcon try to dispay a tooltip when is not visible
+  @author Dmitry.Cherepanov@sun.com area=awt.tray
+  @run applet/manual=yesno ShowAfterDisposeTest.html
+*/
+
+import java.applet.*;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.awt.image.*;
+
+public class ShowAfterDisposeTest extends Applet
+{
+    boolean traySupported;
+
+    public void init()
+    {
+        this.setLayout (new BorderLayout ());
+
+        String[] instructions;
+        traySupported = SystemTray.isSupported();
+        if (traySupported)
+        {
+            String[] s =
+            {
+                "1) When the test starts an icon is added to the SystemTray area.",
+                "2a) If you use Apple OS X,",
+                "    right click on this icon (it's important to click before the tooltip is shown).",
+                "    The icon should disappear.",
+                "2b) If you use other os (Windows, Linux, Solaris),",
+                "    double click on this icon (it's important to click before the tooltip is shown).",
+                "    The icon should disappear.",
+                "3) If the bug is reproducible then the test will fail without assistance.",
+                "4) Just press the 'pass' button."
+            };
+            instructions = s;
+        }
+        else
+        {
+            String[] s =
+            {
+              "The test cannot be run because SystemTray is not supported.",
+              "Simply press PASS button."
+            };
+            instructions = s;
+        }
+        Sysout.createDialogWithInstructions(instructions);
+    }
+
+    public void start ()
+    {
+        setSize (200,200);
+        setVisible(true);
+        validate();
+
+        if (!traySupported)
+        {
+            return;
+        }
+
+        BufferedImage img = new BufferedImage(32, 32, BufferedImage.TYPE_INT_ARGB);
+        Graphics g = img.createGraphics();
+        g.setColor(Color.WHITE);
+        g.fillRect(0, 0, 32, 32);
+        g.setColor(Color.RED);
+        g.fillRect(6, 6, 20, 20);
+        g.dispose();
+
+        final SystemTray tray = SystemTray.getSystemTray();
+        final TrayIcon icon = new TrayIcon(img);
+        icon.setImageAutoSize(true);
+        icon.addActionListener(new ActionListener()
+            {
+                public void actionPerformed(ActionEvent ev)
+                {
+                    tray.remove(icon);
+                }
+            }
+        );
+
+        try {
+            tray.add(icon);
+        } catch (AWTException e) {
+            Sysout.println(e.toString());
+            Sysout.println("!!! The test coudn't be performed !!!");
+            return;
+        }
+        icon.setToolTip("tooltip");
+    }
+}
+
+/****************************************************
+ Standard Test Machinery
+ DO NOT modify anything below -- it's a standard
+  chunk of code whose purpose is to make user
+  interaction uniform, and thereby make it simpler
+  to read and understand someone else's test.
+ ****************************************************/
+
+/**
+ This is part of the standard test machinery.
+ It creates a dialog (with the instructions), and is the interface
+  for sending text messages to the user.
+ To print the instructions, send an array of strings to Sysout.createDialog
+  WithInstructions method.  Put one line of instructions per array entry.
+ To display a message for the tester to see, simply call Sysout.println
+  with the string to be displayed.
+ This mimics System.out.println but works within the test harness as well
+  as standalone.
+ */
+
+class Sysout
+{
+    private static TestDialog dialog;
+
+    public static void createDialogWithInstructions( String[] instructions )
+    {
+        dialog = new TestDialog( new Frame(), "Instructions" );
+        dialog.printInstructions( instructions );
+        dialog.setVisible(true);
+        println( "Any messages for the tester will display here." );
+    }
+
+    public static void createDialog( )
+    {
+        dialog = new TestDialog( new Frame(), "Instructions" );
+        String[] defInstr = { "Instructions will appear here. ", "" } ;
+        dialog.printInstructions( defInstr );
+        dialog.setVisible(true);
+        println( "Any messages for the tester will display here." );
+    }
+
+    public static void printInstructions( String[] instructions )
+    {
+        dialog.printInstructions( instructions );
+    }
+
+    public static void println( String messageIn )
+    {
+        dialog.displayMessage( messageIn );
+    }
+}
+
+/**
+  This is part of the standard test machinery.  It provides a place for the
+   test instructions to be displayed, and a place for interactive messages
+   to the user to be displayed.
+  To have the test instructions displayed, see Sysout.
+  To have a message to the user be displayed, see Sysout.
+  Do not call anything in this dialog directly.
+  */
+class TestDialog extends Dialog
+{
+
+    TextArea instructionsText;
+    TextArea messageText;
+    int maxStringLength = 80;
+
+    //DO NOT call this directly, go through Sysout
+    public TestDialog( Frame frame, String name )
+    {
+        super( frame, name );
+        int scrollBoth = TextArea.SCROLLBARS_BOTH;
+        instructionsText = new TextArea( "", 15, maxStringLength, scrollBoth );
+        add( "North", instructionsText );
+
+        messageText = new TextArea( "", 5, maxStringLength, scrollBoth );
+        add("Center", messageText);
+
+        pack();
+
+        setVisible(true);
+    }
+
+    //DO NOT call this directly, go through Sysout
+    public void printInstructions( String[] instructions )
+    {
+        //Clear out any current instructions
+        instructionsText.setText( "" );
+
+        //Go down array of instruction strings
+
+        String printStr, remainingStr;
+        for( int i=0; i < instructions.length; i++ )
+        {
+            //chop up each into pieces maxSringLength long
+            remainingStr = instructions[ i ];
+            while( remainingStr.length() > 0 )
+            {
+                //if longer than max then chop off first max chars to print
+                if( remainingStr.length() >= maxStringLength )
+                {
+                    //Try to chop on a word boundary
+                    int posOfSpace = remainingStr.
+                        lastIndexOf( ' ', maxStringLength - 1 );
+
+                    if( posOfSpace <= 0 ) posOfSpace = maxStringLength - 1;
+
+                    printStr = remainingStr.substring( 0, posOfSpace + 1 );
+                    remainingStr = remainingStr.substring( posOfSpace + 1 );
+                }
+                //else just print
+                else
+                {
+                    printStr = remainingStr;
+                    remainingStr = "";
+                }
+
+                instructionsText.append( printStr + "\n" );
+            }
+        }
+    }
+
+    //DO NOT call this directly, go through Sysout
+    public void displayMessage( String messageIn )
+    {
+        messageText.append( messageIn + "\n" );
+        System.out.println(messageIn);
+    }
+}
--- a/jdk/test/java/awt/Window/MaximizeOffscreen/MaximizeOffscreenTest.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/test/java/awt/Window/MaximizeOffscreen/MaximizeOffscreenTest.java	Thu Sep 26 17:18:12 2013 -0700
@@ -23,6 +23,7 @@
 
 /**
  * @test @summary JVM crash if the frame maximized from offscreen
+ * @bug 8020210
  * @author Petr Pchelko
  * @library ../../regtesthelpers
  * @build Util
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/event/KeyEvent/ExtendedKeyCode/ExtendedKeyCodeTest.java	Thu Sep 26 17:18:12 2013 -0700
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2011, 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.
+ */
+
+import java.awt.Frame;
+import java.awt.Robot;
+import java.awt.Toolkit;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyAdapter;
+import sun.awt.ExtendedKeyCodes;
+import sun.awt.SunToolkit;
+
+/*
+ * @test
+ * @bug 8007156
+ * @summary Extended key code is not set for a key event
+ * @author Alexandr Scherbatiy
+ * @run main ExtendedKeyCodeTest
+ */
+public class ExtendedKeyCodeTest {
+
+    private static volatile boolean setExtendedKeyCode = true;
+    private static volatile int eventsCount = 0;
+
+    public static void main(String[] args) throws Exception {
+        SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+        Robot robot = new Robot();
+
+        Frame frame = new Frame();
+        frame.setSize(300, 300);
+
+        frame.addKeyListener(new KeyAdapter() {
+
+            @Override
+            public void keyPressed(KeyEvent e) {
+                eventsCount++;
+                setExtendedKeyCode = setExtendedKeyCode && (e.getExtendedKeyCode()
+                    == ExtendedKeyCodes.getExtendedKeyCodeForChar(e.getKeyChar()));
+            }
+
+            @Override
+            public void keyReleased(KeyEvent e) {
+                eventsCount++;
+                setExtendedKeyCode = setExtendedKeyCode && (e.getExtendedKeyCode()
+                    == ExtendedKeyCodes.getExtendedKeyCodeForChar(e.getKeyChar()));
+            }
+        });
+
+        frame.setVisible(true);
+        toolkit.realSync();
+
+        robot.keyPress(KeyEvent.VK_D);
+        robot.keyRelease(KeyEvent.VK_D);
+        toolkit.realSync();
+
+        frame.dispose();
+
+        if (eventsCount != 2 || !setExtendedKeyCode) {
+            throw new RuntimeException("Wrong extended key code");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/event/KeyEvent/KeyChar/KeyCharTest.java	Thu Sep 26 17:18:12 2013 -0700
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2013, 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.
+ */
+
+import java.awt.AWTEvent;
+import java.awt.Frame;
+import java.awt.Robot;
+import java.awt.Toolkit;
+import java.awt.event.AWTEventListener;
+import java.awt.event.KeyEvent;
+import java.util.Locale;
+import sun.awt.SunToolkit;
+
+/*
+ * @test
+ * @bug 8022401
+ * @summary Wrong key char
+ * @author Alexandr Scherbatiy
+ * @run main KeyCharTest
+ */
+public class KeyCharTest {
+
+    private static volatile int eventsCount = 0;
+
+    static {
+        Locale.setDefault(Locale.ENGLISH);
+
+        Toolkit.getDefaultToolkit().addAWTEventListener(new AWTEventListener() {
+
+            @Override
+            public void eventDispatched(AWTEvent event) {
+                eventsCount++;
+                char delete = ((KeyEvent) event).getKeyChar();
+                if (delete != '\u007f') {
+                    throw new RuntimeException("Key char is not delete: '" + delete + "'");
+                }
+            }
+        }, AWTEvent.KEY_EVENT_MASK);
+    }
+
+    public static void main(String[] args) throws Exception {
+
+        SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+
+        Frame frame = new Frame();
+        frame.setSize(300, 300);
+        frame.setVisible(true);
+        toolkit.realSync();
+
+        Robot robot = new Robot();
+
+        robot.keyPress(KeyEvent.VK_DELETE);
+        robot.keyRelease(KeyEvent.VK_DELETE);
+        toolkit.realSync();
+
+        frame.dispose();
+
+        if (eventsCount != 3) {
+            throw new RuntimeException("Wrong number of key events: " + eventsCount);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/print/bug8023392/bug8023392.html	Thu Sep 26 17:18:12 2013 -0700
@@ -0,0 +1,20 @@
+<html>
+<!--
+  @test
+  @bug 8023392
+  @summary Swing text components printed with spaces between chars
+  @author Anton Nashatyrev
+  @run applet/manual=yesno bug8023392.html
+  -->
+<head>
+    <title> Bug 8023392 </title>
+</head>
+<body>
+
+<h1>Bug ID: 8023392</h1>
+
+<p> See the dialog box (usually in upper left corner) for instructions</p>
+
+<APPLET CODE="bug8023392.class" WIDTH=400 HEIGHT=400></APPLET>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/print/bug8023392/bug8023392.java	Thu Sep 26 17:18:12 2013 -0700
@@ -0,0 +1,286 @@
+/*
+ * Copyright (c) 2013, 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * 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 8023392
+  @summary Swing text components printed with spaces between chars
+  @author Anton Nashatyrev
+  @run applet/manual=yesno bug8023392.html
+*/
+
+import javax.swing.*;
+import javax.swing.border.LineBorder;
+import java.applet.Applet;
+import java.awt.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.font.TextAttribute;
+import java.awt.print.PageFormat;
+import java.awt.print.Printable;
+import java.awt.print.PrinterException;
+import java.awt.print.PrinterJob;
+import java.text.AttributedCharacterIterator;
+import java.text.AttributedString;
+
+
+public class bug8023392 extends Applet {
+    static final String[] instructions = {
+        "A Frame containing several pairs of labels ((a) and (b)) is displayed.",
+        "Labels of each pair look the same and are left-aligned (with spaces ",
+        "between chars).",
+        "1. Hit the print button.",
+        "2. Select any available printer (printing to file is also fine).",
+        "3. Look at the printing result (paper, PDF, PS, etc.):",
+        "   The (a) and (b) labels should look almost the same and the (a) labels",
+        "   shouldn't appear as if they are stretched along X axis."};
+
+    public void init() {
+        this.setLayout(new BorderLayout());
+        add(new SimplePrint2(), BorderLayout.CENTER);
+
+        Sysout.createDialogWithInstructions(instructions);
+
+    }
+
+    public static class SimplePrint2 extends JPanel
+            implements ActionListener, Printable {
+        JLabel label1;
+        JLabel label2;
+        JButton printButton;
+
+
+        public SimplePrint2() {
+            setLayout(new BorderLayout());
+            label1 = new JLabel("2a) a b c d e" +
+                    "                         ");
+            label2 = new JLabel("2b) a b c d e");
+
+            Box p1 = new Box(BoxLayout.Y_AXIS);
+            p1.add(label1);
+            p1.add(label2);
+            p1.add(new JLabel("wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww") {
+                String s = "3a) a b c d e                                     ";
+                @Override
+                protected void paintComponent(Graphics g) {
+                    sun.swing.SwingUtilities2.drawChars(this, g, s.toCharArray(),
+                            0, s.length(), 0, 15);
+                }
+            });
+            p1.add(new JLabel("wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww") {
+                String s = "3b) a b c d e";
+                @Override
+                protected void paintComponent(Graphics g) {
+                    sun.swing.SwingUtilities2.drawChars(this, g, s.toCharArray(),
+                            0, s.length(), 0, 15);
+                }
+            });
+            p1.add(new JLabel("wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww") {
+                String s = "4a) a b c d e                                     ";
+                AttributedCharacterIterator it;
+                {
+                    AttributedString as = new AttributedString(s);
+                    as.addAttribute(TextAttribute.FONT, getFont());
+                    as.addAttribute(TextAttribute.FOREGROUND, Color.RED, 3, 8);
+                    it = as.getIterator();
+                }
+                @Override
+                protected void paintComponent(Graphics g) {
+                    sun.swing.SwingUtilities2.drawString(this, g, it, 0, 15);
+                }
+            });
+
+            p1.add(new JLabel("wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww") {
+                String s = "4b) a b c d e";
+                AttributedCharacterIterator it;
+                {
+                    AttributedString as = new AttributedString(s);
+                    as.addAttribute(TextAttribute.FONT, getFont());
+                    as.addAttribute(TextAttribute.FOREGROUND, Color.RED, 3, 8);
+                    it = as.getIterator();
+                }
+                @Override
+                protected void paintComponent(Graphics g) {
+                    sun.swing.SwingUtilities2.drawString(this, g, it, 0, 15);
+                }
+            });
+
+            JPanel p2 = new JPanel();
+            printButton = new JButton("Print");
+            printButton.addActionListener(this);
+            p2.add(printButton);
+
+            Container c = this;
+            c.add(p1, BorderLayout.CENTER);
+            c.add(p2, BorderLayout.SOUTH);
+
+            String[] data = {
+                    "1a) \u30aa\u30f3\u30e9\u30a4\u30f3\u6d88\u8fbc" +
+                    "                                              ",
+                    "1b) \u30aa\u30f3\u30e9\u30a4\u30f3\u6d88\u8fbc"
+            };
+            JList l0 = new JList(data);
+            l0.setVisibleRowCount(l0.getModel().getSize());
+            JScrollPane jsp = new JScrollPane(l0);
+            l0.setBorder(new LineBorder(Color.GRAY));
+            c.add(jsp, BorderLayout.NORTH);
+
+            for (Component comp : new Component[]{label1, label2, printButton}) {
+                comp.setFont(new Font("Monospaced", 0, 16));
+            }
+        }
+
+        public void actionPerformed(ActionEvent e) {
+            PrinterJob job = PrinterJob.getPrinterJob();
+            job.setPrintable(this);
+            if (job.printDialog()) {
+                try {
+                    job.print();
+                } catch (PrinterException ex) {
+                    ex.printStackTrace();
+                }
+            }
+        }
+
+        public int print(Graphics graphics,
+                         PageFormat pageFormat,
+                         int pageIndex)
+                throws PrinterException {
+            if (pageIndex >= 1) {
+                return Printable.NO_SUCH_PAGE;
+            }
+
+            this.paint(graphics);
+            return Printable.PAGE_EXISTS;
+        }
+    }
+}
+
+
+/**
+ * *************************************************
+ * Standard Test Machinery
+ * DO NOT modify anything below -- it's a standard
+ * chunk of code whose purpose is to make user
+ * interaction uniform, and thereby make it simpler
+ * to read and understand someone else's test.
+ * **************************************************
+ */
+class Sysout {
+    private static TestDialog dialog;
+
+    public static void createDialogWithInstructions(String[] instructions) {
+        dialog = new TestDialog(new Frame(), "Instructions");
+        dialog.printInstructions(instructions);
+        dialog.show();
+        println("Any messages for the tester will display here.");
+    }
+
+    public static void createDialog() {
+        dialog = new TestDialog(new Frame(), "Instructions");
+        String[] defInstr = {"Instructions will appear here. ", ""};
+        dialog.printInstructions(defInstr);
+        dialog.show();
+        println("Any messages for the tester will display here.");
+    }
+
+
+    public static void printInstructions(String[] instructions) {
+        dialog.printInstructions(instructions);
+    }
+
+
+    public static void println(String messageIn) {
+        dialog.displayMessage(messageIn);
+    }
+
+}// Sysout  class
+
+
+class TestDialog extends Dialog {
+
+    TextArea instructionsText;
+    TextArea messageText;
+    int maxStringLength = 80;
+
+    //DO NOT call this directly, go through Sysout
+    public TestDialog(Frame frame, String name) {
+        super(frame, name);
+        int scrollBoth = TextArea.SCROLLBARS_BOTH;
+        instructionsText = new TextArea("", 15, maxStringLength, scrollBoth);
+        add("North", instructionsText);
+
+        messageText = new TextArea("", 5, maxStringLength, scrollBoth);
+        add("South", messageText);
+
+        pack();
+
+        show();
+    }// TestDialog()
+
+    //DO NOT call this directly, go through Sysout
+    public void printInstructions(String[] instructions) {
+        //Clear out any current instructions
+        instructionsText.setText("");
+
+        //Go down array of instruction strings
+
+        String printStr, remainingStr;
+        for (int i = 0; i < instructions.length; i++) {
+            //chop up each into pieces maxSringLength long
+            remainingStr = instructions[i];
+            while (remainingStr.length() > 0) {
+                //if longer than max then chop off first max chars to print
+                if (remainingStr.length() >= maxStringLength) {
+                    //Try to chop on a word boundary
+                    int posOfSpace = remainingStr.
+                            lastIndexOf(' ', maxStringLength - 1);
+
+                    if (posOfSpace <= 0) posOfSpace = maxStringLength - 1;
+
+                    printStr = remainingStr.substring(0, posOfSpace + 1);
+                    remainingStr = remainingStr.substring(posOfSpace + 1);
+                }
+                //else just print
+                else {
+                    printStr = remainingStr;
+                    remainingStr = "";
+                }
+
+                instructionsText.append(printStr + "\n");
+
+            }// while
+
+        }// for
+
+    }//printInstructions()
+
+    //DO NOT call this directly, go through Sysout
+    public void displayMessage(String messageIn) {
+        messageText.append(messageIn + "\n");
+    }
+
+}// TestDialog  class
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/beans/Introspector/Test7172865.java	Thu Sep 26 17:18:12 2013 -0700
@@ -0,0 +1,162 @@
+/*
+ * Copyright (c) 2013, 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.
+ */
+
+import java.beans.IndexedPropertyDescriptor;
+import java.beans.MethodDescriptor;
+import java.beans.PropertyDescriptor;
+
+/*
+ * @test
+ * @bug 7172854 7172865
+ * @summary Tests that cached methods are not lost
+ * @author Sergey Malenkov
+ */
+
+public class Test7172865 {
+    public static void main(String[] args) throws Exception {
+        int errors = 0;
+
+        MethodDescriptor md = new MethodDescriptor(Test7172865.class.getMethod("getGood"));
+
+        errors += test(PropertyDescriptor.class, "good", true);
+        PropertyDescriptor pdGoodString = new PropertyDescriptor("good", Test7172865.class, "getGood", "setGood");
+        PropertyDescriptor pdGoodMethod = new PropertyDescriptor("good",
+                Test7172865.class.getMethod("getGood"),
+                Test7172865.class.getMethod("setGood", args.getClass()));
+
+        errors += test(PropertyDescriptor.class, "bad", false);
+        PropertyDescriptor pdBadString = new PropertyDescriptor("bad", Test7172865.class, "getBad", null);
+        PropertyDescriptor pdBadMethod = new PropertyDescriptor("bad",
+                Test7172865.class.getMethod("getBad"),
+                Test7172865.class.getMethod("setBad", args.getClass()));
+
+        errors += test(IndexedPropertyDescriptor.class, "good", true);
+        IndexedPropertyDescriptor ipdGoodString = new IndexedPropertyDescriptor("good", Test7172865.class, "getGood", "setGood", "getGood", "setGood");
+        IndexedPropertyDescriptor ipdGoodMethod = new IndexedPropertyDescriptor("good",
+                Test7172865.class.getMethod("getGood"),
+                Test7172865.class.getMethod("setGood", args.getClass()),
+                Test7172865.class.getMethod("getGood", Integer.TYPE),
+                Test7172865.class.getMethod("setGood", Integer.TYPE, String.class));
+
+        errors += test(IndexedPropertyDescriptor.class, "bad", false);
+        IndexedPropertyDescriptor ipdBadString = new IndexedPropertyDescriptor("bad", Test7172865.class, "getBad", null, "getBad", null);
+        IndexedPropertyDescriptor ipdBadMethod = new IndexedPropertyDescriptor("bad",
+                Test7172865.class.getMethod("getBad"),
+                Test7172865.class.getMethod("setBad", args.getClass()),
+                Test7172865.class.getMethod("getBad", Integer.TYPE),
+                Test7172865.class.getMethod("setBad", Integer.TYPE, String.class));
+
+        for (int i = 1; i <= 2; i++) {
+            System.out.println("STEP: " + i);
+            errors += test("md", null != md.getMethod());
+
+            errors += test("pdGoodString", pdGoodString, true, true);
+            errors += test("pdGoodMethod", pdGoodMethod, true, true);
+
+            errors += test("pdBadString", pdBadString, true, false);
+            errors += test("pdBadMethod", pdBadMethod, true, true);
+
+            errors += test("ipdGoodString", ipdGoodString, true, true, true, true);
+            errors += test("ipdGoodMethod", ipdGoodMethod, true, true, true, true);
+
+            errors += test("ipdBadString", ipdBadString, true, false, true, false);
+            errors += test("ipdBadMethod", ipdBadMethod, true, true, true, true);
+
+            try {
+                int[] array = new int[1024];
+                while (true) {
+                    array = new int[array.length << 1];
+                }
+            }
+            catch (OutOfMemoryError error) {
+                System.gc();
+            }
+        }
+        if (errors > 0) {
+            throw new Error("found " + errors + " errors");
+        }
+    }
+
+    private static int test(Class<?> type, String property, boolean value) {
+        String message = type.getSimpleName() + "(" + property + ") ";
+        try {
+            type.getConstructor(String.class, Class.class).newInstance(property, Test7172865.class);
+            message += "passed";
+        }
+        catch (Exception exception) {
+            message += "failed";
+            value = !value;
+        }
+        if (value) {
+            message += " as expected";
+        }
+        System.out.println(message);
+        return value ? 0 : 1;
+    }
+
+    private static int test(String message, boolean value) {
+        System.out.println(message + ": " + (value ? "passed" : "failed"));
+        return value ? 0 : 1;
+    }
+
+    private static int test(String message, PropertyDescriptor pd, boolean rm, boolean wm) {
+        return test(message + ".Read", rm == (null != pd.getReadMethod()))
+             + test(message + ".Write", wm == (null != pd.getWriteMethod()));
+    }
+
+    private static int test(String message, IndexedPropertyDescriptor ipd, boolean rm, boolean wm, boolean irm, boolean iwm) {
+        return test(message, ipd, rm, wm)
+             + test(message + ".IndexedRead", irm == (null != ipd.getIndexedReadMethod()))
+             + test(message + ".IndexedWrite", iwm == (null != ipd.getIndexedWriteMethod()));
+    }
+
+    public String[] getGood() {
+        return null;
+    }
+
+    public String getGood(int index) {
+        return null;
+    }
+
+    public void setGood(String[] good) {
+    }
+
+    public void setGood(int index, String value) {
+    }
+
+    public String[] getBad() {
+        return null;
+    }
+
+    public String getBad(int index) {
+        return null;
+    }
+
+    public Test7172865 setBad(String[] bad) {
+        return null;
+    }
+
+    public Test7172865 setBad(int index, String value) {
+        return null;
+    }
+}
--- a/jdk/test/java/beans/Performance/Test7122740.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/test/java/beans/Performance/Test7122740.java	Thu Sep 26 17:18:12 2013 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 7122740
+ * @bug 7187618 7122740
  * @summary Tests just a benchmark of PropertyDescriptor(String, Class) performance
  * @author Sergey Malenkov
  * @run main/manual Test7122740
--- a/jdk/test/java/beans/Performance/Test7184799.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/test/java/beans/Performance/Test7184799.java	Thu Sep 26 17:18:12 2013 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 7184799
+ * @bug 7187618 7184799
  * @summary Tests just a benchmark of Introspector.getBeanInfo(Class) performance
  * @author Sergey Malenkov
  * @run main/manual Test7184799
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JComboBox/6236162/bug6236162.java	Thu Sep 26 17:18:12 2013 -0700
@@ -0,0 +1,119 @@
+/*
+ * Copyright (c) 2013, 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 6236162
+   @summary Checks that there is no an inconsistence in combo box
+            behavior when user points an item in combo popup
+            by mouse and then uses UP/DOWN keys.
+   @library ../../regtesthelpers
+   @build Util
+   @author Mikhail Lapshin
+   @run main bug6236162
+*/
+
+import sun.awt.SunToolkit;
+
+import javax.swing.*;
+import javax.swing.plaf.basic.*;
+import javax.swing.plaf.metal.MetalComboBoxUI;
+import java.awt.*;
+import java.awt.event.KeyEvent;
+
+public class bug6236162 {
+    private static final SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+    private static JFrame frame;
+    private static JComboBox combo;
+    private static MyComboUI comboUI;
+
+    public static void main(String[] args) throws Exception {
+        UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                createAndShowGUI();
+            }
+        });
+        toolkit.realSync();
+        test();
+        System.out.println("Test passed");
+    }
+
+    private static void createAndShowGUI() {
+        frame = new JFrame("bug6236162");
+
+        combo = new JComboBox(new String[]{"one", "two", "three", "four", "five"});
+        combo.setEditable(true);
+        comboUI = new MyComboUI();
+        combo.setUI(comboUI);
+        combo.setSelectedIndex(3);
+        frame.getContentPane().add(combo);
+
+        frame.pack();
+        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+        frame.setLocationRelativeTo(null);
+        frame.setVisible(true);
+    }
+
+    private static void test() throws AWTException {
+        Robot robot = new Robot();
+        robot.setAutoDelay(50);
+
+        // Open popup menu
+        realSync();
+        Util.hitKeys(robot, KeyEvent.VK_DOWN);
+
+        // Move mouse to the first popup menu item
+        realSync();
+        Point p = combo.getLocationOnScreen();
+        Dimension size = combo.getSize();
+        p.x += size.width / 2;
+        p.y += size.height;
+        float dy = 1;
+        robot.mouseMove(p.x, p.y - 5);
+        for (int i=1; i <= 10; i++) {
+            robot.mouseMove((int)(p.x), (int)(p.y - 5 + dy*i));
+        }
+
+        // Select the second popup menu item
+        realSync();
+        Util.hitKeys(robot, KeyEvent.VK_DOWN);
+
+        realSync();
+        JList list = comboUI.getComboPopup().getList();
+        if (list.getSelectedIndex() != 1) {
+            throw new RuntimeException("There is an inconsistence in combo box " +
+                    "behavior when user points an item in combo popup " +
+                    "by mouse and then uses UP/DOWN keys.");
+        }
+    }
+
+    private static void realSync() {
+        ((SunToolkit)Toolkit.getDefaultToolkit()).realSync();
+    }
+
+    // Gives access to BasicComboBoxUI.popup field
+    private static class MyComboUI extends MetalComboBoxUI {
+        public ComboPopup getComboPopup() {
+            return popup;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JComboBox/7195179/Test7195179.java	Thu Sep 26 17:18:12 2013 -0700
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2013, 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.
+ */
+
+import java.awt.Component;
+import javax.swing.GroupLayout;
+import javax.swing.JComboBox;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JList;
+import javax.swing.JPanel;
+import javax.swing.ListCellRenderer;
+import javax.swing.plaf.basic.BasicComboBoxRenderer;
+
+import static javax.swing.SwingUtilities.invokeAndWait;
+
+/*
+ * @test
+ * @bug 7195179
+ * @summary Tests that combobox works with generified renderers
+ * @author Sergey Malenkov
+ */
+
+public class Test7195179 {
+    public static void main(String[] args) throws Exception {
+        invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                Integer[] items = {null, 1, 2, 3};
+                JComboBox<Integer> combo = new JComboBox<>(items);
+                JLabel label = new JLabel("choose:");
+                JPanel panel = new JPanel();
+                GroupLayout layout = new GroupLayout(panel);
+                panel.setLayout(layout);
+                label.setLabelFor(combo);
+                combo.setSelectedIndex(0);
+                combo.setRenderer(new ListCellRenderer<Integer>() {
+                    private final BasicComboBoxRenderer renderer = new BasicComboBoxRenderer();
+
+                    @Override
+                    public Component getListCellRendererComponent(JList<? extends Integer> list, Integer value, int index, boolean isSelected, boolean cellHasFocus) {
+                        return this.renderer.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
+                    }
+                });
+                layout.setAutoCreateContainerGaps(true);
+                layout.setAutoCreateGaps(true);
+                layout.setHorizontalGroup(layout.createSequentialGroup()
+                        .addGroup(layout.createParallelGroup().addComponent(label))
+                        .addGroup(layout.createParallelGroup().addComponent(combo)));
+                layout.setVerticalGroup(layout
+                        .createSequentialGroup()
+                        .addGroup(layout
+                                .createParallelGroup(GroupLayout.Alignment.BASELINE)
+                                .addComponent(label)
+                                .addComponent(combo)));
+
+                JFrame frame = new JFrame(getClass().getSimpleName());
+                frame.add(panel);
+                frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
+                frame.pack();
+                frame.setVisible(true);
+            }
+        });
+    }
+}
--- a/jdk/test/javax/swing/JFileChooser/4150029/bug4150029.html	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/test/javax/swing/JFileChooser/4150029/bug4150029.html	Thu Sep 26 17:18:12 2013 -0700
@@ -1,6 +1,38 @@
 <html>
+<!--
+ Copyright (c) 2013, 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 4150029 8006087
+ @summary BackSpace keyboard button does not lead to parent directory
+ @author Oleg Mokhovikov
+ @run applet/manual=done bug4150029.html
+-->
+
 <body>
 <applet  code="bug4150029.class" width=200 height=200></applet>
+Follow the instructions below.
 1.Go into 'subDir' folder.
 2.Press BACKSPACE key.
 3.Push OPEN button.
--- a/jdk/test/javax/swing/JFileChooser/4150029/bug4150029.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/test/javax/swing/JFileChooser/4150029/bug4150029.java	Thu Sep 26 17:18:12 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2013, 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
@@ -21,11 +21,10 @@
  * questions.
  */
 
-/* @test
-   @bug 4150029
-   @summary BackSpace keyboard button does not lead to parent directory
-   @author Oleg Mokhovikov
-   @run applet/manual=done bug4150029.html
+/*
+   bug 4150029 8006087
+   summary BackSpace keyboard button does not lead to parent directory
+   author Oleg Mokhovikov
 */
 
 import javax.swing.*;
@@ -36,6 +35,14 @@
     private boolean res;
 
     public void init() {
+        if (sun.awt.OSInfo.getOSType() == sun.awt.OSInfo.OSType.MACOSX) {
+            try {
+                UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
+            } catch (Exception e) {
+                throw new RuntimeException(e);
+            }
+        }
+
         String tmpDir = System.getProperty("java.io.tmpdir");
 
         if (tmpDir.length() == 0) {//'java.io.tmpdir' isn't guaranteed to be defined
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JFileChooser/7199708/bug7199708.java	Thu Sep 26 17:18:12 2013 -0700
@@ -0,0 +1,158 @@
+/*
+ * Copyright (c) 2013, 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.
+ */
+
+import java.awt.Component;
+import java.awt.Container;
+import java.awt.Point;
+import java.awt.Robot;
+import java.awt.Toolkit;
+import java.awt.event.InputEvent;
+import java.awt.event.KeyEvent;
+import java.io.File;
+import java.io.IOException;
+import javax.swing.JFileChooser;
+import javax.swing.SwingUtilities;
+
+import java.nio.file.Files;
+import javax.swing.AbstractButton;
+import javax.swing.JTable;
+import javax.swing.UIManager;
+import sun.awt.SunToolkit;
+
+/**
+ * @test
+ * @bug 7199708
+ * @author Alexander Scherbatiy
+ * @summary FileChooser crashs when opening large folder
+ * @run main bug7199708
+ */
+public class bug7199708 {
+
+    private static int FILE_NUMBER = 30000;
+    private static volatile JFileChooser fileChooser;
+    private static volatile int locationX;
+    private static volatile int locationY;
+    private static volatile int width;
+
+    public static void main(String[] args) throws Exception {
+
+        SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+        Robot robot = new Robot();
+        robot.setAutoDelay(50);
+
+        final File folder = createLargeFolder();
+        UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
+
+        SwingUtilities.invokeLater(new Runnable() {
+            public void run() {
+                fileChooser = new JFileChooser(folder);
+                fileChooser.showSaveDialog(null);
+            }
+        });
+
+        toolkit.realSync();
+
+        SwingUtilities.invokeLater(new Runnable() {
+            public void run() {
+                final String detailsTooltip = UIManager.getString("FileChooser."
+                        + "detailsViewButtonToolTipText", fileChooser.getLocale());
+
+                doAction(fileChooser, new ComponentAction() {
+                    @Override
+                    public boolean accept(Component component) {
+                        return (component instanceof AbstractButton)
+                                && detailsTooltip.equals(
+                                ((AbstractButton) component).getToolTipText());
+                    }
+
+                    @Override
+                    public void perform(Component component) {
+                        ((AbstractButton) component).doClick();
+                    }
+                });
+
+                doAction(fileChooser, new ComponentAction() {
+                    @Override
+                    public boolean accept(Component component) {
+                        return (component instanceof JTable);
+                    }
+
+                    @Override
+                    public void perform(Component component) {
+                        Point tableLocation = component.getLocationOnScreen();
+                        locationX = (int) tableLocation.getX();
+                        locationY = (int) tableLocation.getY();
+                        width = (int) fileChooser.getBounds().getWidth();
+                    }
+                });
+            }
+        });
+
+        toolkit.realSync();
+
+        int d = 25;
+        for (int i = 0; i < width / d; i++) {
+            robot.mouseMove(locationX + i * d, locationY + 5);
+            robot.mousePress(InputEvent.BUTTON1_MASK);
+            robot.mouseRelease(InputEvent.BUTTON1_MASK);
+            toolkit.realSync();
+        }
+
+        robot.keyPress(KeyEvent.VK_ESCAPE);
+        robot.keyRelease(KeyEvent.VK_ESCAPE);
+    }
+
+    static void doAction(Component component, ComponentAction action) {
+        if (action.accept(component)) {
+            action.perform(component);
+        } else if (component instanceof Container) {
+            for (Component comp : ((Container) component).getComponents()) {
+                doAction(comp, action);
+            }
+        }
+    }
+
+    private static File createLargeFolder() {
+        try {
+
+            File largeFolder = Files.createTempDirectory("large_folder").toFile();
+            largeFolder.deleteOnExit();
+
+            for (int i = 0; i < FILE_NUMBER; i++) {
+                File file = new File(largeFolder, "File_" + i + ".txt");
+                file.createNewFile();
+                file.deleteOnExit();
+            }
+            return largeFolder;
+        } catch (IOException ex) {
+            throw new RuntimeException(ex);
+        }
+    }
+
+    interface ComponentAction {
+
+        boolean accept(Component component);
+
+        void perform(Component component);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JFileChooser/8002077/bug8002077.java	Thu Sep 26 17:18:12 2013 -0700
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2013, 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.
+ */
+
+import java.awt.Robot;
+import java.awt.Toolkit;
+import java.awt.event.KeyEvent;
+import javax.swing.JFileChooser;
+import javax.swing.SwingUtilities;
+import javax.swing.UIManager;
+import javax.swing.UIManager.LookAndFeelInfo;
+import sun.awt.SunToolkit;
+
+/**
+ * @test
+ * @bug 8002077
+ * @author Alexander Scherbatiy
+ * @summary Possible mnemonic issue on JFileChooser Save button on nimbus L&F
+ * @library ../../regtesthelpers/
+ * @build Util
+ * @run main bug8002077
+ */
+public class bug8002077 {
+
+    private static volatile int fileChooserState = JFileChooser.ERROR_OPTION;
+
+    public static void main(String[] args) throws Exception {
+        for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
+            if ("Nimbus".equals(info.getName())) {
+                UIManager.setLookAndFeel(info.getClassName());
+                runTest();
+                break;
+            }
+        }
+    }
+
+    private static void runTest() throws Exception {
+        SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+        Robot robot = new Robot();
+        robot.setAutoDelay(50);
+
+        SwingUtilities.invokeLater(new Runnable() {
+            public void run() {
+                fileChooserState = new JFileChooser().showSaveDialog(null);
+            }
+        });
+        toolkit.realSync();
+
+        Util.hitMnemonics(robot, KeyEvent.VK_N);
+        toolkit.realSync();
+
+        robot.keyPress(KeyEvent.VK_A);
+        robot.keyRelease(KeyEvent.VK_A);
+        toolkit.realSync();
+
+        Util.hitMnemonics(robot, KeyEvent.VK_S);
+        toolkit.realSync();
+
+        if (fileChooserState != JFileChooser.APPROVE_OPTION) {
+            throw new RuntimeException("Save button is not pressed!");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JFileChooser/8021253/bug8021253.java	Thu Sep 26 17:18:12 2013 -0700
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2013, 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.
+ */
+
+import java.io.File;
+import java.io.IOException;
+import java.awt.BorderLayout;
+import java.awt.Robot;
+import java.awt.Toolkit;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyEvent;
+import javax.swing.JFileChooser;
+import javax.swing.JFrame;
+import javax.swing.SwingUtilities;
+import sun.awt.SunToolkit;
+
+/**
+ * @test
+ * @bug 8021253
+ * @author Alexander Scherbatiy
+ * @summary JFileChooser does not react on pressing enter since java 7
+ * @run main bug8021253
+ */
+
+public class bug8021253 {
+
+    private static volatile boolean defaultKeyPressed;
+    private static JFileChooser fileChooser;
+    private static File file;
+
+    public static void main(String[] args) throws Exception {
+
+        SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+        Robot robot = new Robot();
+        robot.setAutoDelay(50);
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                createAndShowGUI();
+            }
+        });
+
+        toolkit.realSync();
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                fileChooser.setSelectedFile(file);
+            }
+        });
+
+        toolkit.realSync();
+
+        robot.keyPress(KeyEvent.VK_ENTER);
+        robot.keyRelease(KeyEvent.VK_ENTER);
+        toolkit.realSync();
+
+        if (!defaultKeyPressed) {
+            throw new RuntimeException("Default button is not pressed");
+        }
+    }
+
+    private static void createAndShowGUI() {
+
+        file = getTempFile();
+
+        final JFrame frame = new JFrame("Test");
+        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+        frame.setSize(200, 300);
+
+        fileChooser = new JFileChooser(file.getParentFile());
+        fileChooser.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                defaultKeyPressed = true;
+                frame.dispose();
+            }
+        });
+
+        frame.getContentPane().add(BorderLayout.CENTER, fileChooser);
+        frame.setSize(fileChooser.getPreferredSize());
+        frame.setVisible(true);
+    }
+
+    private static File getTempFile() {
+        try {
+            File temp = File.createTempFile("test", ".txt");
+            temp.deleteOnExit();
+            return temp;
+        } catch (IOException ex) {
+            throw new RuntimeException(ex);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JInternalFrame/4193219/IconCoord.java	Thu Sep 26 17:18:12 2013 -0700
@@ -0,0 +1,161 @@
+/*
+ * Copyright (c) 2013, 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 4193219
+  @summary
+  @author Your Name: Hania Gajewska area=swing
+  @run main/manual IconCoord
+*/
+
+import java.awt.*;
+import java.awt.event.*;
+import javax.swing.*;
+
+public class IconCoord {
+    static Test test = new Test();
+
+    public static void main(String[] args) throws Exception {
+        UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                new IconCoord().createAndShowGUI();
+            }
+        });
+        test.waitTestResult();
+    }
+
+    private void createAndShowGUI() {
+        StringBuilder instrText = new StringBuilder();
+        instrText.append("First, iconify internal frame \"Frame 1\" by clicking on its iconify button.\n");
+        instrText.append("Now, maximize the top-level window \"IconCoord\".\n");
+        instrText.append("The \"Frame 1\" icon should stay in the lower left corner of the desktop; ");
+        instrText.append("if it doesn't, press \"Fail\".\n");
+        instrText.append("Now move the icon to the middle of the desktop by dragging it by its ");
+        instrText.append("bumpy left side. Then iconify \"Frame 2\" by clicking on its iconify button.\n");
+        instrText.append("If the icon for frame two gets placed in the lower left corner of the ");
+        instrText.append("desktop (where the icon for \"Frame 1\" used to be before you moved it), ");
+        instrText.append("press \"Pass\". Otherwise, press \"Fail\".\n");
+
+        JDesktopPane dt = new JDesktopPane();
+
+        JButton tf;
+        JInternalFrame if1 = new JInternalFrame("Frame 1", false, false, false, true);
+        JComponent c = (JComponent) if1.getContentPane();
+        c.setLayout(new BorderLayout());
+
+        tf = new JButton ("ignore");
+        c.add (tf, BorderLayout.NORTH);
+
+        tf = new JButton ("ignore");
+        c.add (tf, BorderLayout.CENTER);
+
+        JInternalFrame if2 = new JInternalFrame("Frame 2", false, false, false, true);
+        c = (JComponent) if2.getContentPane();
+        c.setLayout(new BorderLayout());
+
+        tf = new JButton ("ignore");
+        c.add (tf, BorderLayout.NORTH);
+
+        tf = new JButton ("ignore");
+        c.add (tf, BorderLayout.CENTER);
+
+        if1.pack();
+        if1.setBounds(300, 0, 300, 80);
+        if2.pack();
+        if2.setBounds(0, 0, 300, 80);
+        dt.add(if1);
+        dt.add(if2);
+
+        if1.setVisible(true);
+        if2.setVisible(true);
+
+        int frameHeight = 500;
+
+        JScrollPane dtScrollPane = new JScrollPane(dt);
+        JFrame frame = test.createTestFrame("IconCoord", dtScrollPane, instrText.toString(), 250);
+        dt.setPreferredSize(new Dimension(650, frameHeight - 250));
+        frame.setSize (600,500);
+        frame.setVisible(true);
+    }
+
+    static class Test {
+        private boolean pass;
+        JFrame createTestFrame(String name, Component topComponent, String instructions, int instrHeight) {
+            final String PASS = "Pass";
+            final String FAIL = "Fail";
+            JFrame frame = new JFrame(name);
+            frame.setLayout(new BorderLayout());
+
+            JPanel testButtonsPanel = new JPanel();
+            testButtonsPanel.setMaximumSize(new Dimension(Integer.MAX_VALUE, 20));
+
+            ActionListener btnAL = new ActionListener() {
+                public void actionPerformed(ActionEvent event) {
+                    switch (event.getActionCommand()) {
+                        case PASS:
+                            pass();
+                            break;
+                        default:
+                            throw new RuntimeException("Test failed.");
+                    }
+                }
+            };
+            JButton passBtn = new JButton(PASS);
+            passBtn.addActionListener(btnAL);
+            passBtn.setActionCommand(PASS);
+
+            JButton failBtn = new JButton(FAIL);
+            failBtn.addActionListener(btnAL);
+            failBtn.setActionCommand(FAIL);
+
+            testButtonsPanel.add(BorderLayout.WEST, passBtn);
+            testButtonsPanel.add(BorderLayout.EAST, failBtn);
+
+            JTextArea instrText = new JTextArea();
+            instrText.setLineWrap(true);
+            instrText.setEditable(false);
+            JScrollPane instrScrollPane = new JScrollPane(instrText);
+            instrScrollPane.setMaximumSize(new Dimension(Integer.MAX_VALUE, instrHeight));
+            instrText.append(instructions);
+
+            JPanel servicePanel = new JPanel();
+            servicePanel.setLayout(new BorderLayout());
+            servicePanel.add(BorderLayout.CENTER, instrScrollPane);
+            servicePanel.add(BorderLayout.SOUTH, testButtonsPanel);
+
+            frame.add(BorderLayout.SOUTH, servicePanel);
+            frame.add(BorderLayout.CENTER, topComponent);
+            return frame;
+        }
+        synchronized void pass() {
+            pass = true;
+            notifyAll();
+        }
+        synchronized void waitTestResult() throws InterruptedException {
+            while (!pass) {
+                wait();
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JInternalFrame/4251301/bug4251301.java	Thu Sep 26 17:18:12 2013 -0700
@@ -0,0 +1,139 @@
+/*
+ * Copyright (c) 2013, 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 4251301
+   @summary Keybinding for show/hide the system menu.
+   @author Andrey Pikalev
+   @run main/manual bug4251301
+*/
+
+import javax.swing.*;
+import java.awt.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.beans.*;
+import sun.awt.OSInfo;
+import sun.awt.SunToolkit;
+
+
+public class bug4251301 {
+    private static final SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+    static Test test = new Test();
+    public static void main(String[] args) throws Exception {
+        if (OSInfo.getOSType() == OSInfo.OSType.MACOSX) {
+            System.out.println("This test is not applicable for MacOS. Passed.");
+            return;
+        }
+        UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                createAndShowGUI();
+            }
+        });
+        toolkit.realSync();
+        test.waitTestResult();
+    }
+
+    public static void createAndShowGUI() {
+        final StringBuilder instructions = new StringBuilder();
+        instructions.append("Click with your mouse the content area of the internal frame with the title \"IFrame\" ");
+        instructions.append("and press Ctrl+Space. \n");
+        instructions.append("If the system menu shows up, press Esc. Then system menu should hide. \n");
+        instructions.append("If you success then press \"Pass\", else press \"Fail\".\n");
+
+        JDesktopPane dp = new JDesktopPane();
+        JInternalFrame jif = new JInternalFrame("IFrame",true,true,true,true);
+        dp.add(jif);
+        jif.setBounds(20, 20, 220, 100);
+        jif.setVisible(true);
+        try {
+            jif.setSelected(true);
+        } catch(PropertyVetoException pve) {
+            pve.printStackTrace();
+            throw new Error("Occures PropertyVetoException while set selection...");
+        }
+        JScrollPane dtScrollPane = new JScrollPane(dp);
+        JFrame testFrame = test.createTestFrame("Instructions", dtScrollPane, instructions.toString(), 500);
+        testFrame.setSize(500, 400);
+        testFrame.setVisible(true);
+    }
+    static class Test {
+        private boolean pass;
+        JFrame createTestFrame(String name, Component topComponent, String instructions, int instrHeight) {
+            final String PASS = "Pass";
+            final String FAIL = "Fail";
+            JFrame frame = new JFrame(name);
+            frame.setLayout(new BorderLayout());
+
+            JPanel testButtonsPanel = new JPanel();
+            testButtonsPanel.setMaximumSize(new Dimension(Integer.MAX_VALUE, 20));
+
+            ActionListener btnAL = new ActionListener() {
+                public void actionPerformed(ActionEvent event) {
+                    switch (event.getActionCommand()) {
+                        case PASS:
+                            pass();
+                            break;
+                        default:
+                            throw new RuntimeException("Test failed.");
+                    }
+                }
+            };
+            JButton passBtn = new JButton(PASS);
+            passBtn.addActionListener(btnAL);
+            passBtn.setActionCommand(PASS);
+
+            JButton failBtn = new JButton(FAIL);
+            failBtn.addActionListener(btnAL);
+            failBtn.setActionCommand(FAIL);
+
+            testButtonsPanel.add(BorderLayout.WEST, passBtn);
+            testButtonsPanel.add(BorderLayout.EAST, failBtn);
+
+            JTextArea instrText = new JTextArea();
+            instrText.setLineWrap(true);
+            instrText.setEditable(false);
+            JScrollPane instrScrollPane = new JScrollPane(instrText);
+            instrScrollPane.setMaximumSize(new Dimension(Integer.MAX_VALUE, instrHeight));
+            instrText.append(instructions);
+
+            JPanel servicePanel = new JPanel();
+            servicePanel.setLayout(new BorderLayout());
+            servicePanel.add(BorderLayout.CENTER, instrScrollPane);
+            servicePanel.add(BorderLayout.SOUTH, testButtonsPanel);
+
+            frame.add(BorderLayout.SOUTH, servicePanel);
+            frame.add(BorderLayout.CENTER, topComponent);
+            return frame;
+        }
+        synchronized void pass() {
+            pass = true;
+            notifyAll();
+        }
+        synchronized void waitTestResult() throws InterruptedException {
+            while (!pass) {
+                wait();
+            }
+        }
+    }
+}
--- a/jdk/test/javax/swing/JInternalFrame/InternalFrameIsNotCollectedTest.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/test/javax/swing/JInternalFrame/InternalFrameIsNotCollectedTest.java	Thu Sep 26 17:18:12 2013 -0700
@@ -27,19 +27,19 @@
     @author mcherkas
     @run main InternalFrameIsNotCollectedTest
  */
-
 import sun.awt.SunToolkit;
 
 import javax.swing.*;
 import java.awt.*;
-import java.awt.event.KeyEvent;
 import java.beans.PropertyVetoException;
 import java.util.Date;
 
 public class InternalFrameIsNotCollectedTest {
 
-    public static final int waitTime = 10000;
+    public static final int maxWaitTime = 100000;
+    public static final int waitTime = 5000;
     private static Robot robot;
+    private static CustomInternalFrame iFrame;
 
     public static void sync() {
 
@@ -62,12 +62,13 @@
         });
         sync();
         invokeGC();
+        System.runFinalization();
         Thread.sleep(1000); // it's better to wait 1 sec now then 10 sec later
         Date startWaiting = new Date();
         synchronized (CustomInternalFrame.waiter) {
             // Sync with finalization thread.
             Date now = new Date();
-            while (now.getTime() - startWaiting.getTime() < waitTime && !CustomInternalFrame.finalized) {
+            while (now.getTime() - startWaiting.getTime() < maxWaitTime && !CustomInternalFrame.finalized) {
                 CustomInternalFrame.waiter.wait(waitTime);
                 now = new Date();
             }
@@ -83,10 +84,8 @@
     }
 
     private static void closeInternalFrame() throws PropertyVetoException {
-        robot.keyPress(KeyEvent.VK_CONTROL);
-        robot.keyPress(KeyEvent.VK_F4);
-        robot.keyRelease(KeyEvent.VK_F4);
-        robot.keyRelease(KeyEvent.VK_CONTROL);
+        iFrame.setClosed(true);
+        iFrame = null;
     }
 
     private static void initUI() {
@@ -96,7 +95,7 @@
         desktopPane.setDesktopManager(new DefaultDesktopManager());
         frame.getContentPane().add(desktopPane, BorderLayout.CENTER);
 
-        CustomInternalFrame iFrame = new CustomInternalFrame("Dummy Frame");
+        iFrame = new CustomInternalFrame("Dummy Frame");
 
         iFrame.setSize(200, 200);
         iFrame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JMenuBar/4750590/bug4750590.java	Thu Sep 26 17:18:12 2013 -0700
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2013, 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
+ @library ../../regtesthelpers
+ @build Util
+ @bug 4750590 8015597
+ @summary SwingSet: Cannot change Themes using menu accelerators
+ @author Alexander Zuev
+ @run main bug4750590
+ */
+
+import javax.swing.*;
+import java.awt.event.*;
+import java.awt.*;
+
+public class bug4750590 {
+
+    public static PassedListener pass = new PassedListener();
+    public static volatile boolean passed = false;
+
+    public static void main(String args[]) throws Throwable {
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                createAndShowGUI();
+            }
+        });
+
+        sun.awt.SunToolkit toolkit = (sun.awt.SunToolkit) Toolkit.getDefaultToolkit();
+        toolkit.realSync();
+
+        Robot robo = new Robot();
+        robo.setAutoDelay(500);
+        Util.hitMnemonics(robo, KeyEvent.VK_F);
+        robo.keyPress(KeyEvent.VK_M);
+        robo.keyRelease(KeyEvent.VK_M);
+
+        toolkit.realSync();
+
+        if (passed) {
+            System.out.println("Test passed!");
+        } else {
+            throw new RuntimeException("Test FAILED!");
+        }
+    }
+
+    private static void createAndShowGUI() {
+        JFrame mainFrame = new JFrame("Bug 4750590");
+        JMenuBar mbar = new JMenuBar();
+        JMenu menu = new JMenu("File");
+        menu.setMnemonic('F');
+        JMenu submenu = new JMenu("Submenu");
+        submenu.add(new JMenuItem("SubMenu Item 1")).setMnemonic('S');
+        submenu.add(new JMenuItem("SubMenu Item 2"));
+        menu.add(submenu);
+
+        menu.add(new JMenuItem("Menu Item 1"));
+        JMenuItem menuItem = menu.add(new JMenuItem("Menu Item 2"));
+        menuItem.setMnemonic('M');
+        menuItem.addActionListener(pass);
+        mbar.add(menu);
+        mainFrame.setJMenuBar(mbar);
+
+        mainFrame.setSize(200, 200);
+        mainFrame.setLocation(200, 200);
+        mainFrame.setVisible(true);
+        mainFrame.toFront();
+    }
+
+    public static class PassedListener implements ActionListener {
+        public void actionPerformed(ActionEvent ev) {
+            passed = true;
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JMenuItem/4171437/bug4171437.java	Thu Sep 26 17:18:12 2013 -0700
@@ -0,0 +1,108 @@
+/*
+ * Copyright (c) 2013, 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 4171437
+   @library ../../regtesthelpers
+   @build Util
+   @author Georges Saab
+   @run main bug4171437
+*/
+import java.awt.*;
+import java.awt.event.*;
+import java.util.ArrayList;
+import javax.swing.*;
+import javax.swing.event.*;
+import sun.awt.SunToolkit;
+
+public class bug4171437 {
+    static volatile boolean closeActivated = false;
+    static volatile boolean customActivated = false;
+
+    public static void main(String[] args) throws Exception {
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                createAndShowGUI();
+            }
+        });
+
+        SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+        toolkit.realSync();
+
+        Robot robot = new Robot();
+        robot.setAutoDelay(50);
+
+        Util.hitMnemonics(robot, KeyEvent.VK_F);
+        Util.hitKeys(robot, KeyEvent.VK_C);
+
+        toolkit.realSync();
+        Thread.sleep(1000);
+
+        if (!closeActivated || customActivated) {
+            throw new RuntimeException("Didn't pass the muster");
+        }
+    }
+    public static void createAndShowGUI() {
+        JMenuBar menubar = new JMenuBar();
+
+        JMenu fileMenu = new JMenu("File");
+        fileMenu.setMnemonic('f');
+
+        JMenuItem fmi1 = new JMenuItem();
+        fmi1 = new JMenuItem("Open");
+        JMenuItem fmi2 = new JMenuItem();
+        fmi2 = new JMenuItem("Close");
+        fmi2.setMnemonic('c');
+        fmi2.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+                closeActivated = true;
+            }
+        });
+
+        fileMenu.add( fmi1);
+        fileMenu.add( fmi2);
+
+        menubar.add( fileMenu);
+
+        JMenu custom = new JMenu("Custom");
+        custom.setMnemonic('c');
+        JMenuItem cmi = new JMenuItem();
+        cmi = new JMenuItem("Properties");
+        cmi.setMnemonic('p');
+        custom.add( cmi);
+        custom.addMenuListener(new MenuListener() {
+            public void menuSelected(MenuEvent e) {
+                customActivated = true;
+            }
+            public void menuDeselected(MenuEvent e) {}
+            public void menuCanceled(MenuEvent e) {}
+        });
+        menubar.add( custom);
+
+        JFrame frame = new JFrame();
+        frame.setJMenuBar( menubar);
+        frame.setSize(300, 300);
+        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+        frame.pack();
+        frame.setVisible(true);
+    }
+}
--- a/jdk/test/javax/swing/JMenuItem/ActionListenerCalledTwice/ActionListenerCalledTwiceTest.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/test/javax/swing/JMenuItem/ActionListenerCalledTwice/ActionListenerCalledTwiceTest.java	Thu Sep 26 17:18:12 2013 -0700
@@ -35,12 +35,13 @@
 import javax.swing.*;
 
 public class ActionListenerCalledTwiceTest {
-    static String menuItems[] = { "Item1", "Item2", "Item3", "Item4" };
+    static String menuItems[] = { "Item1", "Item2", "Item3", "Item4", "Item5" };
     static KeyStroke keyStrokes[] = {
         KeyStroke.getKeyStroke(KeyEvent.VK_E, InputEvent.META_MASK),
         KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0),
         KeyStroke.getKeyStroke(KeyEvent.VK_UP, InputEvent.SHIFT_MASK),
-        KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, InputEvent.META_MASK)
+        KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, InputEvent.META_MASK),
+        KeyStroke.getKeyStroke(KeyEvent.VK_E, InputEvent.CTRL_MASK)
     };
 
     static volatile int listenerCallCounter = 0;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JPopupMenu/4458079/bug4458079.java	Thu Sep 26 17:18:12 2013 -0700
@@ -0,0 +1,110 @@
+/*
+ * Copyright (c) 2013, 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 4458079
+   @library ../../regtesthelpers
+   @build Util
+   @summary Tests calling removeAll() from PopupMenuListener
+   @author Peter Zhelezniakov
+   @run main bug4458079
+*/
+import java.awt.Robot;
+import java.awt.Toolkit;
+import java.awt.event.*;
+import javax.swing.*;
+import javax.swing.event.*;
+import java.awt.event.KeyEvent;
+import java.util.ArrayList;
+import sun.awt.SunToolkit;
+
+public class bug4458079 extends JFrame implements PopupMenuListener {
+    public JMenu menu;
+
+    static volatile boolean itemASelected = false;
+    public static void main(String[] args) throws Exception {
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                new bug4458079().createAndShowGUI();
+            }
+        });
+        SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+        toolkit.realSync();
+
+        Robot robot = new Robot();
+        robot.setAutoDelay(50);
+
+        Util.hitMnemonics(robot, KeyEvent.VK_M);
+
+        toolkit.realSync();
+        Thread.sleep(1000);
+
+        Util.hitKeys(robot, KeyEvent.VK_DOWN);
+        Util.hitKeys(robot, KeyEvent.VK_ENTER);
+
+        toolkit.realSync();
+        Thread.sleep(1000);
+
+        if (!itemASelected) {
+            throw new RuntimeException("Test failed: arrow key traversal in JMenu broken!");
+        }
+    }
+    public void createAndShowGUI() {
+        JMenuBar bar = new JMenuBar();
+        menu = new JMenu("Menu");
+        menu.add(new JMenuItem("1"));
+        menu.add(new JMenuItem("2"));
+        menu.setMnemonic(KeyEvent.VK_M);
+        menu.getPopupMenu().addPopupMenuListener(this);
+        bar.add(menu);
+
+        setJMenuBar(bar);
+        getContentPane().add(new JButton(""));
+        setSize(300, 300);
+        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+        pack();
+        setVisible(true);
+    }
+
+    public void rebuildMenu() {
+        menu.removeAll();
+        final String itemCommand = "A";
+        JMenuItem item = new JMenuItem(itemCommand);
+        item.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+                JMenuItem item = ((JMenuItem)e.getSource());
+                if (e.getActionCommand() == itemCommand) {
+                    itemASelected = true;
+                }
+            }
+        });
+        menu.add(item);
+        menu.add(new JMenuItem("B"));
+    }
+
+    public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
+        rebuildMenu();
+    }
+
+    public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {}
+    public void popupMenuCanceled(PopupMenuEvent e) {}
+}
--- a/jdk/test/javax/swing/JScrollBar/7163696/Test7163696.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/test/javax/swing/JScrollBar/7163696/Test7163696.java	Thu Sep 26 17:18:12 2013 -0700
@@ -59,7 +59,8 @@
             UIManager.setLookAndFeel(info.getClassName());
 
             SwingUtilities.invokeAndWait(this);
-            toolkit.realSync(500); // after creation
+            toolkit.realSync(); // after creation
+            Thread.sleep(1000);
 
             Point point = this.bar.getLocation();
             SwingUtilities.convertPointToScreen(point, this.bar);
@@ -69,7 +70,8 @@
             robot.mousePress(InputEvent.BUTTON1_MASK);
             robot.mouseRelease(InputEvent.BUTTON1_MASK);
 
-            toolkit.realSync(500); // before validation
+            toolkit.realSync(); // before validation
+            Thread.sleep(1000);
             SwingUtilities.invokeAndWait(this);
 
             if (this.bar != null) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JSplitPane/4816114/bug4816114.java	Thu Sep 26 17:18:12 2013 -0700
@@ -0,0 +1,152 @@
+/*
+ * Copyright (c) 2013, 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 4816114
+   @summary REGRESSION: Regression in divider location behavior when JSplitPane is resized
+   @author Andrey Pikalev
+   @run main bug4816114
+*/
+
+import javax.swing.*;
+import java.awt.*;
+import java.lang.reflect.*;
+import sun.awt.SunToolkit;
+
+
+public class bug4816114 {
+
+    JFrame fr;
+    JSplitPane splitPane;
+
+    boolean[] resized = new boolean[] { false, false, false,
+                                        false, false, false };
+    static int step = 0;
+    boolean h_passed = false;
+    boolean v_passed = false;
+
+    static bug4816114 test = new bug4816114();
+
+    public static void main(String[] args) throws InterruptedException, InvocationTargetException {
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                test.createAndShowGUI();
+            }
+        });
+        SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+        toolkit.realSync();
+        Thread.sleep(1000);
+        Thread.sleep(2000);
+
+        step++;
+        test.doTest(150, 300);
+
+        step++;
+        test.doTest(650, 300);
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                test.splitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
+            }
+        });
+
+        step++;
+        test.doTest(300, 650);
+
+        step++;
+        test.doTest(300, 150);
+
+        step++;
+        test.doTest(300, 650);
+
+        if ( !test.isPassed() ) {
+            throw new Error("The divider location is wrong.");
+        }
+    }
+    public void createAndShowGUI() {
+        fr = new JFrame("Test");
+
+        splitPane = new TestSplitPane();
+        splitPane.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
+        splitPane.setResizeWeight(0);
+        splitPane.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
+
+        JButton leftButton = new JButton("LEFT");
+        leftButton.setPreferredSize(new Dimension(300, 300));
+        leftButton.setMinimumSize(new Dimension(150, 150));
+        splitPane.setLeftComponent(leftButton);
+
+        JButton rightButton = new JButton("RIGHT");
+        rightButton.setPreferredSize(new Dimension(300, 300));
+        rightButton.setMinimumSize(new Dimension(150, 150));
+        splitPane.setRightComponent(rightButton);
+
+        fr.getContentPane().add(splitPane, BorderLayout.CENTER);
+
+        fr.pack();
+        fr.setVisible(true);
+    }
+
+    void doTest(final int width, final int height)  throws InterruptedException, InvocationTargetException {
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                splitPane.setPreferredSize(new Dimension(width, height));
+                fr.pack();
+            }
+        });
+
+        synchronized (bug4816114.this) {
+            while (!resized[step]) {
+                bug4816114.this.wait();
+            }
+        }
+    }
+
+   synchronized void setPassed(int orientation, boolean passed) {
+       if (orientation == JSplitPane.HORIZONTAL_SPLIT) {
+           this.h_passed = passed;
+       }
+       else {
+           this.v_passed = passed;
+       }
+   }
+
+    synchronized boolean isPassed() {
+        return h_passed && v_passed;
+    }
+
+
+    class TestSplitPane extends JSplitPane {
+        public void setDividerLocation(int location) {
+            super.setDividerLocation(location);
+
+            if ( splitPane.getDividerLocation() == 151 ) {
+                setPassed(getOrientation(), true);
+            }
+
+            synchronized (bug4816114.this) {
+                resized[step] = true;
+                bug4816114.this.notifyAll();
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JTabbedPane/7024235/Test7024235.java	Thu Sep 26 17:18:12 2013 -0700
@@ -0,0 +1,114 @@
+/*
+ * Copyright (c) 2013, 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.
+ */
+
+import java.awt.BorderLayout;
+import sun.awt.SunToolkit;
+
+import java.awt.Container;
+import java.awt.Rectangle;
+import java.awt.Toolkit;
+
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JTabbedPane;
+
+import javax.swing.JFrame;
+import javax.swing.SwingUtilities;
+import javax.swing.UIManager;
+import javax.swing.UIManager.LookAndFeelInfo;
+
+/*
+ * @test
+ * @bug 7024235
+ * @summary Tests JFrame.pack() with the JTabbedPane
+ * @author Sergey Malenkov
+ */
+
+public class Test7024235 implements Runnable {
+
+    private static final boolean AUTO = null != System.getProperty("test.src", null);
+
+    public static void main(String[] args) throws Exception {
+        Test7024235 test = new Test7024235();
+        SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+        for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
+            UIManager.setLookAndFeel(info.getClassName());
+
+            test.test();
+            toolkit.realSync();
+            Thread.sleep(1000);
+            test.test();
+        }
+    }
+
+    private volatile JTabbedPane pane;
+    private volatile boolean passed;
+
+    public void run() {
+        if (this.pane == null) {
+            this.pane = new JTabbedPane();
+            this.pane.addTab("1", new Container());
+            this.pane.addTab("2", new JButton());
+            this.pane.addTab("3", new JCheckBox());
+
+            JFrame frame = new JFrame();
+            frame.add(BorderLayout.WEST, this.pane);
+            frame.pack();
+            frame.setVisible(true);
+
+            test("first");
+        }
+        else {
+            test("second");
+            if (this.passed || AUTO) { // do not close a frame for manual review
+                SwingUtilities.getWindowAncestor(this.pane).dispose();
+            }
+            this.pane = null;
+        }
+    }
+
+    private void test() throws Exception {
+        SwingUtilities.invokeAndWait(this);
+        if (!this.passed && AUTO) { // error reporting only for automatic testing
+            throw new Error("TEST FAILED");
+        }
+    }
+
+    private void test(String step) {
+        this.passed = true;
+        for (int index = 0; index < this.pane.getTabCount(); index++) {
+            Rectangle bounds = this.pane.getBoundsAt(index);
+            int centerX = bounds.x + bounds.width / 2;
+            int centerY = bounds.y + bounds.height / 2;
+            int actual = this.pane.indexAtLocation(centerX, centerY);
+            if (index != actual) {
+                System.out.println("name = " + UIManager.getLookAndFeel().getName());
+                System.out.println("step = " + step);
+                System.out.println("index = " + index);
+                System.out.println("bounds = " + bounds);
+                System.out.println("indexAtLocation(" + centerX + "," + centerX + ") returns " + actual);
+                this.passed = false;
+            }
+        }
+    }
+}
--- a/jdk/test/javax/swing/JTable/7068740/bug7068740.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/test/javax/swing/JTable/7068740/bug7068740.java	Thu Sep 26 17:18:12 2013 -0700
@@ -37,6 +37,7 @@
 import java.awt.*;
 import java.awt.event.KeyEvent;
 import java.lang.reflect.InvocationTargetException;
+import java.util.concurrent.atomic.AtomicInteger;
 
 public class bug7068740 extends JFrame {
 
@@ -66,6 +67,7 @@
         };
 
         table = new JTable(model);
+        table.setRowSelectionInterval(0, 0);
         LayerUI<JComponent> layerUI = new LayerUI<>();
         JLayer<JComponent> layer = new JLayer<>(table, layerUI);
         JScrollPane scrollPane = new JScrollPane(layer);
@@ -78,7 +80,7 @@
         try {
             if (robot == null) {
                 robot = new Robot();
-                robot.setAutoDelay(20);
+                robot.setAutoDelay(50);
             }
 
             if (toolkit == null) {
@@ -104,24 +106,37 @@
         }
     }
 
-    private static void doTest() {
+    private static int getSelectedRow() throws Exception {
+        final AtomicInteger row = new AtomicInteger(-1);
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                row.set(table.getSelectedRow());
+            }
+        });
+        return row.intValue();
+    }
+
+    private static void doTest() throws Exception {
         toolkit.realSync();
-        table.setRowSelectionInterval(0, 0);
 
         robot.keyPress(KeyEvent.VK_PAGE_DOWN);
+        robot.keyRelease(KeyEvent.VK_PAGE_DOWN);
         toolkit.realSync();
-        if (table.getSelectedRow() != 19) {
+
+        if (getSelectedRow() != 19) {
             throw new RuntimeException("Test failed");
         }
 
         robot.keyPress(KeyEvent.VK_PAGE_UP);
+        robot.keyRelease(KeyEvent.VK_PAGE_UP);
         toolkit.realSync();
-        if (table.getSelectedRow() != 0) {
+        if (getSelectedRow() != 0) {
             throw new RuntimeException("Test failed");
         }
     }
 
-    public static void main(String[] args) {
+    public static void main(String[] args) throws Exception {
         try {
             UIManager.setLookAndFeel(new MetalLookAndFeel());
             setUp();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JTree/4927934/bug4927934.java	Thu Sep 26 17:18:12 2013 -0700
@@ -0,0 +1,247 @@
+/*
+ * Copyright (c) 2013, 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 4927934
+   @summary JTree traversal is unlike Native windows tree traversal
+   @author Andrey Pikalev
+   @run main bug4927934
+*/
+
+import javax.swing.*;
+import javax.swing.event.*;
+import javax.swing.tree.*;
+import java.awt.*;
+import java.awt.event.*;
+import java.lang.reflect.InvocationTargetException;
+import sun.awt.*;
+
+public class bug4927934 implements TreeSelectionListener, TreeExpansionListener, FocusListener {
+
+    final static Object listener = new bug4927934();
+
+    static boolean focusGained = false;
+    public static boolean selectionChanged = false;
+    public static boolean treeExpanded = false;
+    public static boolean treeCollapsed = false;
+
+    static JFrame frame;
+    static JTree tree;
+    static Robot robot;
+
+    public static void main(String args[]) throws Exception {
+        UIManager.setLookAndFeel(new javax.swing.plaf.metal.MetalLookAndFeel());
+
+        robot = new Robot();
+        robot.setAutoDelay(50);
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                frame = new JFrame();
+
+                DefaultMutableTreeNode root = new DefaultMutableTreeNode("root");
+                createNodes(root);
+                tree = new JTree(root);
+                JScrollPane scrollPane = new JScrollPane(tree);
+                frame.getContentPane().add(scrollPane);
+
+                tree.addFocusListener((FocusListener)listener);
+                tree.addTreeSelectionListener((TreeSelectionListener)listener);
+                tree.addTreeExpansionListener((TreeExpansionListener)listener);
+
+                frame.setSize(300, 300);
+                frame.setVisible(true);
+            }
+        });
+
+        SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+        toolkit.realSync();
+        Thread.sleep(1000);
+
+        SwingUtilities.invokeLater(new Runnable() {
+            public void run() {
+                tree.requestFocus();
+            }
+        });
+
+        synchronized(listener) {
+            if (!focusGained) {
+                System.out.println("waiting focusGained...");
+                try {
+                    listener.wait(10000);
+                } catch (InterruptedException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+
+        // GO TO RIGHT
+        selectionChanged = false;
+        hitKey(KeyEvent.VK_RIGHT);
+        toolkit.realSync();
+        if (!checkSelectionChanged(tree, 0)) {
+            throw new RuntimeException("Root should be selected");
+        }
+
+        selectionChanged = false;
+        hitKey(KeyEvent.VK_RIGHT);
+        toolkit.realSync();
+        if (!checkSelectionChanged(tree, 1)) {
+            throw new RuntimeException("Node should be selected");
+        }
+
+        treeExpanded = false;
+        hitKey(KeyEvent.VK_RIGHT);
+        toolkit.realSync();
+        if (!isTreeExpanded()) {
+            throw new RuntimeException("Node should be expanded");
+        }
+
+        selectionChanged = false;
+        hitKey(KeyEvent.VK_RIGHT);
+        toolkit.realSync();
+        if (!checkSelectionChanged(tree, 2)) {
+            throw new RuntimeException("Leaf1 should be selected");
+        }
+
+        selectionChanged = false;
+        hitKey(KeyEvent.VK_RIGHT);
+        toolkit.realSync();
+        if (!checkSelectionChanged(tree, 2)) {
+            throw new RuntimeException("Leaf1 should be selected");
+        }
+
+        // GO TO LEFT
+        selectionChanged = false;
+        hitKey(KeyEvent.VK_LEFT);
+        toolkit.realSync();
+        if (!checkSelectionChanged(tree, 1)) {
+            throw new RuntimeException("Node should be selected");
+        }
+
+        treeCollapsed = false;
+        hitKey(KeyEvent.VK_LEFT);
+        if (!isTreeCollapsed()) {
+            throw new RuntimeException("Node should be collapsed");
+        }
+
+        selectionChanged = false;
+        hitKey(KeyEvent.VK_LEFT);
+        toolkit.realSync();
+        if (!checkSelectionChanged(tree, 0)) {
+            throw new RuntimeException("Root should be selected");
+        }
+
+        treeCollapsed = false;
+        hitKey(KeyEvent.VK_LEFT);
+        toolkit.realSync();
+        if (!isTreeCollapsed()) {
+            throw new RuntimeException("Root should be collapsed");
+        }
+    }
+
+
+    synchronized public void focusLost(FocusEvent e) {
+    }
+
+    synchronized public void focusGained(FocusEvent e) {
+        focusGained = true;
+        System.out.println("focusGained");
+        listener.notifyAll();
+    }
+
+    private static void createNodes(DefaultMutableTreeNode root) {
+        DefaultMutableTreeNode node = new DefaultMutableTreeNode("Node");
+        node.add(new DefaultMutableTreeNode("Leaf1"));
+        node.add(new DefaultMutableTreeNode("Leaf2"));
+        root.add(node);
+        root.add(new DefaultMutableTreeNode("Leaf3"));
+    }
+
+    synchronized public void valueChanged(TreeSelectionEvent e) {
+        selectionChanged = true;
+        System.out.println("selectionChanged");
+        notifyAll();
+    }
+
+    synchronized public void treeCollapsed(TreeExpansionEvent e) {
+        System.out.println("treeCollapsed");
+        treeCollapsed = true;
+        notifyAll();
+    }
+
+    synchronized public void treeExpanded(TreeExpansionEvent e) {
+        System.out.println("treeExpanded");
+        treeExpanded = true;
+        notifyAll();
+    }
+
+    private static void hitKey(int key) {
+        System.out.println("key " + key + " pressed");
+        robot.keyPress(key);
+        robot.keyRelease(key);
+    }
+
+    private static boolean checkSelectionChanged(JTree tree, int shouldBeSel) {
+        synchronized(listener) {
+            if (!selectionChanged) {
+                System.out.println("waiting for selectionChanged...");
+                try {
+                    listener.wait(5000);
+                } catch (InterruptedException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+        int selRow = tree.getLeadSelectionRow();
+        System.out.println("Selected row: " + selRow);
+        return selRow == shouldBeSel;
+    }
+
+    private static boolean isTreeExpanded() {
+        synchronized(listener) {
+            if (!treeExpanded) {
+                System.out.println("waiting for treeExpanded...");
+                try {
+                    listener.wait(5000);
+                } catch (InterruptedException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+        return treeExpanded;
+    }
+
+    private static boolean isTreeCollapsed() {
+        synchronized(listener) {
+            if (!treeCollapsed) {
+                System.out.println("waiting for treeCollapsed...");
+                try {
+                    listener.wait(5000);
+                } catch (InterruptedException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+        return treeCollapsed;
+    }
+}
--- a/jdk/test/javax/swing/JTree/8013571/Test8013571.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/test/javax/swing/JTree/8013571/Test8013571.java	Thu Sep 26 17:18:12 2013 -0700
@@ -27,8 +27,8 @@
 
 /*
  * @test
- * @bug 8016545
- * @summary Tests beans with public fields
+ * @bug 8013571
+ * @summary Tests null as a root of TreeModelEvent
  * @author Sergey Malenkov
  */
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/Popup/TaskbarPositionTest.java	Thu Sep 26 17:18:12 2013 -0700
@@ -0,0 +1,340 @@
+/*
+ * Copyright (c) 2013, 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.
+ */
+
+import java.awt.*;
+import java.awt.event.*;
+import javax.swing.*;
+import javax.swing.event.*;
+
+/**
+ * @test @bug 4245587 4474813 4425878 4767478 8015599
+ * @author Mark Davidson
+ * @summary Tests the location of the heavy weight popup portion of JComboBox,
+ * JMenu and JPopupMenu.
+ * @library ../regtesthelpers
+ * @build Util
+ * @run main TaskbarPositionTest
+ */
+public class TaskbarPositionTest extends JFrame implements ActionListener {
+
+    private boolean done;
+    private Throwable error;
+    private static TaskbarPositionTest test;
+    private static JPopupMenu popupMenu;
+    private static JPanel panel;
+    private static JComboBox<String> combo1;
+    private static JComboBox<String> combo2;
+    private static JMenuBar menubar;
+    private static JMenu menu1;
+    private static JMenu menu2;
+    private static Rectangle fullScreenBounds;
+    // The usable desktop space: screen size - screen insets.
+    private static Rectangle screenBounds;
+    private static String[] numData = {
+        "One", "Two", "Three", "Four", "Five", "Six", "Seven"
+    };
+    private static String[] dayData = {
+        "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"
+    };
+    private static char[] mnDayData = {
+        'M', 'T', 'W', 'R', 'F', 'S', 'U'
+    };
+
+    public TaskbarPositionTest() {
+        super("Use CTRL-down to show a JPopupMenu");
+        setContentPane(panel = createContentPane());
+        setJMenuBar(createMenuBar("1 - First Menu", true));
+        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+
+        // CTRL-down will show the popup.
+        panel.getInputMap().put(KeyStroke.getKeyStroke(
+                KeyEvent.VK_DOWN, InputEvent.CTRL_MASK), "OPEN_POPUP");
+        panel.getActionMap().put("OPEN_POPUP", new PopupHandler());
+
+        pack();
+
+        Toolkit toolkit = Toolkit.getDefaultToolkit();
+        fullScreenBounds = new Rectangle(new Point(), toolkit.getScreenSize());
+        screenBounds = new Rectangle(new Point(), toolkit.getScreenSize());
+
+        // Place the frame near the bottom. This is a pretty wild guess.
+        this.setLocation(0, (int) screenBounds.getHeight() - 2 * this.getHeight());
+
+        // Reduce the screen bounds by the insets.
+        GraphicsConfiguration gc = this.getGraphicsConfiguration();
+        if (gc != null) {
+            Insets screenInsets = toolkit.getScreenInsets(gc);
+            screenBounds = gc.getBounds();
+            screenBounds.width -= (screenInsets.left + screenInsets.right);
+            screenBounds.height -= (screenInsets.top + screenInsets.bottom);
+            screenBounds.x += screenInsets.left;
+            screenBounds.y += screenInsets.top;
+        }
+
+        setVisible(true);
+    }
+
+    public static class ComboPopupCheckListener implements PopupMenuListener {
+
+        public void popupMenuCanceled(PopupMenuEvent ev) {
+        }
+
+        public void popupMenuWillBecomeVisible(PopupMenuEvent ev) {
+        }
+
+        public void popupMenuWillBecomeInvisible(PopupMenuEvent ev) {
+            Point cpos = combo1.getLocation();
+            SwingUtilities.convertPointToScreen(cpos, panel);
+
+            JPopupMenu pm = (JPopupMenu) combo1.getUI().getAccessibleChild(combo1, 0);
+
+            if (pm != null) {
+                Point p = pm.getLocation();
+                SwingUtilities.convertPointToScreen(p, pm);
+                if (p.y < cpos.y) {
+                    throw new RuntimeException("ComboBox popup is wrongly aligned");
+                }  // check that popup was opened down
+            }
+        }
+    }
+
+    private class PopupHandler extends AbstractAction {
+
+        public void actionPerformed(ActionEvent e) {
+            if (!popupMenu.isVisible()) {
+                popupMenu.show((Component) e.getSource(), 40, 40);
+            }
+            isPopupOnScreen(popupMenu, fullScreenBounds);
+        }
+    }
+
+    class PopupListener extends MouseAdapter {
+
+        private JPopupMenu popup;
+
+        public PopupListener(JPopupMenu popup) {
+            this.popup = popup;
+        }
+
+        public void mousePressed(MouseEvent e) {
+            maybeShowPopup(e);
+        }
+
+        public void mouseReleased(MouseEvent e) {
+            maybeShowPopup(e);
+        }
+
+        private void maybeShowPopup(MouseEvent e) {
+            if (e.isPopupTrigger()) {
+                popup.show(e.getComponent(), e.getX(), e.getY());
+                isPopupOnScreen(popup, fullScreenBounds);
+            }
+        }
+    }
+
+    /**
+     * Tests if the popup is on the screen.
+     */
+    public static void isPopupOnScreen(JPopupMenu popup, Rectangle checkBounds) {
+        Dimension dim = popup.getSize();
+        Point pt = new Point();
+        SwingUtilities.convertPointToScreen(pt, popup);
+        Rectangle bounds = new Rectangle(pt, dim);
+
+        if (!SwingUtilities.isRectangleContainingRectangle(checkBounds, bounds)) {
+            throw new RuntimeException("We do not match! " + checkBounds + " / " + bounds);
+        }
+
+    }
+
+    private JPanel createContentPane() {
+        JPanel panel = new JPanel();
+
+        combo1 = new JComboBox<>(numData);
+        panel.add(combo1);
+        combo2 = new JComboBox<>(dayData);
+        combo2.setEditable(true);
+        panel.add(combo2);
+        panel.setSize(300, 200);
+
+        popupMenu = new JPopupMenu();
+        JMenuItem item;
+        for (int i = 0; i < dayData.length; i++) {
+            item = popupMenu.add(new JMenuItem(dayData[i], mnDayData[i]));
+            item.addActionListener(this);
+        }
+        panel.addMouseListener(new PopupListener(popupMenu));
+
+        JTextField field = new JTextField("CTRL+down for Popup");
+        // CTRL-down will show the popup.
+        field.getInputMap().put(KeyStroke.getKeyStroke(
+                KeyEvent.VK_DOWN, InputEvent.CTRL_MASK), "OPEN_POPUP");
+        field.getActionMap().put("OPEN_POPUP", new PopupHandler());
+
+        panel.add(field);
+
+        return panel;
+    }
+
+    /**
+     * @param str name of Menu
+     * @param bFlag set mnemonics on menu items
+     */
+    private JMenuBar createMenuBar(String str, boolean bFlag) {
+        menubar = new JMenuBar();
+
+        menu1 = new JMenu(str);
+        menu1.setMnemonic(str.charAt(0));
+        menu1.addActionListener(this);
+
+        menubar.add(menu1);
+        for (int i = 0; i < 8; i++) {
+            JMenuItem menuitem = new JMenuItem("1 JMenuItem" + i);
+            menuitem.addActionListener(this);
+            if (bFlag) {
+                menuitem.setMnemonic('0' + i);
+            }
+            menu1.add(menuitem);
+        }
+
+        // second menu
+        menu2 = new JMenu("2 - Second Menu");
+        menu2.addActionListener(this);
+        menu2.setMnemonic('2');
+
+        menubar.add(menu2);
+        for (int i = 0; i < 5; i++) {
+            JMenuItem menuitem = new JMenuItem("2 JMenuItem" + i);
+            menuitem.addActionListener(this);
+
+            if (bFlag) {
+                menuitem.setMnemonic('0' + i);
+            }
+            menu2.add(menuitem);
+        }
+        JMenu submenu = new JMenu("Sub Menu");
+        submenu.setMnemonic('S');
+        submenu.addActionListener(this);
+        for (int i = 0; i < 5; i++) {
+            JMenuItem menuitem = new JMenuItem("S JMenuItem" + i);
+            menuitem.addActionListener(this);
+            if (bFlag) {
+                menuitem.setMnemonic('0' + i);
+            }
+            submenu.add(menuitem);
+        }
+        menu2.add(new JSeparator());
+        menu2.add(submenu);
+
+        return menubar;
+    }
+
+    public void actionPerformed(ActionEvent evt) {
+        Object obj = evt.getSource();
+        if (obj instanceof JMenuItem) {
+            // put the focus on the noneditable combo.
+            combo1.requestFocus();
+        }
+    }
+
+    public static void main(String[] args) throws Throwable {
+
+        sun.awt.SunToolkit toolkit = (sun.awt.SunToolkit) Toolkit.getDefaultToolkit();
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                test = new TaskbarPositionTest();
+            }
+        });
+
+        // Use Robot to automate the test
+        Robot robot;
+        robot = new Robot();
+        robot.setAutoDelay(125);
+
+        // 1 - menu
+        Util.hitMnemonics(robot, KeyEvent.VK_1);
+
+        toolkit.realSync();
+        isPopupOnScreen(menu1.getPopupMenu(), screenBounds);
+
+        // 2 menu with sub menu
+        robot.keyPress(KeyEvent.VK_RIGHT);
+        robot.keyRelease(KeyEvent.VK_RIGHT);
+        Util.hitMnemonics(robot, KeyEvent.VK_S);
+
+        toolkit.realSync();
+        isPopupOnScreen(menu2.getPopupMenu(), screenBounds);
+
+        robot.keyPress(KeyEvent.VK_ENTER);
+        robot.keyRelease(KeyEvent.VK_ENTER);
+
+        // Focus should go to non editable combo box
+        toolkit.realSync();
+        Thread.sleep(500);
+
+        robot.keyPress(KeyEvent.VK_DOWN);
+
+        // How do we check combo boxes?
+
+        // Editable combo box
+        robot.keyPress(KeyEvent.VK_TAB);
+        robot.keyRelease(KeyEvent.VK_TAB);
+        robot.keyPress(KeyEvent.VK_DOWN);
+        robot.keyRelease(KeyEvent.VK_DOWN);
+
+        // combo1.getUI();
+
+        // Popup from Text field
+        robot.keyPress(KeyEvent.VK_TAB);
+        robot.keyRelease(KeyEvent.VK_TAB);
+        robot.keyPress(KeyEvent.VK_CONTROL);
+        robot.keyPress(KeyEvent.VK_DOWN);
+        robot.keyRelease(KeyEvent.VK_DOWN);
+        robot.keyRelease(KeyEvent.VK_CONTROL);
+
+        // Popup from a mouse click.
+        Point pt = new Point(2, 2);
+        SwingUtilities.convertPointToScreen(pt, panel);
+        robot.mouseMove((int) pt.getX(), (int) pt.getY());
+        robot.mousePress(InputEvent.BUTTON3_MASK);
+        robot.mouseRelease(InputEvent.BUTTON3_MASK);
+
+        toolkit.realSync();
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                test.setLocation(-30, 100);
+                combo1.addPopupMenuListener(new ComboPopupCheckListener());
+                combo1.requestFocus();
+            }
+        });
+
+        robot.keyPress(KeyEvent.VK_DOWN);
+        robot.keyRelease(KeyEvent.VK_DOWN);
+        robot.keyPress(KeyEvent.VK_ESCAPE);
+        robot.keyRelease(KeyEvent.VK_ESCAPE);
+
+        toolkit.realSync();
+        Thread.sleep(500);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/plaf/basic/BasicMenuUI/4983388/bug4983388.java	Thu Sep 26 17:18:12 2013 -0700
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2013, 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 4983388 8015600
+   @summary shortcuts on menus do not work on JDS
+   @author Oleg Mokhovikov
+   @library ../../../../regtesthelpers
+   @build Util
+   @run main bug4983388
+*/
+
+import sun.awt.*;
+import java.awt.*;
+import javax.swing.*;
+import javax.swing.event.MenuListener;
+import javax.swing.event.MenuEvent;
+import java.awt.event.KeyEvent;
+
+public class bug4983388 {
+    static volatile boolean bMenuSelected = false;
+
+    private static class TestMenuListener implements MenuListener {
+        public void menuCanceled(MenuEvent e) {}
+        public void menuDeselected(MenuEvent e) {}
+        public void menuSelected(MenuEvent e) {
+            System.out.println("menuSelected");
+            bMenuSelected = true;
+        }
+    }
+
+    private static void createAndShowGUI() {
+        JMenuBar menuBar = new JMenuBar();
+        JMenu menu = new JMenu("File");
+        menu.setMnemonic('F');
+        menuBar.add(menu);
+        JFrame frame = new JFrame();
+        frame.setJMenuBar(menuBar);
+        frame.pack();
+        frame.setVisible(true);
+        MenuListener listener = new TestMenuListener();
+        menu.addMenuListener(listener);
+    }
+
+    public static void main(String[] args) throws Exception {
+
+        SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+        try {
+            UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel");
+        } catch (UnsupportedLookAndFeelException | ClassNotFoundException ex) {
+            System.err.println("GTKLookAndFeel is not supported on this platform. Using defailt LaF for this platform.");
+        }
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                createAndShowGUI();
+            }
+        });
+
+        Robot robot = new Robot();
+        Util.hitMnemonics(robot, KeyEvent.VK_F);
+
+        toolkit.realSync();
+
+        if (!bMenuSelected) {
+            throw new RuntimeException("shortcuts on menus do not work");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/plaf/basic/BasicTabbedPaneUI/Test6943780.java	Thu Sep 26 17:18:12 2013 -0700
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2013, 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.
+ */
+
+import javax.swing.JButton;
+import javax.swing.JTabbedPane;
+import java.awt.Component;
+
+import static javax.swing.SwingUtilities.invokeAndWait;
+
+/*
+ * @test
+ * @bug 4873983 6943780
+ * @summary Tests JTabbedPane with SCROLL_TAB_LAYOUT
+ * @author Sergey Malenkov
+ */
+public class Test6943780 implements Runnable, Thread.UncaughtExceptionHandler {
+    public static void main(String[] args) throws Exception {
+        invokeAndWait(new Test6943780());
+    }
+
+    @Override
+    public void uncaughtException(Thread thread, Throwable throwable) {
+        throwable.printStackTrace();
+        System.exit(1);
+    }
+
+    @Override
+    public void run() {
+        JTabbedPane pane = new JTabbedPane(JTabbedPane.TOP, JTabbedPane.SCROLL_TAB_LAYOUT);
+        pane.addTab("first", new JButton("first"));
+        pane.addTab("second", new JButton("second"));
+        for (Component component : pane.getComponents()) {
+            component.setSize(100, 100);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/plaf/basic/BasicTreeUI/8023474/bug8023474.java	Thu Sep 26 17:18:12 2013 -0700
@@ -0,0 +1,174 @@
+/*
+ * Copyright (c) 2013, 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 8023474
+ * @summary Tests that the first mouse press starts editing in JTree
+ * @author Dmitry Markov
+ * @run main bug8023474
+ */
+
+import sun.awt.SunToolkit;
+
+import javax.swing.*;
+import javax.swing.event.CellEditorListener;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.DefaultTreeModel;
+import javax.swing.tree.TreeCellEditor;
+import javax.swing.tree.TreeCellRenderer;
+import java.awt.*;
+import java.awt.event.InputEvent;
+import java.util.EventObject;
+
+public class bug8023474 {
+    private static JTree tree;
+
+    public static void main(String[] args) throws Exception {
+        SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+        Robot robot = new Robot();
+        robot.setAutoDelay(50);
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                createAndShowGUI();
+            }
+        });
+
+        toolkit.realSync();
+
+        Point point = getRowPointToClick(1);
+        robot.mouseMove(point.x, point.y);
+        robot.mousePress(InputEvent.BUTTON1_MASK);
+        robot.mouseRelease(InputEvent.BUTTON1_MASK);
+
+        toolkit.realSync();
+
+        Boolean result = (Boolean)tree.getCellEditor().getCellEditorValue();
+        if (!result) {
+            throw new RuntimeException("Test Failed!");
+        }
+    }
+
+    private static void createAndShowGUI() {
+        try {
+            UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+
+        DefaultMutableTreeNode root = new DefaultMutableTreeNode("root");
+        DefaultMutableTreeNode item = new DefaultMutableTreeNode("item");
+        DefaultMutableTreeNode subItem = new DefaultMutableTreeNode("subItem");
+
+        root.add(item);
+        item.add(subItem);
+
+        DefaultTreeModel model = new DefaultTreeModel(root);
+        tree = new JTree(model);
+
+        tree.setCellEditor(new Editor());
+        tree.setEditable(true);
+        tree.setRowHeight(30);
+        tree.setCellRenderer(new CheckboxCellRenderer());
+
+        JFrame frame = new JFrame("bug8023474");
+        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+        frame.add(new JScrollPane(tree));
+        frame.setSize(400, 300);
+        frame.setVisible(true);
+    }
+
+    private static Point getRowPointToClick(final int row) throws Exception {
+        final Point[] result = new Point[1];
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                Rectangle rect = tree.getRowBounds(row);
+                Point point = new Point(rect.x + 10, rect.y + rect.height / 2);
+                SwingUtilities.convertPointToScreen(point, tree);
+                result[0] = point;
+            }
+        });
+        return result[0];
+    }
+
+    private static class Editor extends JPanel implements TreeCellEditor {
+        private JCheckBox checkbox;
+
+        public Editor() {
+            setOpaque(false);
+            checkbox = new JCheckBox();
+            add(checkbox);
+        }
+
+        public Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected,
+                                                    boolean expanded, boolean leaf, int row) {
+            checkbox.setText(value.toString());
+            checkbox.setSelected(false);
+            return this;
+        }
+
+        public Object getCellEditorValue() {
+            return checkbox.isSelected();
+        }
+
+        public boolean isCellEditable(EventObject anEvent) {
+            return true;
+        }
+
+        public boolean shouldSelectCell(EventObject anEvent) {
+            return true;
+        }
+
+        public boolean stopCellEditing() {
+            return true;
+        }
+
+        public void cancelCellEditing() {
+        }
+
+        public void addCellEditorListener(CellEditorListener l) {
+        }
+
+        public void removeCellEditorListener(CellEditorListener l) {
+        }
+    }
+
+    private static class CheckboxCellRenderer extends JPanel implements TreeCellRenderer {
+        private JCheckBox checkbox;
+
+        public CheckboxCellRenderer() {
+            setOpaque(false);
+            checkbox = new JCheckBox();
+            add(checkbox);
+        }
+
+        public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded,
+                                                      boolean leaf, int row, boolean hasFocus) {
+            checkbox.setText(value.toString());
+            checkbox.setSelected(false);
+            return this;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/text/AbstractDocument/6968363/Test6968363.java	Thu Sep 26 17:18:12 2013 -0700
@@ -0,0 +1,241 @@
+/*
+ * Copyright (c) 2013, 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.
+ */
+import sun.awt.SunToolkit;
+
+import java.awt.Robot;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JTextField;
+import javax.swing.event.DocumentListener;
+import javax.swing.event.UndoableEditListener;
+import javax.swing.text.AttributeSet;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.Document;
+import javax.swing.text.Element;
+import javax.swing.text.PlainDocument;
+import javax.swing.text.Position;
+import javax.swing.text.Segment;
+
+import static java.awt.BorderLayout.NORTH;
+import static java.awt.BorderLayout.SOUTH;
+import static java.awt.Toolkit.getDefaultToolkit;
+import static java.awt.event.KeyEvent.VK_LEFT;
+import static javax.swing.SwingUtilities.invokeAndWait;
+
+/*
+ * @test
+ * @bug 6968363
+ * @summary Ensures that a custom document may not extend AbstractDocument
+ * @author Sergey Malenkov
+ */
+public class Test6968363 implements Runnable, Thread.UncaughtExceptionHandler {
+    private JFrame frame;
+
+    public static void main(String[] args) throws Exception {
+        SunToolkit toolkit = (SunToolkit) getDefaultToolkit();
+        Runnable task = new Test6968363();
+        invokeAndWait(task);
+        toolkit.realSync(100);
+        new Robot().keyPress(VK_LEFT);
+        toolkit.realSync(100);
+        invokeAndWait(task);
+    }
+
+    @Override
+    public void uncaughtException(Thread thread, Throwable throwable) {
+        throwable.printStackTrace();
+        System.exit(1);
+    }
+
+    @Override
+    public void run() {
+        if (this.frame == null) {
+            Thread.setDefaultUncaughtExceptionHandler(this);
+            this.frame = new JFrame(getClass().getSimpleName());
+            this.frame.add(NORTH, new JLabel("Copy Paste a HINDI text into the field below"));
+            this.frame.add(SOUTH, new JTextField(new MyDocument(), "\u0938", 10));
+            this.frame.pack();
+            this.frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
+            this.frame.setLocationRelativeTo(null);
+            this.frame.setVisible(true);
+        } else {
+            this.frame.dispose();
+            this.frame = null;
+        }
+    }
+
+    private static class MyDocument implements Document {
+        private final Document document = new PlainDocument();
+
+        @Override
+        public int getLength() {
+            return this.document.getLength();
+        }
+
+        @Override
+        public void addDocumentListener(DocumentListener listener) {
+            this.document.addDocumentListener(listener);
+        }
+
+        @Override
+        public void removeDocumentListener(DocumentListener listener) {
+            this.document.removeDocumentListener(listener);
+        }
+
+        @Override
+        public void addUndoableEditListener(UndoableEditListener listener) {
+            this.document.addUndoableEditListener(listener);
+        }
+
+        @Override
+        public void removeUndoableEditListener(UndoableEditListener listener) {
+            this.document.removeUndoableEditListener(listener);
+        }
+
+        @Override
+        public Object getProperty(Object key) {
+            return this.document.getProperty(key);
+        }
+
+        @Override
+        public void putProperty(Object key, Object value) {
+            this.document.putProperty(key, value);
+        }
+
+        @Override
+        public void remove(int offset, int length) throws BadLocationException {
+            this.document.remove(offset, length);
+        }
+
+        @Override
+        public void insertString(int offset, String string, AttributeSet set) throws BadLocationException {
+            for (int i = 0; i < string.length(); i++) {
+                System.out.println("i: " + i + "; ch: " + Integer.toHexString(string.charAt(i)));
+            }
+            this.document.insertString(offset, string, set);
+        }
+
+        @Override
+        public String getText(int offset, int length) throws BadLocationException {
+            return this.document.getText(offset, length);
+        }
+
+        @Override
+        public void getText(int offset, int length, Segment segment) throws BadLocationException {
+            this.document.getText(offset, length, segment);
+        }
+
+        @Override
+        public Position getStartPosition() {
+            return this.document.getStartPosition();
+        }
+
+        @Override
+        public Position getEndPosition() {
+            return this.document.getEndPosition();
+        }
+
+        @Override
+        public Position createPosition(int offset) throws BadLocationException {
+            return this.document.createPosition(offset);
+        }
+
+        @Override
+        public Element[] getRootElements() {
+            Element[] elements = this.document.getRootElements();
+            Element[] wrappers = new Element[elements.length];
+            for (int i = 0; i < elements.length; i++) {
+                wrappers[i] = new MyElement(elements[i]);
+            }
+            return wrappers;
+        }
+
+        @Override
+        public Element getDefaultRootElement() {
+            return new MyElement(this.document.getDefaultRootElement());
+        }
+
+        @Override
+        public void render(Runnable task) {
+            this.document.render(task);
+        }
+
+        private class MyElement implements Element {
+            private final Element element;
+
+            private MyElement(Element element) {
+                this.element = element;
+            }
+
+            @Override
+            public Document getDocument() {
+                return MyDocument.this;
+            }
+
+            @Override
+            public Element getParentElement() {
+                return new MyElement(this.element.getParentElement());
+            }
+
+            @Override
+            public String getName() {
+                return this.element.getName();
+            }
+
+            @Override
+            public AttributeSet getAttributes() {
+                return this.element.getAttributes();
+            }
+
+            @Override
+            public int getStartOffset() {
+                return this.element.getStartOffset();
+            }
+
+            @Override
+            public int getEndOffset() {
+                return this.element.getEndOffset();
+            }
+
+            @Override
+            public int getElementIndex(int offset) {
+                return this.element.getElementIndex(offset);
+            }
+
+            @Override
+            public int getElementCount() {
+                return this.element.getElementCount();
+            }
+
+            @Override
+            public Element getElement(int index) {
+                return new MyElement(this.element.getElement(index));
+            }
+
+            @Override
+            public boolean isLeaf() {
+                return this.element.isLeaf();
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/text/DefaultCaret/7083457/bug7083457.java	Thu Sep 26 17:18:12 2013 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2013, 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.
+ */
+
+import javax.swing.text.DefaultCaret;
+
+/**
+ * @test
+ * @bug 7083457
+ * @author Alexander Scherbatiy
+ * @summary  Incomplete specification for javax/swing/text/DefaultCaret.html#setVisible(boolean)
+ * @run main bug7083457
+ */
+public class bug7083457 {
+
+    public static void main(String[] args) {
+        DefaultCaret caret = new DefaultCaret();
+
+        for (int i = 0; i < 10; i++) {
+            boolean active = (i % 2 == 0);
+            caret.setVisible(active);
+            if (caret.isActive() != active) {
+                throw new RuntimeException("caret.isActive() does not equal: " + active);
+            }
+        }
+    }
+}
--- a/jdk/test/javax/swing/text/View/8014863/bug8014863.java	Thu Sep 26 17:13:39 2013 -0700
+++ b/jdk/test/javax/swing/text/View/8014863/bug8014863.java	Thu Sep 26 17:18:12 2013 -0700
@@ -24,6 +24,7 @@
 /*
  * @test
  * @bug 8014863
+ * @bug 8024395
  * @summary  Tests the calculation of the line breaks when a text is inserted
  * @author Dmitry Markov
  * @library ../../../regtesthelpers
@@ -34,91 +35,107 @@
 import sun.awt.SunToolkit;
 
 import javax.swing.*;
+import javax.swing.text.GlyphView;
+import javax.swing.text.View;
 import javax.swing.text.html.HTMLEditorKit;
 import java.awt.*;
 import java.awt.event.KeyEvent;
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.Arrays;
 
 public class bug8014863 {
 
     private static JEditorPane editorPane;
+    private static JFrame frame;
     private static Robot robot;
     private static SunToolkit toolkit;
 
+    private static String text1 = "<p>one two qqqq <em>this is a test sentence</em> qqqq <em>pp</em> qqqq <em>pp</em> " +
+            "qqqq <em>pp</em> qqqq <em>pp</em> qqqq <em>pp</em> qqqq <em>pp</em> qqqq <em>pp</em> qqqq <em>pp</em> qqqq</p>";
+    private static String text2 = "<p>qqqq <em>this is a test sentence</em> qqqq <em>pp</em> qqqq <em>pp</em> " +
+            "qqqq <em>pp</em> qqqq <em>pp</em> qqqq <em>pp</em> qqqq <em>pp</em> qqqq <em>pp</em> qqqq <em>pp</em> qqqq</p>";
+
+    private static ArrayList<GlyphView> glyphViews;
+
     public static void main(String[] args) throws Exception {
         toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
         robot = new Robot();
+        robot.setAutoDelay(50);
+        glyphViews = new ArrayList<GlyphView>();
 
-        createAndShowGUI();
+        createAndShowGUI(text1);
+
+        toolkit.realSync();
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                retrieveGlyphViews(editorPane.getUI().getRootView(editorPane));
+            }
+        });
+        GlyphView [] arr1 = glyphViews.toArray(new GlyphView[glyphViews.size()]);
+
+        frame.dispose();
+        glyphViews.clear();
+
+        createAndShowGUI(text2);
 
         toolkit.realSync();
 
         Util.hitKeys(robot, KeyEvent.VK_HOME);
-        Util.hitKeys(robot, KeyEvent.VK_O);
-
         toolkit.realSync();
 
-        if (3 != getNumberOfTextLines()) {
-            throw new RuntimeException("The number of texts lines does not meet the expectation");
-        }
-
+        Util.hitKeys(robot, KeyEvent.VK_O);
         Util.hitKeys(robot, KeyEvent.VK_N);
-
-        toolkit.realSync();
-
-        if (3 != getNumberOfTextLines()) {
-            throw new RuntimeException("The number of texts lines does not meet the expectation");
-        }
-
         Util.hitKeys(robot, KeyEvent.VK_E);
         Util.hitKeys(robot, KeyEvent.VK_SPACE);
         Util.hitKeys(robot, KeyEvent.VK_T);
         Util.hitKeys(robot, KeyEvent.VK_W);
+        Util.hitKeys(robot, KeyEvent.VK_O);
+        Util.hitKeys(robot, KeyEvent.VK_SPACE);
 
         toolkit.realSync();
 
-        if (3 != getNumberOfTextLines()) {
-            throw new RuntimeException("The number of texts lines does not meet the expectation");
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                retrieveGlyphViews(editorPane.getUI().getRootView(editorPane));
+            }
+        });
+        GlyphView [] arr2 = glyphViews.toArray(new GlyphView[glyphViews.size()]);
+
+        if (arr1.length != arr2.length) {
+            throw new RuntimeException("Test Failed!");
+        }
+
+        for (int i=0; i<arr1.length; i++) {
+            GlyphView v1 = arr1[i];
+            GlyphView v2 = arr2[i];
+            Field field = GlyphView.class.getDeclaredField("breakSpots");
+            field.setAccessible(true);
+            int[] breakSpots1 = (int[])field.get(v1);
+            int[] breakSpots2 = (int[])field.get(v2);
+            if (!Arrays.equals(breakSpots1,breakSpots2)) {
+                throw new RuntimeException("Test Failed!");
+            }
+        }
+
+        frame.dispose();
+    }
+
+    private static void retrieveGlyphViews(View root) {
+        for (int i=0; i<= root.getViewCount()-1; i++) {
+            View view = root.getView(i);
+            if (view instanceof GlyphView && view.isVisible()) {
+                if (!glyphViews.contains(view)) {
+                    glyphViews.add((GlyphView)view);
+                }
+            } else {
+                retrieveGlyphViews(view);
+            }
         }
     }
 
-    private static int getNumberOfTextLines() throws Exception {
-        int numberOfLines = 0;
-        int caretPosition = getCaretPosition();
-        int current = 1;
-        int previous;
-
-        setCaretPosition(current);
-        do {
-            previous = current;
-            Util.hitKeys(robot, KeyEvent.VK_DOWN);
-            toolkit.realSync();
-            current = getCaretPosition();
-            numberOfLines++;
-        } while (current != previous);
-
-        setCaretPosition(caretPosition);
-        return numberOfLines;
-    }
-
-    private static int getCaretPosition() throws Exception {
-        final int[] result = new int[1];
-        SwingUtilities.invokeAndWait(new Runnable() {
-            public void run() {
-                result[0] = editorPane.getCaretPosition();
-            }
-        });
-        return result[0];
-    }
-
-    private static void setCaretPosition(final int position) throws Exception {
-        SwingUtilities.invokeAndWait(new Runnable() {
-            public void run() {
-                editorPane.setCaretPosition(position);
-            }
-        });
-    }
-
-    private static void createAndShowGUI() throws Exception {
+    private static void createAndShowGUI(String text) throws Exception {
         SwingUtilities.invokeAndWait(new Runnable() {
             public void run() {
                 try {
@@ -126,22 +143,17 @@
                 } catch (Exception ex) {
                     throw new RuntimeException(ex);
                 }
-                JFrame frame = new JFrame();
+                frame = new JFrame();
                 frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
 
                 editorPane = new JEditorPane();
                 HTMLEditorKit editorKit = new HTMLEditorKit();
                 editorPane.setEditorKit(editorKit);
-                editorPane.setText("<p>qqqq <em>pp</em> qqqq <em>pp</em> " +
-                        "qqqq <em>pp</em> qqqq <em>pp</em> qqqq <em>pp</em> qqqq <em>pp" +
-                        "</em> qqqq <em>pp</em> qqqq <em>pp</em> qqqq <em>pp</em> qqqq</p>");
+                editorPane.setText(text);
                 editorPane.setCaretPosition(1);
-                // An actual font size depends on OS and might be differnet on various OSs.
-                // It is necessary to calculate the width to meet the expected number of lines.
-                int width = SwingUtilities.computeStringWidth(editorPane.getFontMetrics(editorPane.getFont()),
-                        "qqqq pp qqqq pp qqqq pp qqqqqqqq");
+
                 frame.add(editorPane);
-                frame.setSize(width, 200);
+                frame.setSize(200, 200);
                 frame.setVisible(true);
             }
         });