changeset 30954:61eb4d31dcd1

Merge
author ddehaven
date Wed, 03 Jun 2015 18:11:45 -0700
parents 504f95d17f58 cd3c2e9ff3bc
children 1329009c9b57 3b8f5ca8938f
files
diffstat 186 files changed, 3998 insertions(+), 986 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxPopup.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaComboBoxPopup.java	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -204,7 +204,8 @@
             if ((p.x + comboBoxBounds.width < 0) || (p.y + comboBoxBounds.height < 0) || (p.x > scrSize.width) || (p.y > scrSize.height)) {
                 return null;
             }
-            return new Rectangle(0, 22, scrSize.width, scrSize.height - 22);
+            Insets insets = Toolkit.getDefaultToolkit().getScreenInsets(comboBox.getGraphicsConfiguration());
+            return new Rectangle(0, insets.top, scrSize.width, scrSize.height - insets.top - insets.bottom);
         }
 
         for (final GraphicsDevice gd : gs) {
@@ -314,10 +315,17 @@
         }
 
         final Rectangle r = new Rectangle(px, py, pw, ph);
-        // Check whether it goes below the bottom of the screen, if so flip it
-        if (r.y + r.height < top.y + scrBounds.y + scrBounds.height) return r;
-
-        return new Rectangle(px, -r.height + comboBoxInsets.top, r.width, r.height);
+        if (py + ph > scrBounds.y + scrBounds.height) {
+            if (ph <= -scrBounds.y ) {
+                // popup goes above
+                r.y = -ph ;
+            } else {
+                // a full screen height popup
+                r.y = scrBounds.y + Math.max(0, (scrBounds.height - ph) / 2 );
+                r.height = Math.min(scrBounds.height, ph);
+            }
+        }
+        return r;
     }
 
     // The one to use when itemCount <= maxRowCount.  Size never adjusts for arrows
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaSpinnerUI.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaSpinnerUI.java	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -232,12 +232,12 @@
         editor.setInheritsPopupMenu(true);
 
         if (editor.getFont() instanceof UIResource) {
-            editor.setFont(spinner.getFont());
+            editor.setFont(new FontUIResource(spinner.getFont()));
         }
 
         final JFormattedTextField editorTextField = ((DefaultEditor)editor).getTextField();
         if (editorTextField.getFont() instanceof UIResource) {
-            editorTextField.setFont(spinner.getFont());
+            editorTextField.setFont(new FontUIResource(spinner.getFont()));
         }
         final InputMap spinnerInputMap = getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
         final InputMap editorInputMap = editorTextField.getInputMap();
@@ -648,12 +648,12 @@
                     ui.updateToolTipTextForChildren(spinner);
                 } else if ("font".equals(propertyName)) {
                     JComponent editor = spinner.getEditor();
-                    if (editor != null && editor instanceof JSpinner.DefaultEditor) {
+                    if (editor instanceof JSpinner.DefaultEditor) {
                         JTextField tf =
                                 ((JSpinner.DefaultEditor) editor).getTextField();
                         if (tf != null) {
                             if (tf.getFont() instanceof UIResource) {
-                                tf.setFont(spinner.getFont());
+                                tf.setFont(new FontUIResource(spinner.getFont()));
                             }
                         }
                     }
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWMouseInfoPeer.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWMouseInfoPeer.java	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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,8 +51,12 @@
             return false;
         }
 
-        final Object windowPeer = AWTAccessor.getComponentAccessor().getPeer(w);
-        return LWWindowPeer.getWindowUnderCursor() == windowPeer;
+        LWWindowPeer windowPeer = AWTAccessor.getComponentAccessor().getPeer(w);
+        if (windowPeer == null) {
+            return false;
+        }
+
+        return LWToolkit.getLWToolkit().getPlatformWindowUnderMouse() == windowPeer.getPlatformWindow();
     }
 
 }
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWTextAreaPeer.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWTextAreaPeer.java	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -23,7 +23,6 @@
  * questions.
  */
 
-
 package sun.lwawt;
 
 import java.awt.Component;
@@ -40,7 +39,6 @@
 import javax.swing.JTextArea;
 import javax.swing.ScrollPaneConstants;
 import javax.swing.text.Document;
-import javax.swing.text.JTextComponent;
 
 /**
  * Lightweight implementation of {@link TextAreaPeer}. Delegates most of the
@@ -75,12 +73,13 @@
         super.initializeImpl();
         final int visibility = getTarget().getScrollbarVisibility();
         synchronized (getDelegateLock()) {
+            getTextComponent().setWrapStyleWord(true);
             setScrollBarVisibility(visibility);
         }
     }
 
     @Override
-    JTextComponent getTextComponent() {
+    JTextArea getTextComponent() {
         return getDelegate().getView();
     }
 
@@ -165,7 +164,7 @@
             // JTextArea.replaceRange() is called.
             final Document document = getTextComponent().getDocument();
             document.removeDocumentListener(this);
-            getDelegate().getView().replaceRange(text, start, end);
+            getTextComponent().replaceRange(text, start, end);
             revalidate();
             postEvent(new TextEvent(getTarget(), TextEvent.TEXT_VALUE_CHANGED));
             document.addDocumentListener(this);
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWToolkit.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWToolkit.java	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -396,6 +396,8 @@
         return new LWMouseInfoPeer();
     }
 
+    protected abstract PlatformWindow getPlatformWindowUnderMouse();
+
     @Override
     public final PrintJob getPrintJob(Frame frame, String doctitle,
                                       Properties props) {
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.java	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -61,6 +61,7 @@
     private static final int MINIMUM_HEIGHT = 1;
 
     private Insets insets = new Insets(0, 0, 0, 0);
+    private Rectangle maximizedBounds;
 
     private GraphicsDevice graphicsDevice;
     private GraphicsConfiguration graphicsConfig;
@@ -176,8 +177,10 @@
 
 
         if (getTarget() instanceof Frame) {
-            setTitle(((Frame) getTarget()).getTitle());
-            setState(((Frame) getTarget()).getExtendedState());
+            Frame frame = (Frame) getTarget();
+            setTitle(frame.getTitle());
+            setState(frame.getExtendedState());
+            setMaximizedBounds(frame.getMaximizedBounds());
         } else if (getTarget() instanceof Dialog) {
             setTitle(((Dialog) getTarget()).getTitle());
         }
@@ -543,9 +546,40 @@
         return windowState;
     }
 
+    private boolean isMaximizedBoundsSet() {
+        synchronized (getStateLock()) {
+            return maximizedBounds != null;
+        }
+    }
+
+    private Rectangle getDefaultMaximizedBounds() {
+        GraphicsConfiguration config = getGraphicsConfiguration();
+        Insets screenInsets = ((CGraphicsDevice) config.getDevice())
+                .getScreenInsets();
+        Rectangle gcBounds = config.getBounds();
+        return new Rectangle(
+                gcBounds.x + screenInsets.left,
+                gcBounds.y + screenInsets.top,
+                gcBounds.width - screenInsets.left - screenInsets.right,
+                gcBounds.height - screenInsets.top - screenInsets.bottom);
+    }
+
     @Override
     public void setMaximizedBounds(Rectangle bounds) {
-        // TODO: not implemented
+        boolean isMaximizedBoundsSet;
+        synchronized (getStateLock()) {
+            this.maximizedBounds = (isMaximizedBoundsSet = (bounds != null))
+                    ? constrainBounds(bounds) : null;
+        }
+
+        setPlatformMaximizedBounds(isMaximizedBoundsSet ? maximizedBounds
+                : getDefaultMaximizedBounds());
+    }
+
+    private void setPlatformMaximizedBounds(Rectangle bounds) {
+        platformWindow.setMaximizedBounds(
+                bounds.x, bounds.y,
+                bounds.width, bounds.height);
     }
 
     @Override
@@ -635,6 +669,10 @@
 
         // Second, update the graphics config and surface data
         final boolean isNewDevice = updateGraphicsDevice();
+        if (isNewDevice && !isMaximizedBoundsSet()) {
+            setPlatformMaximizedBounds(getDefaultMaximizedBounds());
+        }
+
         if (resized || isNewDevice) {
             replaceSurfaceData();
             updateMinimumSize();
@@ -749,11 +787,10 @@
                 lastMouseEventPeer = targetPeer;
             }
         } else {
-            PlatformWindow topmostPlatforWindow =
-                    platformWindow.getTopmostPlatformWindowUnderMouse();
+            PlatformWindow topmostPlatformWindow = LWToolkit.getLWToolkit().getPlatformWindowUnderMouse();
 
             LWWindowPeer topmostWindowPeer =
-                    topmostPlatforWindow != null ? topmostPlatforWindow.getPeer() : null;
+                    topmostPlatformWindow != null ? topmostPlatformWindow.getPeer() : null;
 
             // topmostWindowPeer == null condition is added for the backward
             // compatibility with applets. It can be removed when the
@@ -764,8 +801,7 @@
                         screenX, screenY, modifiers, clickCount, popupTrigger,
                         targetPeer);
             } else {
-                LWComponentPeer<?, ?> topmostTargetPeer =
-                        topmostWindowPeer != null ? topmostWindowPeer.findPeerAt(r.x + x, r.y + y) : null;
+                LWComponentPeer<?, ?> topmostTargetPeer = topmostWindowPeer.findPeerAt(r.x + x, r.y + y);
                 topmostWindowPeer.generateMouseEnterExitEventsForComponents(when, button, x, y,
                         screenX, screenY, modifiers, clickCount, popupTrigger,
                         topmostTargetPeer);
@@ -1057,6 +1093,9 @@
     public final void displayChanged() {
         if (updateGraphicsDevice()) {
             updateMinimumSize();
+            if (!isMaximizedBoundsSet()) {
+                setPlatformMaximizedBounds(getDefaultMaximizedBounds());
+            }
         }
         // Replace surface unconditionally, because internal state of the
         // GraphicsDevice could be changed.
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/PlatformWindow.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/PlatformWindow.java	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -67,6 +67,11 @@
     public void setBounds(int x, int y, int w, int h);
 
     /*
+     * Sets the maximized bounds.
+     */
+    public default void setMaximizedBounds(int x, int y, int w, int h){}
+
+    /*
      * Returns the graphics device where the window is.
      */
     public GraphicsDevice getGraphicsDevice();
@@ -107,8 +112,6 @@
 
     public void setAlwaysOnTop(boolean value);
 
-    public PlatformWindow getTopmostPlatformWindowUnderMouse();
-
     public void updateFocusableWindowState();
 
     public boolean rejectFocusRequest(CausedFocusEvent.Cause cause);
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessibility.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessibility.java	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -630,7 +630,7 @@
 
             if (!allowIgnored) {
                 final AccessibleRole role = context.getAccessibleRole();
-                if (role != null && ignoredRoles.contains(roleKey(role))) {
+                if (role != null && ignoredRoles != null && ignoredRoles.contains(roleKey(role))) {
                     // Get the child's unignored children.
                     _addChildren(child, whichChildren, false, childrenAndRoles);
                 } else {
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformEmbeddedFrame.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformEmbeddedFrame.java	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -129,11 +129,6 @@
     @Override
     public void setAlwaysOnTop(boolean value) {}
 
-    // This method should be properly implemented for applets.
-    // It returns null just as a stub.
-    @Override
-    public PlatformWindow getTopmostPlatformWindowUnderMouse() { return null; }
-
     @Override
     public void updateFocusableWindowState() {}
 
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformLWWindow.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformLWWindow.java	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, 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
@@ -162,11 +162,6 @@
     }
 
     @Override
-    public PlatformWindow getTopmostPlatformWindowUnderMouse(){
-        return null;
-    }
-
-    @Override
     public void setOpacity(float opacity) {
     }
 
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java	Wed Jun 03 18:11:45 2015 -0700
@@ -51,6 +51,8 @@
     private static native void nativeSetNSWindowMenuBar(long nsWindowPtr, long menuBarPtr);
     private static native Insets nativeGetNSWindowInsets(long nsWindowPtr);
     private static native void nativeSetNSWindowBounds(long nsWindowPtr, double x, double y, double w, double h);
+    private static native void nativeSetNSWindowStandardFrame(long nsWindowPtr,
+            double x, double y, double w, double h);
     private static native void nativeSetNSWindowMinMax(long nsWindowPtr, double minW, double minH, double maxW, double maxH);
     private static native void nativePushNSWindowToBack(long nsWindowPtr);
     private static native void nativePushNSWindowToFront(long nsWindowPtr);
@@ -61,9 +63,9 @@
     private static native void nativeSetEnabled(long nsWindowPtr, boolean isEnabled);
     private static native void nativeSynthesizeMouseEnteredExitedEvents();
     private static native void nativeDispose(long nsWindowPtr);
-    private static native CPlatformWindow nativeGetTopmostPlatformWindowUnderMouse();
     private static native void nativeEnterFullScreenMode(long nsWindowPtr);
     private static native void nativeExitFullScreenMode(long nsWindowPtr);
+    static native CPlatformWindow nativeGetTopmostPlatformWindowUnderMouse();
 
     // Loger to report issues happened during execution but that do not affect functionality
     private static final PlatformLogger logger = PlatformLogger.getLogger("sun.lwawt.macosx.CPlatformWindow");
@@ -474,6 +476,10 @@
         nativeSetNSWindowBounds(getNSWindowPtr(), x, y, w, h);
     }
 
+    public void setMaximizedBounds(int x, int y, int w, int h) {
+        nativeSetNSWindowStandardFrame(getNSWindowPtr(), x, y, w, h);
+    }
+
     private boolean isMaximized() {
         return undecorated ? this.normalBounds != null
                 : CWrapper.NSWindow.isZoomed(getNSWindowPtr());
@@ -750,10 +756,6 @@
         setStyleBits(ALWAYS_ON_TOP, isAlwaysOnTop);
     }
 
-    public PlatformWindow getTopmostPlatformWindowUnderMouse(){
-        return CPlatformWindow.nativeGetTopmostPlatformWindowUnderMouse();
-    }
-
     @Override
     public void setOpacity(float opacity) {
         CWrapper.NSWindow.setAlphaValue(getNSWindowPtr(), opacity);
@@ -983,13 +985,11 @@
     }
 
     private void checkZoom() {
-        if (target instanceof Frame && isVisible()) {
-            Frame targetFrame = (Frame)target;
-            if (targetFrame.getExtendedState() != Frame.MAXIMIZED_BOTH && isMaximized()) {
-                deliverZoom(true);
-            } else if (targetFrame.getExtendedState() == Frame.MAXIMIZED_BOTH && !isMaximized()) {
-                deliverZoom(false);
-            }
+        int state = peer.getState();
+        if (state != Frame.MAXIMIZED_BOTH && isMaximized()) {
+            deliverZoom(true);
+        } else if (state == Frame.MAXIMIZED_BOTH && !isMaximized()) {
+            deliverZoom(false);
         }
     }
 
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CRobot.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CRobot.java	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -78,7 +78,7 @@
     @Override
     public void mousePress(int buttons) {
         mouseButtonsState |= buttons;
-
+        checkMousePos();
         mouseEvent(fDevice.getCGDisplayID(), mouseLastX, mouseLastY,
                    buttons, true, false);
     }
@@ -92,11 +92,40 @@
     @Override
     public void mouseRelease(int buttons) {
         mouseButtonsState &= ~buttons;
-
+        checkMousePos();
         mouseEvent(fDevice.getCGDisplayID(), mouseLastX, mouseLastY,
                    buttons, false, false);
     }
 
+    /**
+     * Set unknown mouse location, if needed.
+     */
+    private void checkMousePos() {
+        if (mouseLastX == MOUSE_LOCATION_UNKNOWN ||
+                mouseLastY == MOUSE_LOCATION_UNKNOWN) {
+
+            Rectangle deviceBounds = fDevice.getDefaultConfiguration().getBounds();
+            Point mousePos = CCursorManager.getInstance().getCursorPosition();
+
+            if (mousePos.x < deviceBounds.x) {
+                mousePos.x = deviceBounds.x;
+            }
+            else if (mousePos.x > deviceBounds.x + deviceBounds.width) {
+                mousePos.x = deviceBounds.x + deviceBounds.width;
+            }
+
+            if (mousePos.y < deviceBounds.y) {
+                mousePos.y = deviceBounds.y;
+            }
+            else if (mousePos.y > deviceBounds.y + deviceBounds.height) {
+                mousePos.y = deviceBounds.y + deviceBounds.height;
+            }
+
+            mouseLastX = mousePos.x;
+            mouseLastY = mousePos.y;
+        }
+    }
+
     @Override
     public native void mouseWheel(int wheelAmt);
 
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CViewPlatformEmbeddedFrame.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CViewPlatformEmbeddedFrame.java	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2015, 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
@@ -144,11 +144,6 @@
     }
 
     @Override
-    public PlatformWindow getTopmostPlatformWindowUnderMouse() {
-        return null;
-    }
-
-    @Override
     public void updateFocusableWindowState() {
     }
 
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/LWCToolkit.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/LWCToolkit.java	Wed Jun 03 18:11:45 2015 -0700
@@ -929,4 +929,9 @@
                 !path.endsWith("/") &&
                 !path.endsWith(".");
     }
+
+    @Override
+    protected PlatformWindow getPlatformWindowUnderMouse() {
+        return CPlatformWindow.nativeGetTopmostPlatformWindowUnderMouse();
+    }
 }
--- a/jdk/src/java.desktop/macosx/native/include/jawt_md.h	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/macosx/native/include/jawt_md.h	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013 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
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.h	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.h	Wed Jun 03 18:11:45 2015 -0700
@@ -46,6 +46,7 @@
     NSWindow *nsWindow;
     AWTWindow *ownerWindow;
     jint preFullScreenLevel;
+    NSRect standardFrame;
 }
 
 // An instance of either AWTWindow_Normal or AWTWindow_Panel
@@ -59,7 +60,7 @@
 @property (nonatomic) jint styleBits;
 @property (nonatomic) BOOL isEnabled;
 @property (nonatomic) jint preFullScreenLevel;
-
+@property (nonatomic) NSRect standardFrame;
 
 - (id) initWithPlatformWindow:(JNFWeakJObjectWrapper *)javaPlatformWindow
                   ownerWindow:owner
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.m	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.m	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -184,6 +184,7 @@
 @synthesize isEnabled;
 @synthesize ownerWindow;
 @synthesize preFullScreenLevel;
+@synthesize standardFrame;
 
 - (void) updateMinMaxSize:(BOOL)resizable {
     if (resizable) {
@@ -509,6 +510,12 @@
     // window exposing in _setVisible:(BOOL)
 }
 
+- (NSRect)windowWillUseStandardFrame:(NSWindow *)window
+                        defaultFrame:(NSRect)newFrame {
+
+    return [self standardFrame];
+}
+
 - (void) _deliverIconify:(BOOL)iconify {
 AWT_ASSERT_APPKIT_THREAD;
 
@@ -953,6 +960,30 @@
 
 /*
  * Class:     sun_lwawt_macosx_CPlatformWindow
+ * Method:    nativeSetNSWindowStandardFrame
+ * Signature: (JDDDD)V
+ */
+JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CPlatformWindow_nativeSetNSWindowStandardFrame
+(JNIEnv *env, jclass clazz, jlong windowPtr, jdouble originX, jdouble originY,
+     jdouble width, jdouble height)
+{
+    JNF_COCOA_ENTER(env);
+    
+    NSRect jrect = NSMakeRect(originX, originY, width, height);
+    
+    NSWindow *nsWindow = OBJC(windowPtr);
+    [ThreadUtilities performOnMainThreadWaiting:NO block:^(){
+        
+        NSRect rect = ConvertNSScreenRect(NULL, jrect);
+        AWTWindow *window = (AWTWindow*)[nsWindow delegate];
+        window.standardFrame = rect;
+    }];
+    
+    JNF_COCOA_EXIT(env);
+}
+
+/*
+ * Class:     sun_lwawt_macosx_CPlatformWindow
  * Method:    nativeSetNSWindowMinMax
  * Signature: (JDDDD)V
  */
@@ -1131,15 +1162,16 @@
 JNICALL Java_sun_lwawt_macosx_CPlatformWindow_nativeGetTopmostPlatformWindowUnderMouse
 (JNIEnv *env, jclass clazz)
 {
-    jobject topmostWindowUnderMouse = nil;
+    __block jobject topmostWindowUnderMouse = nil;
 
     JNF_COCOA_ENTER(env);
-    AWT_ASSERT_APPKIT_THREAD;
 
-    AWTWindow *awtWindow = [AWTWindow getTopmostWindowUnderMouse];
-    if (awtWindow != nil) {
-        topmostWindowUnderMouse = [awtWindow.javaPlatformWindow jObject];
-    }
+    [ThreadUtilities performOnMainThreadWaiting:YES block:^{
+        AWTWindow *awtWindow = [AWTWindow getTopmostWindowUnderMouse];
+        if (awtWindow != nil) {
+            topmostWindowUnderMouse = [awtWindow.javaPlatformWindow jObject];
+        }
+    }];
 
     JNF_COCOA_EXIT(env);
 
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CCursorManager.m	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CCursorManager.m	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -118,13 +118,11 @@
 
 JNF_COCOA_ENTER(env);
 
-    __block NSPoint pt = NSZeroPoint;
-    
-    [ThreadUtilities performOnMainThreadWaiting:YES block:^(){
-            pt = ConvertNSScreenPoint(env, [NSEvent mouseLocation]);
-    }];
-    
-    jpt = NSToJavaPoint(env, pt);
+    CGEventRef event = CGEventCreate(NULL);
+    CGPoint globalPos = CGEventGetLocation(event);
+    CFRelease(event);
+
+    jpt = NSToJavaPoint(env, globalPos);
 
 JNF_COCOA_EXIT(env);
 
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CRobot.m	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/CRobot.m	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -146,47 +146,10 @@
 
     // This is the native method called when Robot mouse events occur.
     // The CRobot tracks the mouse position, and which button was
-    // pressed. If the mouse position is unknown it is obtained from
-    // CGEvents. The peer also tracks the mouse button desired state,
+    // pressed. The peer also tracks the mouse button desired state,
     // the appropriate key modifier state, and whether the mouse action
     // is simply a mouse move with no mouse button state changes.
 
-    CGError err = kCGErrorSuccess;
-
-    CGRect globalDeviceBounds = CGDisplayBounds(displayID);
-
-    // Set unknown mouse location, if needed.
-    if ((mouseLastX == sun_lwawt_macosx_CRobot_MOUSE_LOCATION_UNKNOWN) ||
-        (mouseLastY == sun_lwawt_macosx_CRobot_MOUSE_LOCATION_UNKNOWN))
-    {
-        CGEventRef event = CGEventCreate(NULL);
-        if (event == NULL) {
-            return;
-        }
-
-        CGPoint globalPos = CGEventGetLocation(event);
-        CFRelease(event);
-
-        // Normalize the coords within this display device, as
-        // per Robot rules.
-        if (globalPos.x < CGRectGetMinX(globalDeviceBounds)) {
-            globalPos.x = CGRectGetMinX(globalDeviceBounds);
-        }
-        else if (globalPos.x > CGRectGetMaxX(globalDeviceBounds)) {
-            globalPos.x = CGRectGetMaxX(globalDeviceBounds);
-        }
-
-        if (globalPos.y < CGRectGetMinY(globalDeviceBounds)) {
-            globalPos.y = CGRectGetMinY(globalDeviceBounds);
-        }
-        else if (globalPos.y > CGRectGetMaxY(globalDeviceBounds)) {
-            globalPos.y = CGRectGetMaxY(globalDeviceBounds);
-        }
-
-        mouseLastX = (jint)globalPos.x;
-        mouseLastY = (jint)globalPos.y;
-    }
-
     // volatile, otherwise it warns that it might be clobbered by 'longjmp'
     volatile CGPoint point;
 
--- a/jdk/src/java.desktop/share/classes/com/sun/beans/decoder/ArrayElementHandler.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/com/sun/beans/decoder/ArrayElementHandler.java	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2013 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
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKEngine.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKEngine.java	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, 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
@@ -93,7 +93,9 @@
      */
     static enum Settings {
         GTK_FONT_NAME,
-        GTK_ICON_SIZES
+        GTK_ICON_SIZES,
+        GTK_CURSOR_BLINK,
+        GTK_CURSOR_BLINK_TIME
     }
 
     /* Custom regions are needed for representing regions that don't exist
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, 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
@@ -371,7 +371,17 @@
         int vProgWidth  =  22 - (progXThickness * 2);
         int vProgHeight =  80 - (progYThickness * 2);
 
-        Integer caretBlinkRate = Integer.valueOf(500);
+        Integer caretBlinkRate;
+        if (Boolean.FALSE.equals(GTKEngine.INSTANCE.getSetting(
+                GTKEngine.Settings.GTK_CURSOR_BLINK))) {
+            caretBlinkRate = Integer.valueOf(0);
+        } else {
+            caretBlinkRate = (Integer) GTKEngine.INSTANCE.getSetting(
+                    GTKEngine.Settings.GTK_CURSOR_BLINK_TIME);
+            if (caretBlinkRate == null) {
+                caretBlinkRate = Integer.valueOf(500);
+            }
+        }
         Insets zeroInsets = new InsetsUIResource(0, 0, 0, 0);
 
         Double defaultCaretAspectRatio = new Double(0.025);
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/resources/gtk.properties	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/resources/gtk.properties	Wed Jun 03 18:11:45 2015 -0700
@@ -34,9 +34,9 @@
 FileChooser.newFolderNoDirectoryError.textAndMnemonic=Error creating directory "{0}": No such file or directory
 FileChooser.deleteFileButton.textAndMnemonic=De&lete File
 FileChooser.renameFileButton.textAndMnemonic=&Rename File
-FileChooser.cancelButton.textAndMnemonic=&Cancel
-FileChooser.saveButton.textAndMnemonic=&OK
-FileChooser.openButton.textAndMnemonic=&OK
+FileChooser.cancelButton.textAndMnemonic=Cancel
+FileChooser.saveButton.textAndMnemonic=OK
+FileChooser.openButton.textAndMnemonic=OK
 FileChooser.saveDialogTitle.textAndMnemonic=Save
 FileChooser.openDialogTitle.textAndMnemonic=Open
 FileChooser.pathLabel.textAndMnemonic=&Selection:
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/resources/gtk_de.properties	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/resources/gtk_de.properties	Wed Jun 03 18:11:45 2015 -0700
@@ -34,9 +34,9 @@
 FileChooser.newFolderNoDirectoryError.textAndMnemonic=Fehler beim Erstellen von Verzeichnis "{0}": Datei oder Verzeichnis nicht vorhanden
 FileChooser.deleteFileButton.textAndMnemonic=Datei &l\u00F6schen
 FileChooser.renameFileButton.textAndMnemonic=Datei &umbenennen
-FileChooser.cancelButton.textAndMnemonic=&Abbrechen
-FileChooser.saveButton.textAndMnemonic=&OK
-FileChooser.openButton.textAndMnemonic=&OK
+FileChooser.cancelButton.textAndMnemonic=Abbrechen
+FileChooser.saveButton.textAndMnemonic=OK
+FileChooser.openButton.textAndMnemonic=OK
 FileChooser.saveDialogTitle.textAndMnemonic=Speichern
 FileChooser.openDialogTitle.textAndMnemonic=\u00D6ffnen
 FileChooser.pathLabel.textAndMnemonic=Aus&wahl:
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/resources/gtk_es.properties	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/resources/gtk_es.properties	Wed Jun 03 18:11:45 2015 -0700
@@ -34,9 +34,9 @@
 FileChooser.newFolderNoDirectoryError.textAndMnemonic=Error al crear el directorio "{0}": no existe dicho archivo o directorio
 FileChooser.deleteFileButton.textAndMnemonic=Su&primir Archivo
 FileChooser.renameFileButton.textAndMnemonic=Cambiar Nomb&re de Archivo
-FileChooser.cancelButton.textAndMnemonic=&Cancelar
-FileChooser.saveButton.textAndMnemonic=&Aceptar
-FileChooser.openButton.textAndMnemonic=&Aceptar
+FileChooser.cancelButton.textAndMnemonic=Cancelar
+FileChooser.saveButton.textAndMnemonic=Aceptar
+FileChooser.openButton.textAndMnemonic=Aceptar
 FileChooser.saveDialogTitle.textAndMnemonic=Guardar
 FileChooser.openDialogTitle.textAndMnemonic=Abrir
 FileChooser.pathLabel.textAndMnemonic=&Selecci\u00F3n:
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/resources/gtk_fr.properties	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/resources/gtk_fr.properties	Wed Jun 03 18:11:45 2015 -0700
@@ -34,9 +34,9 @@
 FileChooser.newFolderNoDirectoryError.textAndMnemonic=Erreur lors de la cr\u00E9ation du r\u00E9pertoire "{0}" : ce fichier ou r\u00E9pertoire n''existe pas
 FileChooser.deleteFileButton.textAndMnemonic=Supprimer &le fichier
 FileChooser.renameFileButton.textAndMnemonic=&Renommer le fichier
-FileChooser.cancelButton.textAndMnemonic=&Annuler
-FileChooser.saveButton.textAndMnemonic=&OK
-FileChooser.openButton.textAndMnemonic=&OK
+FileChooser.cancelButton.textAndMnemonic=Annuler
+FileChooser.saveButton.textAndMnemonic=OK
+FileChooser.openButton.textAndMnemonic=OK
 FileChooser.saveDialogTitle.textAndMnemonic=Enregistrer
 FileChooser.openDialogTitle.textAndMnemonic=Ouvrir
 FileChooser.pathLabel.textAndMnemonic=&S\u00E9lection :
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/resources/gtk_it.properties	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/resources/gtk_it.properties	Wed Jun 03 18:11:45 2015 -0700
@@ -34,9 +34,9 @@
 FileChooser.newFolderNoDirectoryError.textAndMnemonic=Errore durante la creazione della directory "{0}": file o directory inesistente
 FileChooser.deleteFileButton.textAndMnemonic=E&limina file
 FileChooser.renameFileButton.textAndMnemonic=&Rinomina file
-FileChooser.cancelButton.textAndMnemonic=&Annulla
-FileChooser.saveButton.textAndMnemonic=&OK
-FileChooser.openButton.textAndMnemonic=&OK
+FileChooser.cancelButton.textAndMnemonic=Annulla
+FileChooser.saveButton.textAndMnemonic=OK
+FileChooser.openButton.textAndMnemonic=OK
 FileChooser.saveDialogTitle.textAndMnemonic=Salva
 FileChooser.openDialogTitle.textAndMnemonic=Apri
 FileChooser.pathLabel.textAndMnemonic=&Selezione:
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/resources/gtk_ja.properties	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/resources/gtk_ja.properties	Wed Jun 03 18:11:45 2015 -0700
@@ -34,9 +34,9 @@
 FileChooser.newFolderNoDirectoryError.textAndMnemonic=\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA"{0}"\u306E\u4F5C\u6210\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F: \u3053\u306E\u30D5\u30A1\u30A4\u30EB\u307E\u305F\u306F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306F\u5B58\u5728\u3057\u307E\u305B\u3093
 FileChooser.deleteFileButton.textAndMnemonic=\u30D5\u30A1\u30A4\u30EB\u306E\u524A\u9664(&L)
 FileChooser.renameFileButton.textAndMnemonic=\u30D5\u30A1\u30A4\u30EB\u306E\u540D\u524D\u5909\u66F4(&R)
-FileChooser.cancelButton.textAndMnemonic=\u53D6\u6D88(&C)
-FileChooser.saveButton.textAndMnemonic=OK(&O)
-FileChooser.openButton.textAndMnemonic=OK(&O)
+FileChooser.cancelButton.textAndMnemonic=\u53D6\u6D88
+FileChooser.saveButton.textAndMnemonic=OK
+FileChooser.openButton.textAndMnemonic=OK
 FileChooser.saveDialogTitle.textAndMnemonic=\u4FDD\u5B58
 FileChooser.openDialogTitle.textAndMnemonic=\u958B\u304F
 FileChooser.pathLabel.textAndMnemonic=\u9078\u629E(&S):
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/resources/gtk_ko.properties	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/resources/gtk_ko.properties	Wed Jun 03 18:11:45 2015 -0700
@@ -34,9 +34,9 @@
 FileChooser.newFolderNoDirectoryError.textAndMnemonic="{0}" \uB514\uB809\uD1A0\uB9AC\uB97C \uC0DD\uC131\uD558\uB294 \uC911 \uC624\uB958 \uBC1C\uC0DD: \uD574\uB2F9 \uD30C\uC77C \uB610\uB294 \uB514\uB809\uD1A0\uB9AC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.
 FileChooser.deleteFileButton.textAndMnemonic=\uD30C\uC77C \uC0AD\uC81C(&L)
 FileChooser.renameFileButton.textAndMnemonic=\uD30C\uC77C \uC774\uB984 \uBC14\uAFB8\uAE30(&R)
-FileChooser.cancelButton.textAndMnemonic=\uCDE8\uC18C(&C)
-FileChooser.saveButton.textAndMnemonic=\uD655\uC778(&O)
-FileChooser.openButton.textAndMnemonic=\uD655\uC778(&O)
+FileChooser.cancelButton.textAndMnemonic=\uCDE8\uC18C
+FileChooser.saveButton.textAndMnemonic=\uD655\uC778
+FileChooser.openButton.textAndMnemonic=\uD655\uC778
 FileChooser.saveDialogTitle.textAndMnemonic=\uC800\uC7A5
 FileChooser.openDialogTitle.textAndMnemonic=\uC5F4\uAE30
 FileChooser.pathLabel.textAndMnemonic=\uC120\uD0DD \uC0AC\uD56D(&S):
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/resources/gtk_pt_BR.properties	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/resources/gtk_pt_BR.properties	Wed Jun 03 18:11:45 2015 -0700
@@ -34,9 +34,9 @@
 FileChooser.newFolderNoDirectoryError.textAndMnemonic=Erro ao criar o diret\u00F3rio "{0}": N\u00E3o h\u00E1 arquivo ou diret\u00F3rio
 FileChooser.deleteFileButton.textAndMnemonic=De&letar Arquivo
 FileChooser.renameFileButton.textAndMnemonic=&Renomear Arquivo
-FileChooser.cancelButton.textAndMnemonic=&Cancelar
-FileChooser.saveButton.textAndMnemonic=&OK
-FileChooser.openButton.textAndMnemonic=&OK
+FileChooser.cancelButton.textAndMnemonic=Cancelar
+FileChooser.saveButton.textAndMnemonic=OK
+FileChooser.openButton.textAndMnemonic=OK
 FileChooser.saveDialogTitle.textAndMnemonic=Salvar
 FileChooser.openDialogTitle.textAndMnemonic=Abrir
 FileChooser.pathLabel.textAndMnemonic=&Sele\u00E7\u00E3o:
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/resources/gtk_sv.properties	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/resources/gtk_sv.properties	Wed Jun 03 18:11:45 2015 -0700
@@ -34,9 +34,9 @@
 FileChooser.newFolderNoDirectoryError.textAndMnemonic=Ett fel intr\u00E4ffade vid f\u00F6rs\u00F6k att skapa katalogen "{0}": Filen eller katalogen finns inte
 FileChooser.deleteFileButton.textAndMnemonic=Ta &bort fil
 FileChooser.renameFileButton.textAndMnemonic=&\u00C4ndra namn p\u00E5 filen
-FileChooser.cancelButton.textAndMnemonic=&Avbryt
-FileChooser.saveButton.textAndMnemonic=&OK
-FileChooser.openButton.textAndMnemonic=&OK
+FileChooser.cancelButton.textAndMnemonic=Avbryt
+FileChooser.saveButton.textAndMnemonic=OK
+FileChooser.openButton.textAndMnemonic=OK
 FileChooser.saveDialogTitle.textAndMnemonic=Spara
 FileChooser.openDialogTitle.textAndMnemonic=\u00D6ppna
 FileChooser.pathLabel.textAndMnemonic=&Urval:
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/resources/gtk_zh_CN.properties	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/resources/gtk_zh_CN.properties	Wed Jun 03 18:11:45 2015 -0700
@@ -34,9 +34,9 @@
 FileChooser.newFolderNoDirectoryError.textAndMnemonic=\u521B\u5EFA\u76EE\u5F55 "{0}" \u65F6\u51FA\u9519: \u6CA1\u6709\u6B64\u7C7B\u6587\u4EF6\u6216\u76EE\u5F55
 FileChooser.deleteFileButton.textAndMnemonic=\u5220\u9664\u6587\u4EF6(&L)
 FileChooser.renameFileButton.textAndMnemonic=\u91CD\u547D\u540D\u6587\u4EF6(&R)
-FileChooser.cancelButton.textAndMnemonic=\u53D6\u6D88(&C)
-FileChooser.saveButton.textAndMnemonic=\u786E\u5B9A(&O)
-FileChooser.openButton.textAndMnemonic=\u786E\u5B9A(&O)
+FileChooser.cancelButton.textAndMnemonic=\u53D6\u6D88
+FileChooser.saveButton.textAndMnemonic=\u786E\u5B9A
+FileChooser.openButton.textAndMnemonic=\u786E\u5B9A
 FileChooser.saveDialogTitle.textAndMnemonic=\u4FDD\u5B58
 FileChooser.openDialogTitle.textAndMnemonic=\u6253\u5F00
 FileChooser.pathLabel.textAndMnemonic=\u9009\u5B9A\u5185\u5BB9(&S):
--- a/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/resources/gtk_zh_TW.properties	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/resources/gtk_zh_TW.properties	Wed Jun 03 18:11:45 2015 -0700
@@ -34,9 +34,9 @@
 FileChooser.newFolderNoDirectoryError.textAndMnemonic=\u5EFA\u7ACB\u76EE\u9304 "{0}" \u6642\u767C\u751F\u932F\u8AA4: \u6C92\u6709\u6B64\u6A94\u6848\u6216\u76EE\u9304
 FileChooser.deleteFileButton.textAndMnemonic=\u522A\u9664\u6A94\u6848(&L)
 FileChooser.renameFileButton.textAndMnemonic=\u91CD\u65B0\u547D\u540D\u6A94\u6848(&R)
-FileChooser.cancelButton.textAndMnemonic=\u53D6\u6D88(&C)
-FileChooser.saveButton.textAndMnemonic=\u78BA\u5B9A(&O)
-FileChooser.openButton.textAndMnemonic=\u78BA\u5B9A(&O)
+FileChooser.cancelButton.textAndMnemonic=\u53D6\u6D88
+FileChooser.saveButton.textAndMnemonic=\u78BA\u5B9A
+FileChooser.openButton.textAndMnemonic=\u78BA\u5B9A
 FileChooser.saveDialogTitle.textAndMnemonic=\u5132\u5B58
 FileChooser.openDialogTitle.textAndMnemonic=\u958B\u555F
 FileChooser.pathLabel.textAndMnemonic=\u9078\u53D6(&S):
--- a/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/basic/resources/basic.properties	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/basic/resources/basic.properties	Wed Jun 03 18:11:45 2015 -0700
@@ -43,13 +43,13 @@
   Specify a different file name.
 FileChooser.acceptAllFileFilter.textAndMnemonic=All Files
 FileChooser.cancelButton.textAndMnemonic=Cancel
-FileChooser.saveButton.textAndMnemonic=&Save
-FileChooser.openButton.textAndMnemonic=&Open
+FileChooser.saveButton.textAndMnemonic=Save
+FileChooser.openButton.textAndMnemonic=Open
 FileChooser.saveDialogTitle.textAndMnemonic=Save
 FileChooser.openDialogTitle.textAndMnemonic=Open
 FileChooser.updateButton.textAndMnemonic=&Update
 FileChooser.helpButton.textAndMnemonic=&Help
-FileChooser.directoryOpenButton.textAndMnemonic=&Open
+FileChooser.directoryOpenButton.textAndMnemonic=Open
 
 # File Size Units
 FileChooser.fileSizeKiloBytes={0} KB
--- a/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_de.properties	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_de.properties	Wed Jun 03 18:11:45 2015 -0700
@@ -42,13 +42,13 @@
 FileChooser.renameErrorFileExists.textAndMnemonic={0} kann nicht umbenannt werden: Es ist bereits eine Datei mit dem angegebenen Namen vorhanden. Geben Sie einen anderen Dateinamen an. 
 FileChooser.acceptAllFileFilter.textAndMnemonic=Alle Dateien
 FileChooser.cancelButton.textAndMnemonic=Abbrechen
-FileChooser.saveButton.textAndMnemonic=&Speichern
-FileChooser.openButton.textAndMnemonic=\u00D6&ffnen
+FileChooser.saveButton.textAndMnemonic=Speichern
+FileChooser.openButton.textAndMnemonic=\u00D6ffnen
 FileChooser.saveDialogTitle.textAndMnemonic=Speichern
 FileChooser.openDialogTitle.textAndMnemonic=\u00D6ffnen
 FileChooser.updateButton.textAndMnemonic=A&ktualisieren
 FileChooser.helpButton.textAndMnemonic=&Hilfe
-FileChooser.directoryOpenButton.textAndMnemonic=\u00D6&ffnen
+FileChooser.directoryOpenButton.textAndMnemonic=\u00D6ffnen
 
 # File Size Units
 FileChooser.fileSizeKiloBytes={0} KB
--- a/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_es.properties	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_es.properties	Wed Jun 03 18:11:45 2015 -0700
@@ -42,13 +42,13 @@
 FileChooser.renameErrorFileExists.textAndMnemonic=No se puede cambiar el nombre de {0}: ya existe un archivo con el nombre especificado. Especifique otro nombre de archivo. 
 FileChooser.acceptAllFileFilter.textAndMnemonic=Todos los Archivos
 FileChooser.cancelButton.textAndMnemonic=Cancelar
-FileChooser.saveButton.textAndMnemonic=&Guardar
-FileChooser.openButton.textAndMnemonic=&Abrir
+FileChooser.saveButton.textAndMnemonic=Guardar
+FileChooser.openButton.textAndMnemonic=Abrir
 FileChooser.saveDialogTitle.textAndMnemonic=Guardar
 FileChooser.openDialogTitle.textAndMnemonic=Abrir
 FileChooser.updateButton.textAndMnemonic=Act&ualizar
 FileChooser.helpButton.textAndMnemonic=A&yuda
-FileChooser.directoryOpenButton.textAndMnemonic=&Abrir
+FileChooser.directoryOpenButton.textAndMnemonic=Abrir
 
 # File Size Units
 FileChooser.fileSizeKiloBytes={0} KB
--- a/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_fr.properties	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_fr.properties	Wed Jun 03 18:11:45 2015 -0700
@@ -42,13 +42,13 @@
 FileChooser.renameErrorFileExists.textAndMnemonic=Impossible de renommer {0} : il existe d\u00E9j\u00E0 un fichier portant le nom indiqu\u00E9. Indiquez-en un autre. 
 FileChooser.acceptAllFileFilter.textAndMnemonic=Tous les fichiers
 FileChooser.cancelButton.textAndMnemonic=Annuler
-FileChooser.saveButton.textAndMnemonic=Enregi&strer
-FileChooser.openButton.textAndMnemonic=&Ouvrir
+FileChooser.saveButton.textAndMnemonic=Enregistrer
+FileChooser.openButton.textAndMnemonic=Ouvrir
 FileChooser.saveDialogTitle.textAndMnemonic=Enregistrer
 FileChooser.openDialogTitle.textAndMnemonic=Ouvrir
 FileChooser.updateButton.textAndMnemonic=Mettre \u00E0 jo&ur
 FileChooser.helpButton.textAndMnemonic=&Aide
-FileChooser.directoryOpenButton.textAndMnemonic=&Ouvrir
+FileChooser.directoryOpenButton.textAndMnemonic=Ouvrir
 
 # File Size Units
 FileChooser.fileSizeKiloBytes={0} KB
--- a/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_it.properties	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_it.properties	Wed Jun 03 18:11:45 2015 -0700
@@ -42,13 +42,13 @@
 FileChooser.renameErrorFileExists.textAndMnemonic=Impossibile rinominare {0}: esiste gi\u00E0 un file con il nome specificato. Specificare un altro nome. 
 FileChooser.acceptAllFileFilter.textAndMnemonic=Tutti i file
 FileChooser.cancelButton.textAndMnemonic=Annulla
-FileChooser.saveButton.textAndMnemonic=Sal&va
-FileChooser.openButton.textAndMnemonic=&Apri
+FileChooser.saveButton.textAndMnemonic=Salva
+FileChooser.openButton.textAndMnemonic=Apri
 FileChooser.saveDialogTitle.textAndMnemonic=Salva
 FileChooser.openDialogTitle.textAndMnemonic=Apri
 FileChooser.updateButton.textAndMnemonic=Ag&giorna
 FileChooser.helpButton.textAndMnemonic=&?
-FileChooser.directoryOpenButton.textAndMnemonic=&Apri
+FileChooser.directoryOpenButton.textAndMnemonic=Apri
 
 # File Size Units
 FileChooser.fileSizeKiloBytes={0} KB
--- a/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_pt_BR.properties	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_pt_BR.properties	Wed Jun 03 18:11:45 2015 -0700
@@ -42,13 +42,13 @@
 FileChooser.renameErrorFileExists.textAndMnemonic=N\u00E3o \u00E9 poss\u00EDvel renomear {0}: Um arquivo com o nome especificado j\u00E1 existe. Especifique outro nome de arquivo.
 FileChooser.acceptAllFileFilter.textAndMnemonic=Todos os Arquivos
 FileChooser.cancelButton.textAndMnemonic=Cancelar
-FileChooser.saveButton.textAndMnemonic=&Salvar
-FileChooser.openButton.textAndMnemonic=A&brir
+FileChooser.saveButton.textAndMnemonic=Salvar
+FileChooser.openButton.textAndMnemonic=Abrir
 FileChooser.saveDialogTitle.textAndMnemonic=Salvar
 FileChooser.openDialogTitle.textAndMnemonic=Abrir
 FileChooser.updateButton.textAndMnemonic=At&ualizar
 FileChooser.helpButton.textAndMnemonic=Aj&uda
-FileChooser.directoryOpenButton.textAndMnemonic=A&brir
+FileChooser.directoryOpenButton.textAndMnemonic=Abrir
 
 # File Size Units
 FileChooser.fileSizeKiloBytes={0} KB
--- a/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_sv.properties	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_sv.properties	Wed Jun 03 18:11:45 2015 -0700
@@ -42,13 +42,13 @@
 FileChooser.renameErrorFileExists.textAndMnemonic=Kan inte namn\u00E4ndra {0}: En fil med angivet namn finns redan. Ange ett annat filnamn. 
 FileChooser.acceptAllFileFilter.textAndMnemonic=Alla filer
 FileChooser.cancelButton.textAndMnemonic=Avbryt
-FileChooser.saveButton.textAndMnemonic=&Spara
-FileChooser.openButton.textAndMnemonic=&\u00D6ppna
+FileChooser.saveButton.textAndMnemonic=Spara
+FileChooser.openButton.textAndMnemonic=\u00D6ppna
 FileChooser.saveDialogTitle.textAndMnemonic=Spara
 FileChooser.openDialogTitle.textAndMnemonic=\u00D6ppna
 FileChooser.updateButton.textAndMnemonic=Upp&datera
 FileChooser.helpButton.textAndMnemonic=&Hj\u00E4lp
-FileChooser.directoryOpenButton.textAndMnemonic=&\u00D6ppna
+FileChooser.directoryOpenButton.textAndMnemonic=\u00D6ppna
 
 # File Size Units
 FileChooser.fileSizeKiloBytes={0} KB
--- a/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/metal/resources/metal.properties	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/metal/resources/metal.properties	Wed Jun 03 18:11:45 2015 -0700
@@ -43,8 +43,6 @@
 FileChooser.fileTypeHeader.textAndMnemonic=Type
 FileChooser.fileDateHeader.textAndMnemonic=Modified
 FileChooser.fileAttrHeader.textAndMnemonic=Attributes
-FileChooser.saveButton.textAndMnemonic=Save
-FileChooser.openButton.textAndMnemonic=Open
 
 ############ Used by MetalTitlePane if rendering window decorations############
 MetalTitlePane.restore.titleAndMnemonic=&Restore
--- a/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_de.properties	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_de.properties	Wed Jun 03 18:11:45 2015 -0700
@@ -43,8 +43,6 @@
 FileChooser.fileTypeHeader.textAndMnemonic=Typ
 FileChooser.fileDateHeader.textAndMnemonic=Ge\u00E4ndert
 FileChooser.fileAttrHeader.textAndMnemonic=Attribute
-FileChooser.saveButton.textAndMnemonic=Speichern
-FileChooser.openButton.textAndMnemonic=\u00D6ffnen
 
 ############ Used by MetalTitlePane if rendering window decorations############
 MetalTitlePane.restore.titleAndMnemonic=&Wiederherstellen
--- a/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_es.properties	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_es.properties	Wed Jun 03 18:11:45 2015 -0700
@@ -43,8 +43,6 @@
 FileChooser.fileTypeHeader.textAndMnemonic=Tipo
 FileChooser.fileDateHeader.textAndMnemonic=Modificado
 FileChooser.fileAttrHeader.textAndMnemonic=Atributos
-FileChooser.saveButton.textAndMnemonic=Guardar
-FileChooser.openButton.textAndMnemonic=Abrir
 
 ############ Used by MetalTitlePane if rendering window decorations############
 MetalTitlePane.restore.titleAndMnemonic=&Restaurar
--- a/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_fr.properties	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_fr.properties	Wed Jun 03 18:11:45 2015 -0700
@@ -43,8 +43,6 @@
 FileChooser.fileTypeHeader.textAndMnemonic=Type
 FileChooser.fileDateHeader.textAndMnemonic=Modifi\u00E9
 FileChooser.fileAttrHeader.textAndMnemonic=Attributs
-FileChooser.saveButton.textAndMnemonic=Enregistrer
-FileChooser.openButton.textAndMnemonic=Ouvrir
 
 ############ Used by MetalTitlePane if rendering window decorations############
 MetalTitlePane.restore.titleAndMnemonic=&Restaurer
--- a/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_it.properties	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_it.properties	Wed Jun 03 18:11:45 2015 -0700
@@ -43,8 +43,6 @@
 FileChooser.fileTypeHeader.textAndMnemonic=Tipo
 FileChooser.fileDateHeader.textAndMnemonic=Modificato
 FileChooser.fileAttrHeader.textAndMnemonic=Attributi
-FileChooser.saveButton.textAndMnemonic=Salva
-FileChooser.openButton.textAndMnemonic=Apri
 
 ############ Used by MetalTitlePane if rendering window decorations############
 MetalTitlePane.restore.titleAndMnemonic=&Ripristina
--- a/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_ja.properties	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_ja.properties	Wed Jun 03 18:11:45 2015 -0700
@@ -43,8 +43,6 @@
 FileChooser.fileTypeHeader.textAndMnemonic=\u30BF\u30A4\u30D7
 FileChooser.fileDateHeader.textAndMnemonic=\u4FEE\u6B63\u65E5
 FileChooser.fileAttrHeader.textAndMnemonic=\u5C5E\u6027
-FileChooser.saveButton.textAndMnemonic=\u4FDD\u5B58
-FileChooser.openButton.textAndMnemonic=\u958B\u304F
 
 ############ Used by MetalTitlePane if rendering window decorations############
 MetalTitlePane.restore.titleAndMnemonic=\u5FA9\u5143(&R)
--- a/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_ko.properties	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_ko.properties	Wed Jun 03 18:11:45 2015 -0700
@@ -43,8 +43,6 @@
 FileChooser.fileTypeHeader.textAndMnemonic=\uC720\uD615
 FileChooser.fileDateHeader.textAndMnemonic=\uC218\uC815 \uB0A0\uC9DC
 FileChooser.fileAttrHeader.textAndMnemonic=\uC18D\uC131
-FileChooser.saveButton.textAndMnemonic=\uC800\uC7A5
-FileChooser.openButton.textAndMnemonic=\uC5F4\uAE30
 
 ############ Used by MetalTitlePane if rendering window decorations############
 MetalTitlePane.restore.titleAndMnemonic=\uBCF5\uC6D0(&R)
--- a/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_pt_BR.properties	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_pt_BR.properties	Wed Jun 03 18:11:45 2015 -0700
@@ -43,8 +43,6 @@
 FileChooser.fileTypeHeader.textAndMnemonic=Tipo
 FileChooser.fileDateHeader.textAndMnemonic=Modificado
 FileChooser.fileAttrHeader.textAndMnemonic=Atributos
-FileChooser.saveButton.textAndMnemonic=Salvar
-FileChooser.openButton.textAndMnemonic=Abrir
 
 ############ Used by MetalTitlePane if rendering window decorations############
 MetalTitlePane.restore.titleAndMnemonic=&Restaurar
--- a/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_sv.properties	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_sv.properties	Wed Jun 03 18:11:45 2015 -0700
@@ -43,8 +43,6 @@
 FileChooser.fileTypeHeader.textAndMnemonic=Typ
 FileChooser.fileDateHeader.textAndMnemonic=\u00C4ndrad
 FileChooser.fileAttrHeader.textAndMnemonic=Attribut
-FileChooser.saveButton.textAndMnemonic=Spara
-FileChooser.openButton.textAndMnemonic=\u00D6ppna
 
 ############ Used by MetalTitlePane if rendering window decorations############
 MetalTitlePane.restore.titleAndMnemonic=&\u00C5terst\u00E4ll
--- a/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_zh_CN.properties	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_zh_CN.properties	Wed Jun 03 18:11:45 2015 -0700
@@ -43,8 +43,6 @@
 FileChooser.fileTypeHeader.textAndMnemonic=\u7C7B\u578B
 FileChooser.fileDateHeader.textAndMnemonic=\u4FEE\u6539\u65E5\u671F
 FileChooser.fileAttrHeader.textAndMnemonic=\u5C5E\u6027
-FileChooser.saveButton.textAndMnemonic=\u4FDD\u5B58
-FileChooser.openButton.textAndMnemonic=\u6253\u5F00
 
 ############ Used by MetalTitlePane if rendering window decorations############
 MetalTitlePane.restore.titleAndMnemonic=\u8FD8\u539F(&R)
--- a/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_zh_TW.properties	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_zh_TW.properties	Wed Jun 03 18:11:45 2015 -0700
@@ -43,8 +43,6 @@
 FileChooser.fileTypeHeader.textAndMnemonic=\u985E\u578B
 FileChooser.fileDateHeader.textAndMnemonic=\u4FEE\u6539\u65E5\u671F
 FileChooser.fileAttrHeader.textAndMnemonic=\u5C6C\u6027
-FileChooser.saveButton.textAndMnemonic=\u5132\u5B58
-FileChooser.openButton.textAndMnemonic=\u958B\u555F
 
 ############ Used by MetalTitlePane if rendering window decorations############
 MetalTitlePane.restore.titleAndMnemonic=\u56DE\u5FA9(&R)
--- a/jdk/src/java.desktop/share/classes/java/awt/Component.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/java/awt/Component.java	Wed Jun 03 18:11:45 2015 -0700
@@ -1312,6 +1312,25 @@
     }
 
     /**
+     * Determines the bounds of a visible part of the component relative to its
+     * parent.
+     *
+     * @return the visible part of bounds
+     */
+    private Rectangle getRecursivelyVisibleBounds() {
+        final Component container = getContainer();
+        final Rectangle bounds = getBounds();
+        if (container == null) {
+            // we are top level window or haven't a container, return our bounds
+            return bounds;
+        }
+        // translate the container's bounds to our coordinate space
+        final Rectangle parentsBounds = container.getRecursivelyVisibleBounds();
+        parentsBounds.setLocation(0, 0);
+        return parentsBounds.intersection(bounds);
+    }
+
+    /**
      * Translates absolute coordinates into coordinates in the coordinate
      * space of this component.
      */
@@ -1487,7 +1506,7 @@
                 ComponentPeer peer = this.peer;
                 if (peer != null) {
                     peer.setEnabled(true);
-                    if (visible) {
+                    if (visible && !getRecursivelyVisibleBounds().isEmpty()) {
                         updateCursorImmediately();
                     }
                 }
@@ -1541,7 +1560,7 @@
                 ComponentPeer peer = this.peer;
                 if (peer != null) {
                     peer.setEnabled(false);
-                    if (visible) {
+                    if (visible && !getRecursivelyVisibleBounds().isEmpty()) {
                         updateCursorImmediately();
                     }
                 }
--- a/jdk/src/java.desktop/share/classes/java/awt/Container.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/java/awt/Container.java	Wed Jun 03 18:11:45 2015 -0700
@@ -44,6 +44,7 @@
 import java.lang.ref.WeakReference;
 import java.security.AccessController;
 
+import java.util.ArrayList;
 import java.util.EventListener;
 import java.util.HashSet;
 import java.util.Set;
@@ -100,7 +101,7 @@
      * @see #add
      * @see #getComponents
      */
-    private java.util.List<Component> component = new java.util.ArrayList<Component>();
+    private java.util.List<Component> component = new ArrayList<>();
 
     /**
      * Layout manager for this container.
@@ -2568,28 +2569,24 @@
         if (!contains(x, y)) {
             return null;
         }
+        Component lightweight = null;
         synchronized (getTreeLock()) {
-            // Two passes: see comment in sun.awt.SunGraphicsCallback
-            for (int i = 0; i < component.size(); i++) {
-                Component comp = component.get(i);
-                if (comp != null &&
-                    !(comp.peer instanceof LightweightPeer)) {
-                    if (comp.contains(x - comp.x, y - comp.y)) {
+            // Optimized version of two passes:
+            // see comment in sun.awt.SunGraphicsCallback
+            for (final Component comp : component) {
+                if (comp.contains(x - comp.x, y - comp.y)) {
+                    if (!comp.isLightweight()) {
+                        // return heavyweight component as soon as possible
                         return comp;
                     }
-                }
-            }
-            for (int i = 0; i < component.size(); i++) {
-                Component comp = component.get(i);
-                if (comp != null &&
-                    comp.peer instanceof LightweightPeer) {
-                    if (comp.contains(x - comp.x, y - comp.y)) {
-                        return comp;
+                    if (lightweight == null) {
+                        // save and return later the first lightweight component
+                        lightweight = comp;
                     }
                 }
             }
         }
-        return this;
+        return lightweight != null ? lightweight : this;
     }
 
     /**
@@ -2693,52 +2690,54 @@
         return null;
     }
 
-    final Component findComponentAtImpl(int x, int y, boolean ignoreEnabled){
-        checkTreeLock();
+    final Component findComponentAtImpl(int x, int y, boolean ignoreEnabled) {
+        // checkTreeLock(); commented for a performance reason
 
         if (!(contains(x, y) && visible && (ignoreEnabled || enabled))) {
             return null;
         }
-
-        // Two passes: see comment in sun.awt.SunGraphicsCallback
-        for (int i = 0; i < component.size(); i++) {
-            Component comp = component.get(i);
-            if (comp != null &&
-                !(comp.peer instanceof LightweightPeer)) {
-                if (comp instanceof Container) {
-                    comp = ((Container)comp).findComponentAtImpl(x - comp.x,
-                                                                 y - comp.y,
-                                                                 ignoreEnabled);
-                } else {
-                    comp = comp.getComponentAt(x - comp.x, y - comp.y);
+        Component lightweight = null;
+        // Optimized version of two passes:
+        // see comment in sun.awt.SunGraphicsCallback
+        for (final Component comp : component) {
+            final int x1 = x - comp.x;
+            final int y1 = y - comp.y;
+            if (!comp.contains(x1, y1)) {
+                continue; // fast path
+            }
+            if (!comp.isLightweight()) {
+                final Component child = getChildAt(comp, x1, y1, ignoreEnabled);
+                if (child != null) {
+                    // return heavyweight component as soon as possible
+                    return child;
                 }
-                if (comp != null && comp.visible &&
-                    (ignoreEnabled || comp.enabled))
-                {
-                    return comp;
+            } else {
+                if (lightweight == null) {
+                    // save and return later the first lightweight component
+                    lightweight = getChildAt(comp, x1, y1, ignoreEnabled);
                 }
             }
         }
-        for (int i = 0; i < component.size(); i++) {
-            Component comp = component.get(i);
-            if (comp != null &&
-                comp.peer instanceof LightweightPeer) {
-                if (comp instanceof Container) {
-                    comp = ((Container)comp).findComponentAtImpl(x - comp.x,
-                                                                 y - comp.y,
-                                                                 ignoreEnabled);
-                } else {
-                    comp = comp.getComponentAt(x - comp.x, y - comp.y);
-                }
-                if (comp != null && comp.visible &&
-                    (ignoreEnabled || comp.enabled))
-                {
-                    return comp;
-                }
-            }
+        return lightweight != null ? lightweight : this;
+    }
+
+    /**
+     * Helper method for findComponentAtImpl. Finds a child component using
+     * findComponentAtImpl for Container and getComponentAt for Component.
+     */
+    private static Component getChildAt(Component comp, int x, int y,
+                                        boolean ignoreEnabled) {
+        if (comp instanceof Container) {
+            comp = ((Container) comp).findComponentAtImpl(x, y,
+                                                          ignoreEnabled);
+        } else {
+            comp = comp.getComponentAt(x, y);
         }
-
-        return this;
+        if (comp != null && comp.visible &&
+                (ignoreEnabled || comp.enabled)) {
+            return comp;
+        }
+        return null;
     }
 
     /**
@@ -4420,6 +4419,18 @@
 
     private static final PlatformLogger eventLog = PlatformLogger.getLogger("java.awt.event.LightweightDispatcher");
 
+    private static final int BUTTONS_DOWN_MASK;
+
+    static {
+        int[] buttonsDownMask = AWTAccessor.getInputEventAccessor().
+                getButtonDownMasks();
+        int mask = 0;
+        for (int buttonDownMask : buttonsDownMask) {
+            mask |= buttonDownMask;
+        }
+        BUTTONS_DOWN_MASK = mask;
+    }
+
     LightweightDispatcher(Container nativeContainer) {
         this.nativeContainer = nativeContainer;
         mouseEventTarget = new WeakReference<>(null);
@@ -4488,25 +4499,12 @@
     private boolean isMouseGrab(MouseEvent e) {
         int modifiers = e.getModifiersEx();
 
-        if(e.getID() == MouseEvent.MOUSE_PRESSED
-            || e.getID() == MouseEvent.MOUSE_RELEASED)
-        {
-            switch (e.getButton()) {
-            case MouseEvent.BUTTON1:
-                modifiers ^= InputEvent.BUTTON1_DOWN_MASK;
-                break;
-            case MouseEvent.BUTTON2:
-                modifiers ^= InputEvent.BUTTON2_DOWN_MASK;
-                break;
-            case MouseEvent.BUTTON3:
-                modifiers ^= InputEvent.BUTTON3_DOWN_MASK;
-                break;
-            }
+        if (e.getID() == MouseEvent.MOUSE_PRESSED
+                || e.getID() == MouseEvent.MOUSE_RELEASED) {
+            modifiers ^= InputEvent.getMaskForButton(e.getButton());
         }
         /* modifiers now as just before event */
-        return ((modifiers & (InputEvent.BUTTON1_DOWN_MASK
-                              | InputEvent.BUTTON2_DOWN_MASK
-                              | InputEvent.BUTTON3_DOWN_MASK)) != 0);
+        return ((modifiers & BUTTONS_DOWN_MASK) != 0);
     }
 
     /**
--- a/jdk/src/java.desktop/share/classes/java/awt/Menu.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/java/awt/Menu.java	Wed Jun 03 18:11:45 2015 -0700
@@ -413,9 +413,9 @@
             items.removeElementAt(index);
             MenuPeer peer = (MenuPeer)this.peer;
             if (peer != null) {
+                peer.delItem(index);
                 mi.removeNotify();
                 mi.parent = null;
-                peer.delItem(index);
             }
         }
     }
--- a/jdk/src/java.desktop/share/classes/java/awt/MenuBar.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/java/awt/MenuBar.java	Wed Jun 03 18:11:45 2015 -0700
@@ -222,7 +222,6 @@
             if (m.parent != null) {
                 m.parent.remove(m);
             }
-            menus.addElement(m);
             m.parent = this;
 
             MenuBarPeer peer = (MenuBarPeer)this.peer;
@@ -232,6 +231,7 @@
                 }
                 peer.addMenu(m);
             }
+            menus.addElement(m);
             return m;
         }
     }
@@ -248,9 +248,9 @@
             menus.removeElementAt(index);
             MenuBarPeer peer = (MenuBarPeer)this.peer;
             if (peer != null) {
+                peer.delMenu(index);
                 m.removeNotify();
                 m.parent = null;
-                peer.delMenu(index);
             }
             if (helpMenu == m) {
                 helpMenu = null;
--- a/jdk/src/java.desktop/share/classes/java/awt/MenuComponent.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/java/awt/MenuComponent.java	Wed Jun 03 18:11:45 2015 -0700
@@ -77,7 +77,7 @@
      * @see #setFont(Font)
      * @see #getFont()
      */
-    Font font;
+    volatile Font font;
 
     /**
      * The menu component's name, which defaults to <code>null</code>.
@@ -302,11 +302,13 @@
      * @see       java.awt.font.TextAttribute
      */
     public void setFont(Font f) {
-        font = f;
-        //Fixed 6312943: NullPointerException in method MenuComponent.setFont(Font)
-        MenuComponentPeer peer = this.peer;
-        if (peer != null) {
-            peer.setFont(f);
+        synchronized (getTreeLock()) {
+            font = f;
+            //Fixed 6312943: NullPointerException in method MenuComponent.setFont(Font)
+            MenuComponentPeer peer = this.peer;
+            if (peer != null) {
+                peer.setFont(f);
+            }
         }
     }
 
--- a/jdk/src/java.desktop/share/classes/java/awt/WaitDispatchSupport.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/java/awt/WaitDispatchSupport.java	Wed Jun 03 18:11:45 2015 -0700
@@ -65,6 +65,7 @@
 
     private AtomicBoolean keepBlockingEDT = new AtomicBoolean(false);
     private AtomicBoolean keepBlockingCT = new AtomicBoolean(false);
+    private AtomicBoolean afterExit = new AtomicBoolean(false);
 
     private static synchronized void initializeTimer() {
         if (timer == null) {
@@ -114,7 +115,7 @@
                 }
                 boolean extEvaluate =
                     (extCondition != null) ? extCondition.evaluate() : true;
-                if (!keepBlockingEDT.get() || !extEvaluate) {
+                if (!keepBlockingEDT.get() || !extEvaluate || afterExit.get()) {
                     if (timerTask != null) {
                         timerTask.cancel();
                         timerTask = null;
@@ -174,110 +175,116 @@
             log.fine("The secondary loop is already running, aborting");
             return false;
         }
+        try {
+            if (afterExit.get()) {
+                log.fine("Exit was called already, aborting");
+                return false;
+            }
 
-        final Runnable run = new Runnable() {
-            public void run() {
-                log.fine("Starting a new event pump");
-                if (filter == null) {
-                    dispatchThread.pumpEvents(condition);
-                } else {
-                    dispatchThread.pumpEventsForFilter(condition, filter);
+            final Runnable run = new Runnable() {
+                public void run() {
+                    log.fine("Starting a new event pump");
+                    if (filter == null) {
+                        dispatchThread.pumpEvents(condition);
+                    } else {
+                        dispatchThread.pumpEventsForFilter(condition, filter);
+                    }
+                }
+            };
+
+            // We have two mechanisms for blocking: if we're on the
+            // dispatch thread, start a new event pump; if we're
+            // on any other thread, call wait() on the treelock
+
+            Thread currentThread = Thread.currentThread();
+            if (currentThread == dispatchThread) {
+                if (log.isLoggable(PlatformLogger.Level.FINEST)) {
+                    log.finest("On dispatch thread: " + dispatchThread);
+                }
+                if (interval != 0) {
+                    if (log.isLoggable(PlatformLogger.Level.FINEST)) {
+                        log.finest("scheduling the timer for " + interval + " ms");
+                    }
+                    timer.schedule(timerTask = new TimerTask() {
+                        @Override
+                        public void run() {
+                            if (keepBlockingEDT.compareAndSet(true, false)) {
+                                wakeupEDT();
+                            }
+                        }
+                    }, interval);
+                }
+                // Dispose SequencedEvent we are dispatching on the current
+                // AppContext, to prevent us from hang - see 4531693 for details
+                SequencedEvent currentSE = KeyboardFocusManager.
+                        getCurrentKeyboardFocusManager().getCurrentSequencedEvent();
+                if (currentSE != null) {
+                    if (log.isLoggable(PlatformLogger.Level.FINE)) {
+                        log.fine("Dispose current SequencedEvent: " + currentSE);
+                    }
+                    currentSE.dispose();
+                }
+                // In case the exit() method is called before starting
+                // new event pump it will post the waking event to EDT.
+                // The event will be handled after the new event pump
+                // starts. Thus, the enter() method will not hang.
+                //
+                // Event pump should be privileged. See 6300270.
+                AccessController.doPrivileged(new PrivilegedAction<Void>() {
+                    public Void run() {
+                        run.run();
+                        return null;
+                    }
+                });
+            } else {
+                if (log.isLoggable(PlatformLogger.Level.FINEST)) {
+                    log.finest("On non-dispatch thread: " + currentThread);
+                }
+                keepBlockingCT.set(true);
+                synchronized (getTreeLock()) {
+                    if (afterExit.get()) return false;
+                    if (filter != null) {
+                        dispatchThread.addEventFilter(filter);
+                    }
+                    try {
+                        EventQueue eq = dispatchThread.getEventQueue();
+                        eq.postEvent(new PeerEvent(this, run, PeerEvent.PRIORITY_EVENT));
+                        if (interval > 0) {
+                            long currTime = System.currentTimeMillis();
+                            while (keepBlockingCT.get() &&
+                                    ((extCondition != null) ? extCondition.evaluate() : true) &&
+                                    (currTime + interval > System.currentTimeMillis()))
+                            {
+                                getTreeLock().wait(interval);
+                            }
+                        } else {
+                            while (keepBlockingCT.get() &&
+                                    ((extCondition != null) ? extCondition.evaluate() : true))
+                            {
+                                getTreeLock().wait();
+                            }
+                        }
+                        if (log.isLoggable(PlatformLogger.Level.FINE)) {
+                            log.fine("waitDone " + keepBlockingEDT.get() + " " + keepBlockingCT.get());
+                        }
+                    } catch (InterruptedException e) {
+                        if (log.isLoggable(PlatformLogger.Level.FINE)) {
+                            log.fine("Exception caught while waiting: " + e);
+                        }
+                    } finally {
+                        if (filter != null) {
+                            dispatchThread.removeEventFilter(filter);
+                        }
+                    }
                 }
             }
-        };
-
-        // We have two mechanisms for blocking: if we're on the
-        // dispatch thread, start a new event pump; if we're
-        // on any other thread, call wait() on the treelock
-
-        Thread currentThread = Thread.currentThread();
-        if (currentThread == dispatchThread) {
-            if (log.isLoggable(PlatformLogger.Level.FINEST)) {
-                log.finest("On dispatch thread: " + dispatchThread);
-            }
-            if (interval != 0) {
-                if (log.isLoggable(PlatformLogger.Level.FINEST)) {
-                    log.finest("scheduling the timer for " + interval + " ms");
-                }
-                timer.schedule(timerTask = new TimerTask() {
-                    @Override
-                    public void run() {
-                        if (keepBlockingEDT.compareAndSet(true, false)) {
-                            wakeupEDT();
-                        }
-                    }
-                }, interval);
-            }
-            // Dispose SequencedEvent we are dispatching on the current
-            // AppContext, to prevent us from hang - see 4531693 for details
-            SequencedEvent currentSE = KeyboardFocusManager.
-                getCurrentKeyboardFocusManager().getCurrentSequencedEvent();
-            if (currentSE != null) {
-                if (log.isLoggable(PlatformLogger.Level.FINE)) {
-                    log.fine("Dispose current SequencedEvent: " + currentSE);
-                }
-                currentSE.dispose();
-            }
-            // In case the exit() method is called before starting
-            // new event pump it will post the waking event to EDT.
-            // The event will be handled after the new event pump
-            // starts. Thus, the enter() method will not hang.
-            //
-            // Event pump should be privileged. See 6300270.
-            AccessController.doPrivileged(new PrivilegedAction<Void>() {
-                public Void run() {
-                    run.run();
-                    return null;
-                }
-            });
-        } else {
-            if (log.isLoggable(PlatformLogger.Level.FINEST)) {
-                log.finest("On non-dispatch thread: " + currentThread);
-            }
-            synchronized (getTreeLock()) {
-                if (filter != null) {
-                    dispatchThread.addEventFilter(filter);
-                }
-                try {
-                    EventQueue eq = dispatchThread.getEventQueue();
-                    eq.postEvent(new PeerEvent(this, run, PeerEvent.PRIORITY_EVENT));
-                    keepBlockingCT.set(true);
-                    if (interval > 0) {
-                        long currTime = System.currentTimeMillis();
-                        while (keepBlockingCT.get() &&
-                               ((extCondition != null) ? extCondition.evaluate() : true) &&
-                               (currTime + interval > System.currentTimeMillis()))
-                        {
-                            getTreeLock().wait(interval);
-                        }
-                    } else {
-                        while (keepBlockingCT.get() &&
-                               ((extCondition != null) ? extCondition.evaluate() : true))
-                        {
-                            getTreeLock().wait();
-                        }
-                    }
-                    if (log.isLoggable(PlatformLogger.Level.FINE)) {
-                        log.fine("waitDone " + keepBlockingEDT.get() + " " + keepBlockingCT.get());
-                    }
-                } catch (InterruptedException e) {
-                    if (log.isLoggable(PlatformLogger.Level.FINE)) {
-                        log.fine("Exception caught while waiting: " + e);
-                    }
-                } finally {
-                    if (filter != null) {
-                        dispatchThread.removeEventFilter(filter);
-                    }
-                }
-                // If the waiting process has been stopped because of the
-                // time interval passed or an exception occurred, the state
-                // should be changed
-                keepBlockingEDT.set(false);
-                keepBlockingCT.set(false);
-            }
+            return true;
         }
-
-        return true;
+        finally {
+            keepBlockingEDT.set(false);
+            keepBlockingCT.set(false);
+            afterExit.set(false);
+        }
     }
 
     /**
@@ -288,7 +295,8 @@
             log.fine("exit(): blockingEDT=" + keepBlockingEDT.get() +
                      ", blockingCT=" + keepBlockingCT.get());
         }
-        if (keepBlockingEDT.compareAndSet(true, false)) {
+        afterExit.set(true);
+        if (keepBlockingEDT.getAndSet(false)) {
             wakeupEDT();
             return true;
         }
--- a/jdk/src/java.desktop/share/classes/java/awt/font/OpenType.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/java/awt/font/OpenType.java	Wed Jun 03 18:11:45 2015 -0700
@@ -331,7 +331,7 @@
    * Optical bounds.  Table tag "opbd" in the Open
    * Type Specification.
    */
-  public final static int       TAG_OPBD        = 0x6d6f7274;
+  public final static int       TAG_OPBD        = 0x6F706264;
 
   /**
    * Glyph properties.  Table tag "prop" in the Open
--- a/jdk/src/java.desktop/share/classes/javax/swing/GroupLayout.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/javax/swing/GroupLayout.java	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, 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
@@ -218,6 +218,9 @@
 
     private static final int UNSET = Integer.MIN_VALUE;
 
+    // Maximum spring size constrain to avoid integer overflow
+    private static final int INFINITE = Integer.MAX_VALUE >> 1;
+
     /**
      * Indicates the size from the component or gap should be used for a
      * particular range value.
@@ -1389,7 +1392,7 @@
         }
 
         int constrain(int value) {
-            return Math.min(value, Short.MAX_VALUE);
+            return Math.min(value, INFINITE);
         }
 
         int getBaseline() {
--- a/jdk/src/java.desktop/share/classes/javax/swing/JApplet.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JApplet.java	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -24,14 +24,18 @@
  */
 package javax.swing;
 
-import java.awt.*;
-import java.awt.event.*;
 import java.applet.Applet;
-import java.beans.PropertyChangeListener;
-import java.util.Locale;
-import java.util.Vector;
-import java.io.Serializable;
-import javax.accessibility.*;
+import java.awt.AWTEvent;
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Container;
+import java.awt.Graphics;
+import java.awt.HeadlessException;
+import java.awt.LayoutManager;
+
+import javax.accessibility.Accessible;
+import javax.accessibility.AccessibleContext;
 
 /**
  * An extended version of <code>java.applet.Applet</code> that adds support for
@@ -243,9 +247,8 @@
     *      hidden: true
     * description: The menubar for accessing pulldown menus from this applet.
     */
-    @SuppressWarnings("deprecation")
-    public void setJMenuBar(JMenuBar menuBar) {
-        getRootPane().setMenuBar(menuBar);
+    public void setJMenuBar(final JMenuBar menuBar) {
+        getRootPane().setJMenuBar(menuBar);
     }
 
    /**
@@ -254,9 +257,8 @@
     * @return the menubar set on this applet
     * @see #setJMenuBar
     */
-    @SuppressWarnings("deprecation")
     public JMenuBar getJMenuBar() {
-        return getRootPane().getMenuBar();
+        return getRootPane().getJMenuBar();
     }
 
 
--- a/jdk/src/java.desktop/share/classes/javax/swing/JDialog.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JDialog.java	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -849,9 +849,8 @@
     *      hidden: true
     * description: The menubar for accessing pulldown menus from this dialog.
     */
-    @SuppressWarnings("deprecation")
-    public void setJMenuBar(JMenuBar menu) {
-        getRootPane().setMenuBar(menu);
+    public void setJMenuBar(final JMenuBar menu) {
+        getRootPane().setJMenuBar(menu);
     }
 
    /**
@@ -860,12 +859,10 @@
     * @return the menubar set on this dialog
     * @see #setJMenuBar
     */
-    @SuppressWarnings("deprecation")
     public JMenuBar getJMenuBar() {
-        return getRootPane().getMenuBar();
+        return getRootPane().getJMenuBar();
     }
 
-
     /**
      * Returns whether calls to {@code add} and
      * {@code setLayout} are forwarded to the {@code contentPane}.
--- a/jdk/src/java.desktop/share/classes/javax/swing/JFrame.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JFrame.java	Wed Jun 03 18:11:45 2015 -0700
@@ -486,9 +486,8 @@
     *      hidden: true
     * description: The menubar for accessing pulldown menus from this frame.
     */
-    @SuppressWarnings("deprecation")
-    public void setJMenuBar(JMenuBar menubar) {
-        getRootPane().setMenuBar(menubar);
+    public void setJMenuBar(final JMenuBar menubar) {
+        getRootPane().setJMenuBar(menubar);
     }
 
    /**
@@ -497,9 +496,8 @@
     *
     * @see #setJMenuBar
     */
-    @SuppressWarnings("deprecation")
     public JMenuBar getJMenuBar() {
-        return getRootPane().getMenuBar();
+        return getRootPane().getJMenuBar();
     }
 
     /**
--- a/jdk/src/java.desktop/share/classes/javax/swing/JSpinner.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JSpinner.java	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015, 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,8 +42,6 @@
 import javax.accessibility.*;
 import sun.util.locale.provider.LocaleProviderAdapter;
 import sun.util.locale.provider.LocaleResources;
-import sun.util.locale.provider.LocaleServiceProviderPool;
-
 
 /**
  * A single line input field that lets the user select a
@@ -77,12 +75,12 @@
  *   try {
  *       spinner.commitEdit();
  *   }
- *   catch (ParseException pe) {{
+ *   catch (ParseException pe) {
  *       // Edited value is invalid, spinner.getValue() will return
  *       // the last valid value, you could revert the spinner to show that:
- *       JComponent editor = spinner.getEditor()
+ *       JComponent editor = spinner.getEditor();
  *       if (editor instanceof DefaultEditor) {
- *           ((DefaultEditor)editor).getTextField().setValue(spinner.getValue();
+ *           ((DefaultEditor)editor).getTextField().setValue(spinner.getValue());
  *       }
  *       // reset the value to some known value:
  *       spinner.setValue(fallbackValue);
@@ -972,7 +970,7 @@
          * and editing the value of a <code>SpinnerDateModel</code>
          * with a <code>JFormattedTextField</code>.  <code>This</code>
          * <code>DateEditor</code> becomes both a <code>ChangeListener</code>
-         * on the spinners model and a <code>PropertyChangeListener</code>
+         * on the spinner and a <code>PropertyChangeListener</code>
          * on the new <code>JFormattedTextField</code>.
          *
          * @param spinner the spinner whose model <code>this</code> editor will monitor
--- a/jdk/src/java.desktop/share/classes/javax/swing/RepaintManager.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/javax/swing/RepaintManager.java	Wed Jun 03 18:11:45 2015 -0700
@@ -182,9 +182,16 @@
      */
     private final ProcessingRunnable processingRunnable;
 
-    private final static JavaSecurityAccess javaSecurityAccess =
-        SharedSecrets.getJavaSecurityAccess();
+    private static final JavaSecurityAccess javaSecurityAccess =
+            SharedSecrets.getJavaSecurityAccess();
 
+    /**
+     * Listener installed to detect display changes. When display changes,
+     * schedules a callback to notify all RepaintManagers of the display
+     * changes.
+     */
+    private static final DisplayChangedListener displayChangedHandler =
+            new DisplayChangedHandler();
 
     static {
         SwingAccessor.setRepaintManagerAccessor(new SwingAccessor.RepaintManagerAccessor() {
@@ -226,8 +233,8 @@
         GraphicsEnvironment ge = GraphicsEnvironment.
                 getLocalGraphicsEnvironment();
         if (ge instanceof SunGraphicsEnvironment) {
-            ((SunGraphicsEnvironment)ge).addDisplayChangedListener(
-                    new DisplayChangedHandler());
+            ((SunGraphicsEnvironment) ge).addDisplayChangedListener(
+                    displayChangedHandler);
         }
         Toolkit tk = Toolkit.getDefaultToolkit();
         if ((tk instanceof SunToolkit)
@@ -1679,6 +1686,12 @@
      */
     private static final class DisplayChangedHandler implements
                                              DisplayChangedListener {
+        // Empty non private constructor was added because access to this
+        // class shouldn't be generated by the compiler using synthetic
+        // accessor method
+        DisplayChangedHandler() {
+        }
+
         public void displayChanged() {
             scheduleDisplayChanges();
         }
@@ -1686,11 +1699,10 @@
         public void paletteChanged() {
         }
 
-        private void scheduleDisplayChanges() {
+        private static void scheduleDisplayChanges() {
             // To avoid threading problems, we notify each RepaintManager
             // on the thread it was created on.
-            for (Object c : AppContext.getAppContexts()) {
-                AppContext context = (AppContext) c;
+            for (AppContext context : AppContext.getAppContexts()) {
                 synchronized(context) {
                     if (!context.isDisposed()) {
                         EventQueue eventQueue = (EventQueue)context.get(
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboBoxUI.java	Wed Jun 03 18:11:45 2015 -0700
@@ -150,6 +150,8 @@
      */
     protected KeyListener popupKeyListener;
 
+    private MouseWheelListener mouseWheelListener;
+
     // This is used for knowing when to cache the minimum preferred size.
     // If the data in the list changes, the cached value get marked for recalc.
     // Added to the current JComboBox model
@@ -413,6 +415,10 @@
                 comboBox.getModel().addListDataListener( listDataListener );
             }
         }
+
+        if ((mouseWheelListener = createMouseWheelListener()) != null) {
+            comboBox.addMouseWheelListener(mouseWheelListener);
+        }
     }
 
     /**
@@ -459,6 +465,9 @@
                 comboBox.getModel().removeListDataListener( listDataListener );
             }
         }
+        if (mouseWheelListener != null) {
+            comboBox.removeMouseWheelListener(mouseWheelListener);
+        }
     }
 
     /**
@@ -572,6 +581,10 @@
         return handler;
     }
 
+    private MouseWheelListener createMouseWheelListener() {
+        return getHandler();
+    }
+
     //
     // end UI Initialization
     //======================
@@ -1723,7 +1736,8 @@
     //
     private class Handler implements ActionListener, FocusListener,
                                      KeyListener, LayoutManager,
-                                     ListDataListener, PropertyChangeListener {
+                                     ListDataListener, PropertyChangeListener,
+                                     MouseWheelListener {
         //
         // PropertyChangeListener
         //
@@ -1997,21 +2011,25 @@
         public void actionPerformed(ActionEvent evt) {
             Object item = comboBox.getEditor().getItem();
             if (item != null) {
-             if(!comboBox.isPopupVisible() && !item.equals(comboBox.getSelectedItem())) {
-              comboBox.setSelectedItem(comboBox.getEditor().getItem());
-             }
-             ActionMap am = comboBox.getActionMap();
-             if (am != null) {
-                Action action = am.get("enterPressed");
-                if (action != null) {
-                    action.actionPerformed(new ActionEvent(comboBox, evt.getID(),
-                                           evt.getActionCommand(),
-                                           evt.getModifiers()));
+                if (!comboBox.isPopupVisible() && !item.equals(comboBox.getSelectedItem())) {
+                    comboBox.setSelectedItem(comboBox.getEditor().getItem());
+                }
+                ActionMap am = comboBox.getActionMap();
+                if (am != null) {
+                    Action action = am.get("enterPressed");
+                    if (action != null) {
+                        action.actionPerformed(new ActionEvent(comboBox, evt.getID(),
+                                evt.getActionCommand(),
+                                evt.getModifiers()));
+                    }
                 }
             }
-       }
+        }
+
+        public void mouseWheelMoved(MouseWheelEvent e) {
+            e.consume();
+        }
    }
-  }
 
     class DefaultKeySelectionManager implements JComboBox.KeySelectionManager, UIResource {
         private String prefix = "";
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboPopup.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboPopup.java	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, 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
@@ -184,6 +184,8 @@
      */
     protected ItemListener             itemListener;
 
+    private MouseWheelListener         scrollerMouseWheelListener;
+
     /**
      * This protected field is implementation specific. Do not access directly
      * or override.
@@ -311,6 +313,7 @@
         uninstallComboBoxModelListeners(comboBox.getModel());
         uninstallKeyboardActions();
         uninstallListListeners();
+        uninstallScrollerListeners();
         // We do this, otherwise the listener the ui installs on
         // the model (the combobox model in this case) will keep a
         // reference to the list, causing the list (and us) to never get gced.
@@ -608,6 +611,7 @@
         scroller.setFocusable( false );
         scroller.getVerticalScrollBar().setFocusable( false );
         scroller.setBorder( null );
+        installScrollerListeners();
     }
 
     /**
@@ -624,6 +628,20 @@
         setFocusable( false );
     }
 
+    private void installScrollerListeners() {
+        scrollerMouseWheelListener = getHandler();
+        if (scrollerMouseWheelListener != null) {
+            scroller.addMouseWheelListener(scrollerMouseWheelListener);
+        }
+    }
+
+    private void uninstallScrollerListeners() {
+        if (scrollerMouseWheelListener != null) {
+            scroller.removeMouseWheelListener(scrollerMouseWheelListener);
+            scrollerMouseWheelListener = null;
+        }
+    }
+
     /**
      * This method adds the necessary listeners to the JComboBox.
      */
@@ -835,8 +853,8 @@
 
 
     private class Handler implements ItemListener, MouseListener,
-                          MouseMotionListener, PropertyChangeListener,
-                          Serializable {
+                          MouseMotionListener, MouseWheelListener,
+                          PropertyChangeListener, Serializable {
         //
         // MouseListener
         // NOTE: this is added to both the JList and JComboBox
@@ -1024,6 +1042,13 @@
                 setListSelection(comboBox.getSelectedIndex());
             }
         }
+
+        //
+        // MouseWheelListener
+        //
+        public void mouseWheelMoved(MouseWheelEvent e) {
+            e.consume();
+        }
     }
 
     //
@@ -1287,11 +1312,24 @@
         else {
             screenBounds = new Rectangle(p, toolkit.getScreenSize());
         }
-
-        Rectangle rect = new Rectangle(px,py,pw,ph);
-        if (py+ph > screenBounds.y+screenBounds.height
-            && ph < screenBounds.height) {
-            rect.y = -rect.height;
+        int borderHeight = 0;
+        Border popupBorder = getBorder();
+        if (popupBorder != null) {
+            Insets borderInsets = popupBorder.getBorderInsets(this);
+            borderHeight = borderInsets.top + borderInsets.bottom;
+            screenBounds.width -= (borderInsets.left + borderInsets.right);
+            screenBounds.height -= borderHeight;
+        }
+        Rectangle rect = new Rectangle(px, py, pw, ph);
+        if (py + ph > screenBounds.y + screenBounds.height) {
+            if (ph <= -screenBounds.y - borderHeight) {
+                // popup goes above
+                rect.y = -ph - borderHeight;
+            } else {
+                // a full screen height popup
+                rect.y = screenBounds.y + Math.max(0, (screenBounds.height - ph) / 2 );
+                rect.height = Math.min(screenBounds.height, ph);
+            }
         }
         return rect;
     }
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicLabelUI.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicLabelUI.java	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -504,7 +504,7 @@
                 doPress(label);
             }
             else if (key == RELEASE) {
-                doRelease(label);
+                doRelease(label, e.getActionCommand() != null);
             }
         }
 
@@ -517,33 +517,77 @@
                     SwingUtilities.replaceUIInputMap(label, JComponent.WHEN_FOCUSED, inputMap);
                 }
                 int dka = label.getDisplayedMnemonic();
-                inputMap.put(KeyStroke.getKeyStroke(dka, BasicLookAndFeel.getFocusAcceleratorKeyMask(), true), RELEASE);
+                putOnRelease(inputMap, dka, BasicLookAndFeel
+                        .getFocusAcceleratorKeyMask());
                 // Need this when the sticky keys are enabled
-                inputMap.put(KeyStroke.getKeyStroke(dka, 0, true), RELEASE);
+                putOnRelease(inputMap, dka, 0);
                 // Need this if ALT is released before the accelerator
-                inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ALT, 0, true), RELEASE);
+                putOnRelease(inputMap, KeyEvent.VK_ALT, 0);
                 label.requestFocus();
             }
         }
 
-        private void doRelease(JLabel label) {
+        private void doRelease(JLabel label, boolean isCommand) {
             Component labelFor = label.getLabelFor();
             if (labelFor != null && labelFor.isEnabled()) {
-                InputMap inputMap = SwingUtilities.getUIInputMap(label, JComponent.WHEN_FOCUSED);
-                if (inputMap != null) {
-                    // inputMap should never be null.
+                if (label.hasFocus()) {
+                    InputMap inputMap = SwingUtilities.getUIInputMap(label,
+                            JComponent.WHEN_FOCUSED);
+                    if (inputMap != null) {
+                        // inputMap should never be null.
+                        int dka = label.getDisplayedMnemonic();
+                        removeOnRelease(inputMap, dka, BasicLookAndFeel
+                                .getFocusAcceleratorKeyMask());
+                        removeOnRelease(inputMap, dka, 0);
+                        removeOnRelease(inputMap, KeyEvent.VK_ALT, 0);
+                    }
+                    inputMap = SwingUtilities.getUIInputMap(label,
+                            JComponent.WHEN_IN_FOCUSED_WINDOW);
+                    if (inputMap == null) {
+                        inputMap = new InputMapUIResource();
+                        SwingUtilities.replaceUIInputMap(label,
+                                JComponent.WHEN_IN_FOCUSED_WINDOW, inputMap);
+                    }
                     int dka = label.getDisplayedMnemonic();
-                    inputMap.remove(KeyStroke.getKeyStroke(dka, BasicLookAndFeel.getFocusAcceleratorKeyMask(), true));
-                    inputMap.remove(KeyStroke.getKeyStroke(dka, 0, true));
-                    inputMap.remove(KeyStroke.getKeyStroke(KeyEvent.VK_ALT, 0, true));
-                }
-                if (labelFor instanceof Container &&
-                        ((Container) labelFor).isFocusCycleRoot()) {
-                    labelFor.requestFocus();
+                    if (isCommand) {
+                        putOnRelease(inputMap, KeyEvent.VK_ALT, 0);
+                    } else {
+                        putOnRelease(inputMap, dka, BasicLookAndFeel
+                                .getFocusAcceleratorKeyMask());
+                        // Need this when the sticky keys are enabled
+                        putOnRelease(inputMap, dka, 0);
+                    }
+                    if (labelFor instanceof Container &&
+                            ((Container) labelFor).isFocusCycleRoot()) {
+                        labelFor.requestFocus();
+                    } else {
+                        SwingUtilities2.compositeRequestFocus(labelFor);
+                    }
                 } else {
-                    SwingUtilities2.compositeRequestFocus(labelFor);
+                    InputMap inputMap = SwingUtilities.getUIInputMap(label,
+                            JComponent.WHEN_IN_FOCUSED_WINDOW);
+                    int dka = label.getDisplayedMnemonic();
+                    if (inputMap != null) {
+                        if (isCommand) {
+                            removeOnRelease(inputMap, dka, BasicLookAndFeel
+                                    .getFocusAcceleratorKeyMask());
+                            removeOnRelease(inputMap, dka, 0);
+                        } else {
+                            removeOnRelease(inputMap, KeyEvent.VK_ALT, 0);
+                        }
+                    }
                 }
             }
         }
+
+        private void putOnRelease(InputMap inputMap, int keyCode, int modifiers) {
+            inputMap.put(KeyStroke.getKeyStroke(keyCode, modifiers, true),
+                    RELEASE);
+        }
+
+        private void removeOnRelease(InputMap inputMap, int keyCode, int modifiers) {
+            inputMap.remove(KeyStroke.getKeyStroke(keyCode, modifiers, true));
+        }
+
     }
 }
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicPopupMenuUI.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicPopupMenuUI.java	Wed Jun 03 18:11:45 2015 -0700
@@ -914,7 +914,9 @@
                     processMouseEvent(me);
                 break;
             case MouseEvent.MOUSE_WHEEL:
-                if (isInPopup(src)) {
+                if (isInPopup(src)
+                    || ((src instanceof JComboBox) && ((JComboBox) src).isPopupVisible())) {
+
                     return;
                 }
                 cancelPopupMenu();
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicRadioButtonUI.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicRadioButtonUI.java	Wed Jun 03 18:11:45 2015 -0700
@@ -438,7 +438,7 @@
         // to the button group or not
         Component getFocusTransferBaseComponent(boolean next){
             Component focusBaseComp = activeBtn;
-            Window container = SwingUtilities.getWindowAncestor(activeBtn);
+            Container container = focusBaseComp.getFocusCycleRootAncestor();
             if (container != null) {
                 FocusTraversalPolicy policy = container.getFocusTraversalPolicy();
                 Component comp = next ? policy.getComponentAfter(container, activeBtn)
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSpinnerUI.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSpinnerUI.java	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015, 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
@@ -989,7 +989,7 @@
                                 ((JSpinner.DefaultEditor)newEditor).getTextField();
                             if (tf != null) {
                                 if (tf.getFont() instanceof UIResource) {
-                                    tf.setFont(spinner.getFont());
+                                    tf.setFont(new FontUIResource(spinner.getFont()));
                                 }
                                 tf.addFocusListener(nextButtonHandler);
                                 tf.addFocusListener(previousButtonHandler);
@@ -1002,12 +1002,12 @@
                     }
                     else if ("font".equals(propertyName)) {
                         JComponent editor = spinner.getEditor();
-                        if (editor!=null && editor instanceof JSpinner.DefaultEditor) {
+                        if (editor instanceof JSpinner.DefaultEditor) {
                             JTextField tf =
                                 ((JSpinner.DefaultEditor)editor).getTextField();
                             if (tf != null) {
                                 if (tf.getFont() instanceof UIResource) {
-                                    tf.setFont(spinner.getFont());
+                                    tf.setFont(new FontUIResource(spinner.getFont()));
                                 }
                             }
                         }
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -936,10 +936,11 @@
             ((AbstractDocument)doc).readLock();
         }
         try {
-            if ((d.width > (i.left + i.right)) && (d.height > (i.top + i.bottom))) {
-                rootView.setSize(d.width - i.left - i.right, d.height - i.top - i.bottom);
+            if ((d.width > (i.left + i.right + caretMargin)) && (d.height > (i.top + i.bottom))) {
+                rootView.setSize(d.width - i.left - i.right -
+                        caretMargin, d.height - i.top - i.bottom);
             }
-            else if (d.width == 0 && d.height == 0) {
+            else if (d.width == 0 || d.height == 0) {
                 // Probably haven't been layed out yet, force some sort of
                 // initial sizing.
                 rootView.setSize(Integer.MAX_VALUE, Integer.MAX_VALUE);
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalRootPaneUI.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalRootPaneUI.java	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2015, 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
@@ -27,15 +27,11 @@
 
 import java.awt.event.*;
 import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
 import javax.swing.*;
-import javax.swing.border.*;
 import javax.swing.event.*;
 import javax.swing.plaf.*;
 import javax.swing.plaf.basic.*;
 import java.awt.*;
-import java.io.*;
-import java.security.*;
 
 /**
  * Provides the metal look and feel implementation of <code>RootPaneUI</code>.
@@ -441,7 +437,6 @@
          * @param the Container for which this layout manager is being used
          * @return a Dimension object containing the layout's preferred size
          */
-        @SuppressWarnings("deprecation")
         public Dimension preferredLayoutSize(Container parent) {
             Dimension cpd, mbd, tpd;
             int cpWidth = 0;
@@ -463,8 +458,8 @@
                 cpHeight = cpd.height;
             }
 
-            if(root.getMenuBar() != null) {
-                mbd = root.getMenuBar().getPreferredSize();
+            if(root.getJMenuBar() != null) {
+                mbd = root.getJMenuBar().getPreferredSize();
                 if (mbd != null) {
                     mbWidth = mbd.width;
                     mbHeight = mbd.height;
@@ -494,7 +489,6 @@
          * @param the Container for which this layout manager is being used
          * @return a Dimension object containing the layout's minimum size
          */
-        @SuppressWarnings("deprecation")
         public Dimension minimumLayoutSize(Container parent) {
             Dimension cpd, mbd, tpd;
             int cpWidth = 0;
@@ -516,8 +510,8 @@
                 cpHeight = cpd.height;
             }
 
-            if(root.getMenuBar() != null) {
-                mbd = root.getMenuBar().getMinimumSize();
+            if(root.getJMenuBar() != null) {
+                mbd = root.getJMenuBar().getMinimumSize();
                 if (mbd != null) {
                     mbWidth = mbd.width;
                     mbHeight = mbd.height;
@@ -546,7 +540,6 @@
          * @param the Container for which this layout manager is being used
          * @return a Dimension object containing the layout's maximum size
          */
-        @SuppressWarnings("deprecation")
         public Dimension maximumLayoutSize(Container target) {
             Dimension cpd, mbd, tpd;
             int cpWidth = Integer.MAX_VALUE;
@@ -566,8 +559,8 @@
                 }
             }
 
-            if(root.getMenuBar() != null) {
-                mbd = root.getMenuBar().getMaximumSize();
+            if(root.getJMenuBar() != null) {
+                mbd = root.getJMenuBar().getMaximumSize();
                 if (mbd != null) {
                     mbWidth = mbd.width;
                     mbHeight = mbd.height;
@@ -610,7 +603,6 @@
          *
          * @param the Container for which this layout manager is being used
          */
-        @SuppressWarnings("deprecation")
         public void layoutContainer(Container parent) {
             JRootPane root = (JRootPane) parent;
             Rectangle b = root.getBounds();
@@ -640,9 +632,9 @@
                     }
                 }
             }
-            if(root.getMenuBar() != null) {
-                Dimension mbd = root.getMenuBar().getPreferredSize();
-                root.getMenuBar().setBounds(0, nextY, w, mbd.height);
+            if(root.getJMenuBar() != null) {
+                Dimension mbd = root.getJMenuBar().getPreferredSize();
+                root.getJMenuBar().setBounds(0, nextY, w, mbd.height);
                 nextY += mbd.height;
             }
             if(root.getContentPane() != null) {
--- a/jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthSplitPaneUI.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthSplitPaneUI.java	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2015, 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,6 +134,7 @@
                 value = Integer.valueOf(6);
             }
             LookAndFeel.installProperty(splitPane, "dividerSize", value);
+            dividerSize = ((Number)value).intValue();
 
             value = style.get(context, "SplitPane.oneTouchExpandable");
             if (value != null) {
--- a/jdk/src/java.desktop/share/classes/sun/applet/AppletClassLoader.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/applet/AppletClassLoader.java	Wed Jun 03 18:11:45 2015 -0700
@@ -802,7 +802,7 @@
     /**
      * Determine if applet is targeted for JDK 1.1.
      *
-     * @param applet Applet class.
+     * @param  clazz Applet class.
      * @return TRUE if applet is targeted for JDK 1.1;
      *         FALSE if applet is not;
      *         null if applet is unknown.
@@ -815,7 +815,7 @@
     /**
      * Determine if applet is targeted for JDK 1.2.
      *
-     * @param applet Applet class.
+     * @param  clazz Applet class.
      * @return TRUE if applet is targeted for JDK 1.2;
      *         FALSE if applet is not;
      *         null if applet is unknown.
--- a/jdk/src/java.desktop/share/classes/sun/applet/AppletSecurity.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/applet/AppletSecurity.java	Wed Jun 03 18:11:45 2015 -0700
@@ -270,10 +270,10 @@
      * The <code>checkPackageAccess</code> method for class
      * <code>SecurityManager</code>  calls
      * <code>checkPermission</code> with the
-     * <code>RuntimePermission("accessClassInPackage."+pkg)</code>
+     * <code>RuntimePermission("accessClassInPackage."+ pkgname)</code>
      * permission.
      *
-     * @param      pkg   the package name.
+     * @param      pkgname   the package name.
      * @exception  SecurityException  if the caller does not have
      *             permission to access the specified package.
      * @see        java.lang.ClassLoader#loadClass(java.lang.String, boolean)
--- a/jdk/src/java.desktop/share/classes/sun/awt/AppContext.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/awt/AppContext.java	Wed Jun 03 18:11:45 2015 -0700
@@ -190,7 +190,7 @@
      *
      * @see #addPropertyChangeListener
      * @see #removePropertyChangeListener
-     * @see #firePropertyChange
+     * @see PropertyChangeSupport#firePropertyChange
      */
     private PropertyChangeSupport changeSupport = null;
 
@@ -809,7 +809,7 @@
      *
      * @see #addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
      * @see #getPropertyChangeListeners(java.lang.String)
-     * @see #removePropertyChangeListener(java.beans.PropertyChangeListener)
+     * @see PropertyChangeSupport#removePropertyChangeListener(java.beans.PropertyChangeListener)
      */
     public synchronized void removePropertyChangeListener(
                              String propertyName,
--- a/jdk/src/java.desktop/share/classes/sun/awt/DefaultMouseInfoPeer.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/awt/DefaultMouseInfoPeer.java	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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
@@ -29,7 +29,7 @@
 import java.awt.Window;
 import java.awt.peer.MouseInfoPeer;
 
-public class DefaultMouseInfoPeer implements MouseInfoPeer {
+public final class DefaultMouseInfoPeer implements MouseInfoPeer {
 
     /**
      * Package-private constructor to prevent instantiation.
--- a/jdk/src/java.desktop/share/classes/sun/awt/EmbeddedFrame.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/awt/EmbeddedFrame.java	Wed Jun 03 18:11:45 2015 -0700
@@ -552,16 +552,10 @@
         }
         public void setModalBlocked(Dialog blocker, boolean blocked) {}
 
-        /**
-         * @see java.awt.peer.ContainerPeer#restack
-         */
         public void restack() {
             throw new UnsupportedOperationException();
         }
 
-        /**
-         * @see java.awt.peer.ContainerPeer#isRestackSupported
-         */
         public boolean isRestackSupported() {
             return false;
         }
--- a/jdk/src/java.desktop/share/classes/sun/awt/HToolkit.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/awt/HToolkit.java	Wed Jun 03 18:11:45 2015 -0700
@@ -45,8 +45,7 @@
  * with the HeadlessToolkit.  It is primarily used
  * in embedded JRE's that do not have sun/awt/X11 classes.
  */
-public class HToolkit extends SunToolkit
-    implements ComponentFactory {
+public final class HToolkit extends SunToolkit implements ComponentFactory {
 
     private static final KeyboardFocusManagerPeer kfmPeer = new KeyboardFocusManagerPeer() {
         @Override
--- a/jdk/src/java.desktop/share/classes/sun/awt/SunToolkit.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/awt/SunToolkit.java	Wed Jun 03 18:11:45 2015 -0700
@@ -366,8 +366,8 @@
       * status to synchronous for any of its windows, then further focus
       * behaviour is unspecified.
       * <p>
-      * @param    w window for which the lightweight focus request status
-      *             should be set
+      * @param    changed the window for which the lightweight focus request
+      *           status should be set
       * @param    status the value of lightweight focus request status
       */
 
@@ -1459,9 +1459,9 @@
      * <p> Notice that realSync isn't guaranteed to work if recurring
      * actions occur, such as if during processing of some event
      * another request which may generate some events occurs.  By
-     * default, sync tries to perform as much as {@value MAX_ITERS}
+     * default, sync tries to perform as much as {@value #MAX_ITERS}
      * cycles of event processing, allowing for roughly {@value
-     * MAX_ITERS} additional requests.
+     * #MAX_ITERS} additional requests.
      *
      * <p> For example, requestFocus() generates native request, which
      * generates one or two Java focus events, which then generate a
--- a/jdk/src/java.desktop/share/classes/sun/awt/datatransfer/SunClipboard.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/awt/datatransfer/SunClipboard.java	Wed Jun 03 18:11:45 2015 -0700
@@ -151,7 +151,7 @@
 
 
     /**
-     * @see java.awt.Clipboard#getAvailableDataFlavors
+     * @see java.awt.datatransfer.Clipboard#getAvailableDataFlavors
      * @since 1.5
      */
     public DataFlavor[] getAvailableDataFlavors() {
@@ -167,7 +167,7 @@
     }
 
     /**
-     * @see java.awt.Clipboard#isDataFlavorAvailable
+     * @see java.awt.datatransfer.Clipboard#isDataFlavorAvailable
      * @since 1.5
      */
     public boolean isDataFlavorAvailable(DataFlavor flavor) {
@@ -186,7 +186,7 @@
     }
 
     /**
-     * @see java.awt.Clipboard#getData
+     * @see java.awt.datatransfer.Clipboard#getData
      * @since 1.5
      */
     public Object getData(DataFlavor flavor)
--- a/jdk/src/java.desktop/share/classes/sun/awt/geom/PathConsumer2D.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/awt/geom/PathConsumer2D.java	Wed Jun 03 18:11:45 2015 -0700
@@ -27,30 +27,30 @@
 
 public interface PathConsumer2D {
     /**
-     * @see java.awt.geom.Path2D.Float.moveTo
+     * @see java.awt.geom.Path2D.Float#moveTo
      */
     public void moveTo(float x, float y);
 
     /**
-     * @see java.awt.geom.Path2D.Float.lineTo
+     * @see java.awt.geom.Path2D.Float#lineTo
      */
     public void lineTo(float x, float y);
 
     /**
-     * @see java.awt.geom.Path2D.Float.quadTo
+     * @see java.awt.geom.Path2D.Float#quadTo
      */
     public void quadTo(float x1, float y1,
                        float x2, float y2);
 
     /**
-     * @see java.awt.geom.Path2D.Float.curveTo
+     * @see java.awt.geom.Path2D.Float#curveTo
      */
     public void curveTo(float x1, float y1,
                         float x2, float y2,
                         float x3, float y3);
 
     /**
-     * @see java.awt.geom.Path2D.Float.closePath
+     * @see java.awt.geom.Path2D.Float#closePath
      */
     public void closePath();
 
--- a/jdk/src/java.desktop/share/classes/sun/awt/im/ExecutableInputMethodManager.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/awt/im/ExecutableInputMethodManager.java	Wed Jun 03 18:11:45 2015 -0700
@@ -519,7 +519,7 @@
      * Writes the preferred input method descriptor class name into
      * the user's Preferences tree in accordance with the given locale.
      *
-     * @param inputMethodLocator input method locator to remember.
+     * @param locator input method locator to remember.
      */
     private synchronized void putPreferredInputMethod(InputMethodLocator locator) {
         InputMethodDescriptor descriptor = locator.getDescriptor();
--- a/jdk/src/java.desktop/share/classes/sun/awt/image/ByteBandedRaster.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/awt/image/ByteBandedRaster.java	Wed Jun 03 18:11:45 2015 -0700
@@ -176,7 +176,7 @@
      * Returns data offset for the specified band.  The data offset
      * is the index into the band's data array
      * in which the first sample of the first scanline is stored.
-     * @param The band whose offset is returned.
+     * @param band The band whose offset is returned.
      */
     public int getDataOffset(int band) {
         return dataOffsets[band];
@@ -222,11 +222,11 @@
      * and references anything other than an array of transferType.
      * @param x        The X coordinate of the pixel location.
      * @param y        The Y coordinate of the pixel location.
-     * @param outData  An object reference to an array of type defined by
+     * @param obj      An object reference to an array of type defined by
      *                 getTransferType() and length getNumDataElements().
      *                 If null an array of appropriate type and size will be
      *                 allocated.
-     * @return         An object reference to an array of type defined by
+     * @return An object reference to an array of type defined by
      *                 getTransferType() with the request pixel data.
      */
     public Object getDataElements(int x, int y, Object obj) {
@@ -267,9 +267,9 @@
      * </pre>
      * @param x        The X coordinate of the upper left pixel location.
      * @param y        The Y coordinate of the upper left pixel location.
-     * @param width    Width of the pixel rectangle.
-     * @param height   Height of the pixel rectangle.
-     * @param outData  An object reference to an array of type defined by
+     * @param w        Width of the pixel rectangle.
+     * @param h        Height of the pixel rectangle.
+     * @param obj      An object reference to an array of type defined by
      *                 getTransferType() and length w*h*getNumDataElements().
      *                 If null an array of appropriate type and size will be
      *                 allocated.
@@ -320,8 +320,8 @@
      * </pre>
      * @param x        The X coordinate of the upper left pixel location.
      * @param y        The Y coordinate of the upper left pixel location.
-     * @param width    Width of the pixel rectangle.
-     * @param height   Height of the pixel rectangle.
+     * @param w        Width of the pixel rectangle.
+     * @param h        Height of the pixel rectangle.
      * @param band     The band to return.
      * @param outData  If non-null, data elements for all bands
      *                 at the specified location are returned in this array.
@@ -368,8 +368,8 @@
      * </pre>
      * @param x        The X coordinate of the upper left pixel location.
      * @param y        The Y coordinate of the upper left pixel location.
-     * @param width    Width of the pixel rectangle.
-     * @param height   Height of the pixel rectangle.
+     * @param w        Width of the pixel rectangle.
+     * @param h        Height of the pixel rectangle.
      * @param outData  If non-null, data elements for all bands
      *                 at the specified location are returned in this array.
      * @return         Data array with data elements for all bands.
@@ -412,7 +412,7 @@
      * and references anything other than an array of transferType.
      * @param x        The X coordinate of the pixel location.
      * @param y        The Y coordinate of the pixel location.
-     * @param inData   An object reference to an array of type defined by
+     * @param obj      An object reference to an array of type defined by
      *                 getTransferType() and length getNumDataElements()
      *                 containing the pixel data to place at x,y.
      */
@@ -505,7 +505,7 @@
      * @param y        The Y coordinate of the upper left pixel location.
      * @param w        Width of the pixel rectangle.
      * @param h        Height of the pixel rectangle.
-     * @param inData   An object reference to an array of type defined by
+     * @param obj      An object reference to an array of type defined by
      *                 getTransferType() and length w*h*getNumDataElements()
      *                 containing the pixel data to place between x,y and
      *                 x+h, y+h.
--- a/jdk/src/java.desktop/share/classes/sun/awt/image/ByteComponentRaster.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/awt/image/ByteComponentRaster.java	Wed Jun 03 18:11:45 2015 -0700
@@ -253,7 +253,7 @@
      * and references anything other than an array of transferType.
      * @param x        The X coordinate of the pixel location.
      * @param y        The Y coordinate of the pixel location.
-     * @param outData  An object reference to an array of type defined by
+     * @param obj      An object reference to an array of type defined by
      *                 getTransferType() and length getNumDataElements().
      *                 If null an array of appropriate type and size will be
      *                 allocated.
@@ -299,9 +299,9 @@
      * </pre>
      * @param x        The X coordinate of the upper left pixel location.
      * @param y        The Y coordinate of the upper left pixel location.
-     * @param width    Width of the pixel rectangle.
-     * @param height   Height of the pixel rectangle.
-     * @param outData  An object reference to an array of type defined by
+     * @param w        Width of the pixel rectangle.
+     * @param h        Height of the pixel rectangle.
+     * @param obj      An object reference to an array of type defined by
      *                 getTransferType() and length w*h*getNumDataElements().
      *                 If null an array of appropriate type and size will be
      *                 allocated.
@@ -352,8 +352,8 @@
      * </pre>
      * @param x        The X coordinate of the upper left pixel location.
      * @param y        The Y coordinate of the upper left pixel location.
-     * @param width    Width of the pixel rectangle.
-     * @param height   Height of the pixel rectangle.
+     * @param w        Width of the pixel rectangle.
+     * @param h        Height of the pixel rectangle.
      * @param band     The band to return.
      * @param outData  If non-null, data elements for all bands
      *                 at the specified location are returned in this array.
@@ -415,8 +415,8 @@
      * </pre>
      * @param x        The X coordinate of the upper left pixel location.
      * @param y        The Y coordinate of the upper left pixel location.
-     * @param width    Width of the pixel rectangle.
-     * @param height   Height of the pixel rectangle.
+     * @param w        Width of the pixel rectangle.
+     * @param h        Height of the pixel rectangle.
      * @param outData  If non-null, data elements for all bands
      *                 at the specified location are returned in this array.
      * @return         Data array with data elements for all bands.
@@ -458,7 +458,7 @@
      * and references anything other than an array of transferType.
      * @param x        The X coordinate of the pixel location.
      * @param y        The Y coordinate of the pixel location.
-     * @param inData   An object reference to an array of type defined by
+     * @param obj      An object reference to an array of type defined by
      *                 getTransferType() and length getNumDataElements()
      *                 containing the pixel data to place at x,y.
      */
@@ -577,7 +577,7 @@
      * @param y        The Y coordinate of the upper left pixel location.
      * @param w        Width of the pixel rectangle.
      * @param h        Height of the pixel rectangle.
-     * @param inData   An object reference to an array of type defined by
+     * @param obj      An object reference to an array of type defined by
      *                 getTransferType() and length w*h*getNumDataElements()
      *                 containing the pixel data to place between x,y and
      *                 x+h, y+h.
--- a/jdk/src/java.desktop/share/classes/sun/awt/image/ByteInterleavedRaster.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/awt/image/ByteInterleavedRaster.java	Wed Jun 03 18:11:45 2015 -0700
@@ -305,7 +305,7 @@
      * and references anything other than an array of transferType.
      * @param x        The X coordinate of the pixel location.
      * @param y        The Y coordinate of the pixel location.
-     * @param outData  An object reference to an array of type defined by
+     * @param obj      An object reference to an array of type defined by
      *                 getTransferType() and length getNumDataElements().
      *                 If null an array of appropriate type and size will be
      *                 allocated.
@@ -351,9 +351,9 @@
      * </pre>
      * @param x        The X coordinate of the upper left pixel location.
      * @param y        The Y coordinate of the upper left pixel location.
-     * @param width    Width of the pixel rectangle.
-     * @param height   Height of the pixel rectangle.
-     * @param outData  An object reference to an array of type defined by
+     * @param w        Width of the pixel rectangle.
+     * @param h        Height of the pixel rectangle.
+     * @param obj      An object reference to an array of type defined by
      *                 getTransferType() and length w*h*getNumDataElements().
      *                 If null an array of appropriate type and size will be
      *                 allocated.
@@ -376,8 +376,8 @@
      * </pre>
      * @param x        The X coordinate of the upper left pixel location.
      * @param y        The Y coordinate of the upper left pixel location.
-     * @param width    Width of the pixel rectangle.
-     * @param height   Height of the pixel rectangle.
+     * @param w        Width of the pixel rectangle.
+     * @param h        Height of the pixel rectangle.
      * @param band     The band to return.
      * @param outData  If non-null, data elements for all bands
      *                 at the specified location are returned in this array.
@@ -437,8 +437,8 @@
      * </pre>
      * @param x        The X coordinate of the upper left pixel location.
      * @param y        The Y coordinate of the upper left pixel location.
-     * @param width    Width of the pixel rectangle.
-     * @param height   Height of the pixel rectangle.
+     * @param w        Width of the pixel rectangle.
+     * @param h        Height of the pixel rectangle.
      * @param outData  If non-null, data elements for all bands
      *                 at the specified location are returned in this array.
      * @return         Data array with data elements for all bands.
@@ -536,7 +536,7 @@
      * and references anything other than an array of transferType.
      * @param x        The X coordinate of the pixel location.
      * @param y        The Y coordinate of the pixel location.
-     * @param inData   An object reference to an array of type defined by
+     * @param obj      An object reference to an array of type defined by
      *                 getTransferType() and length getNumDataElements()
      *                 containing the pixel data to place at x,y.
      */
@@ -666,7 +666,7 @@
      * @param y        The Y coordinate of the upper left pixel location.
      * @param w        Width of the pixel rectangle.
      * @param h        Height of the pixel rectangle.
-     * @param inData   An object reference to an array of type defined by
+     * @param obj      An object reference to an array of type defined by
      *                 getTransferType() and length w*h*getNumDataElements()
      *                 containing the pixel data to place between x,y and
      *                 x+h, y+h.
--- a/jdk/src/java.desktop/share/classes/sun/awt/image/BytePackedRaster.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/awt/image/BytePackedRaster.java	Wed Jun 03 18:11:45 2015 -0700
@@ -234,7 +234,7 @@
      * and references anything other than an array of transferType.
      * @param x        The X coordinate of the pixel location.
      * @param y        The Y coordinate of the pixel location.
-     * @param outData  An object reference to an array of type defined by
+     * @param obj      An object reference to an array of type defined by
      *                 getTransferType() and length getNumDataElements().
      *                 If null an array of appropriate type and size will be
      *                 allocated.
@@ -306,9 +306,9 @@
      * </pre>
      * @param x        The X coordinate of the upper left pixel location.
      * @param y        The Y coordinate of the upper left pixel location.
-     * @param width    Width of the pixel rectangle.
-     * @param height   Height of the pixel rectangle.
-     * @param outData  An object reference to an array of type defined by
+     * @param w        Width of the pixel rectangle.
+     * @param h        Height of the pixel rectangle.
+     * @param obj      An object reference to an array of type defined by
      *                 getTransferType() and length w*h*getNumDataElements().
      *                 If null an array of appropriate type and size will be
      *                 allocated.
@@ -358,8 +358,8 @@
      * </pre>
      * @param x        The X coordinate of the upper left pixel location.
      * @param y        The Y coordinate of the upper left pixel location.
-     * @param width    Width of the pixel rectangle.
-     * @param height   Height of the pixel rectangle.
+     * @param w        Width of the pixel rectangle.
+     * @param h        Height of the pixel rectangle.
      * @param band     The band to return, is ignored.
      * @param outData  If non-null, data elements
      *                 at the specified locations are returned in this array.
@@ -383,8 +383,8 @@
      * </pre>
      * @param x        The X coordinate of the upper left pixel location.
      * @param y        The Y coordinate of the upper left pixel location.
-     * @param width    Width of the pixel rectangle.
-     * @param height   Height of the pixel rectangle.
+     * @param w        Width of the pixel rectangle.
+     * @param h        Height of the pixel rectangle.
      * @param outData  If non-null, data elements
      *                 at the specified locations are returned in this array.
      * @return         Byte array with data elements.
@@ -499,7 +499,7 @@
      * and references anything other than an array of transferType.
      * @param x        The X coordinate of the pixel location.
      * @param y        The Y coordinate of the pixel location.
-     * @param inData   An object reference to an array of type defined by
+     * @param obj      An object reference to an array of type defined by
      *                 getTransferType() and length getNumDataElements()
      *                 containing the pixel data to place at x,y.
      */
@@ -857,7 +857,7 @@
      * @param y        The Y coordinate of the upper left pixel location.
      * @param w        Width of the pixel rectangle.
      * @param h        Height of the pixel rectangle.
-     * @param inData   An object reference to an array of type defined by
+     * @param obj      An object reference to an array of type defined by
      *                 getTransferType() and length w*h*getNumDataElements()
      *                 containing the pixel data to place between x,y and
      *                 x+h, y+h.
--- a/jdk/src/java.desktop/share/classes/sun/awt/image/ImageFetchable.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/awt/image/ImageFetchable.java	Wed Jun 03 18:11:45 2015 -0700
@@ -33,7 +33,7 @@
  * threads which manage the applications User Interface.
  *
  * @see ImageFetcher
- * @see ImageProducer
+ * @see java.awt.image.ImageProducer
  *
  * @author      Jim Graham
  */
@@ -42,7 +42,7 @@
      * This method is called by one of the ImageFetcher threads to start
      * the flow of information from the ImageProducer to the ImageConsumer.
      * @see ImageFetcher
-     * @see ImageProducer
+     * @see java.awt.image.ImageProducer
      */
     public void doFetch();
 }
--- a/jdk/src/java.desktop/share/classes/sun/awt/image/IntegerComponentRaster.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/awt/image/IntegerComponentRaster.java	Wed Jun 03 18:11:45 2015 -0700
@@ -263,7 +263,7 @@
      * and references anything other than an array of transferType.
      * @param x        The X coordinate of the pixel location.
      * @param y        The Y coordinate of the pixel location.
-     * @param outData  An object reference to an array of type defined by
+     * @param obj      An object reference to an array of type defined by
      *                 getTransferType() and length getNumDataElements().
      *                 If null an array of appropriate type and size will be
      *                 allocated.
@@ -309,9 +309,9 @@
      * </pre>
      * @param x        The X coordinate of the upper left pixel location.
      * @param y        The Y coordinate of the upper left pixel location.
-     * @param width    Width of the pixel rectangle.
-     * @param height   Height of the pixel rectangle.
-     * @param outData  An object reference to an array of type defined by
+     * @param w        Width of the pixel rectangle.
+     * @param h        Height of the pixel rectangle.
+     * @param obj      An object reference to an array of type defined by
      *                 getTransferType() and length w*h*getNumDataElements().
      *                 If null an array of appropriate type and size will be
      *                 allocated.
@@ -358,7 +358,7 @@
      * and references anything other than an array of transferType.
      * @param x        The X coordinate of the pixel location.
      * @param y        The Y coordinate of the pixel location.
-     * @param inData   An object reference to an array of type defined by
+     * @param obj      An object reference to an array of type defined by
      *                 getTransferType() and length getNumDataElements()
      *                 containing the pixel data to place at x,y.
      */
@@ -489,7 +489,7 @@
      * @param y        The Y coordinate of the upper left pixel location.
      * @param w        Width of the pixel rectangle.
      * @param h        Height of the pixel rectangle.
-     * @param inData   An object reference to an array of type defined by
+     * @param obj      An object reference to an array of type defined by
      *                 getTransferType() and length w*h*getNumDataElements()
      *                 containing the pixel data to place between x,y and
      *                 x+h, y+h.
--- a/jdk/src/java.desktop/share/classes/sun/awt/image/IntegerInterleavedRaster.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/awt/image/IntegerInterleavedRaster.java	Wed Jun 03 18:11:45 2015 -0700
@@ -206,7 +206,7 @@
      * and references anything other than an array of transferType.
      * @param x        The X coordinate of the pixel location.
      * @param y        The Y coordinate of the pixel location.
-     * @param outData  An object reference to an array of type defined by
+     * @param obj      An object reference to an array of type defined by
      *                 getTransferType() and length getNumDataElements().
      *                 If null an array of appropriate type and size will be
      *                 allocated.
@@ -249,9 +249,9 @@
      * </pre>
      * @param x        The X coordinate of the upper left pixel location.
      * @param y        The Y coordinate of the upper left pixel location.
-     * @param width    Width of the pixel rectangle.
-     * @param height   Height of the pixel rectangle.
-     * @param outData  An object reference to an array of type defined by
+     * @param w        Width of the pixel rectangle.
+     * @param h        Height of the pixel rectangle.
+     * @param obj      An object reference to an array of type defined by
      *                 getTransferType() and length w*h*getNumDataElements().
      *                 If null an array of appropriate type and size will be
      *                 allocated.
@@ -291,7 +291,7 @@
      * and references anything other than an array of transferType.
      * @param x        The X coordinate of the pixel location.
      * @param y        The Y coordinate of the pixel location.
-     * @param inData   An object reference to an array of type defined by
+     * @param obj      An object reference to an array of type defined by
      *                 getTransferType() and length getNumDataElements()
      *                 containing the pixel data to place at x,y.
      */
@@ -410,7 +410,7 @@
      * @param y        The Y coordinate of the upper left pixel location.
      * @param w        Width of the pixel rectangle.
      * @param h        Height of the pixel rectangle.
-     * @param inData   An object reference to an array of type defined by
+     * @param obj      An object reference to an array of type defined by
      *                 getTransferType() and length w*h*getNumDataElements()
      *                 containing the pixel data to place between x,y and
      *                 x+h, y+h.
--- a/jdk/src/java.desktop/share/classes/sun/awt/image/ShortBandedRaster.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/awt/image/ShortBandedRaster.java	Wed Jun 03 18:11:45 2015 -0700
@@ -172,7 +172,7 @@
      * Returns the data offset for the specified band.  The data offset
      * is the index into the band's data array
      * in which the first sample of the first scanline is stored.
-     * @param   The band whose offset is returned.
+     * @param band The band whose offset is returned.
      */
     public int getDataOffset(int band) {
         return dataOffsets[band];
@@ -218,7 +218,7 @@
      * and references anything other than an array of transferType.
      * @param x        The X coordinate of the pixel location.
      * @param y        The Y coordinate of the pixel location.
-     * @param outData  An object reference to an array of type defined by
+     * @param obj      An object reference to an array of type defined by
      *                 getTransferType() and length getNumDataElements().
      *                 If null an array of appropriate type and size will be
      *                 allocated.
@@ -262,9 +262,9 @@
      * </pre>
      * @param x        The X coordinate of the upper left pixel location.
      * @param y        The Y coordinate of the upper left pixel location.
-     * @param width    Width of the pixel rectangle.
-     * @param height   Height of the pixel rectangle.
-     * @param outData  An object reference to an array of type defined by
+     * @param w        Width of the pixel rectangle.
+     * @param h        Height of the pixel rectangle.
+     * @param obj      An object reference to an array of type defined by
      *                 getTransferType() and length w*h*getNumDataElements().
      *                 If null an array of appropriate type and size will be
      *                 allocated.
@@ -315,8 +315,8 @@
      * </pre>
      * @param x        The X coordinate of the upper left pixel location.
      * @param y        The Y coordinate of the upper left pixel location.
-     * @param width    Width of the pixel rectangle.
-     * @param height   Height of the pixel rectangle.
+     * @param w        Width of the pixel rectangle.
+     * @param h        Height of the pixel rectangle.
      * @param band     The band to return.
      * @param outData  If non-null, data elements for all bands
      *                 at the specified location are returned in this array.
@@ -363,8 +363,8 @@
      * </pre>
      * @param x        The X coordinate of the upper left pixel location.
      * @param y        The Y coordinate of the upper left pixel location.
-     * @param width    Width of the pixel rectangle.
-     * @param height   Height of the pixel rectangle.
+     * @param w        Width of the pixel rectangle.
+     * @param h        Height of the pixel rectangle.
      * @param outData  If non-null, data elements for all bands
      *                 at the specified location are returned in this array.
      * @return         Data array with data elements for all bands.
@@ -407,7 +407,7 @@
      * and references anything other than an array of transferType.
      * @param x        The X coordinate of the pixel location.
      * @param y        The Y coordinate of the pixel location.
-     * @param inData   An object reference to an array of type defined by
+     * @param obj      An object reference to an array of type defined by
      *                 getTransferType() and length getNumDataElements()
      *                 containing the pixel data to place at x,y.
      */
@@ -503,7 +503,7 @@
      * @param y        The Y coordinate of the upper left pixel location.
      * @param w        Width of the pixel rectangle.
      * @param h        Height of the pixel rectangle.
-     * @param inData   An object reference to an array of type defined by
+     * @param obj      An object reference to an array of type defined by
      *                 getTransferType() and length w*h*getNumDataElements()
      *                 containing the pixel data to place between x,y and
      *                 x+h, y+h.
--- a/jdk/src/java.desktop/share/classes/sun/awt/image/ShortComponentRaster.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/awt/image/ShortComponentRaster.java	Wed Jun 03 18:11:45 2015 -0700
@@ -252,7 +252,7 @@
      * and references anything other than an array of transferType.
      * @param x        The X coordinate of the pixel location.
      * @param y        The Y coordinate of the pixel location.
-     * @param outData  An object reference to an array of type defined by
+     * @param obj      An object reference to an array of type defined by
      *                 getTransferType() and length getNumDataElements().
      *                 If null an array of appropriate type and size will be
      *                 allocated.
@@ -298,9 +298,9 @@
      * </pre>
      * @param x        The X coordinate of the upper left pixel location.
      * @param y        The Y coordinate of the upper left pixel location.
-     * @param width    Width of the pixel rectangle.
-     * @param height   Height of the pixel rectangle.
-     * @param outData  An object reference to an array of type defined by
+     * @param w        Width of the pixel rectangle.
+     * @param h        Height of the pixel rectangle.
+     * @param obj      An object reference to an array of type defined by
      *                 getTransferType() and length w*h*getNumDataElements().
      *                 If null an array of appropriate type and size will be
      *                 allocated.
@@ -351,8 +351,8 @@
      * </pre>
      * @param x        The X coordinate of the upper left pixel location.
      * @param y        The Y coordinate of the upper left pixel location.
-     * @param width    Width of the sample rectangle.
-     * @param height   Height of the sample rectangle.
+     * @param w        Width of the sample rectangle.
+     * @param h        Height of the sample rectangle.
      * @param band     The band to return.
      * @param outData  If non-null, data elements for all bands
      *                 at the specified location are returned in this array.
@@ -414,8 +414,8 @@
      * </pre>
      * @param x        The X coordinate of the upper left pixel location.
      * @param y        The Y coordinate of the upper left pixel location.
-     * @param width    Width of the pixel rectangle.
-     * @param height   Height of the pixel rectangle.
+     * @param w        Width of the pixel rectangle.
+     * @param h        Height of the pixel rectangle.
      * @param outData  If non-null, data elements for all bands
      *                 at the specified location are returned in this array.
      * @return         Data array with data elements for all bands.
@@ -456,7 +456,7 @@
      * and references anything other than an array of transferType.
      * @param x        The X coordinate of the pixel location.
      * @param y        The Y coordinate of the pixel location.
-     * @param inData   An object reference to an array of type defined by
+     * @param obj      An object reference to an array of type defined by
      *                 getTransferType() and length getNumDataElements()
      *                 containing the pixel data to place at x,y.
      */
@@ -553,7 +553,7 @@
      * @param y        The Y coordinate of the upper left pixel location.
      * @param w        Width of the pixel rectangle.
      * @param h        Height of the pixel rectangle.
-     * @param inData   An object reference to an array of type defined by
+     * @param obj      An object reference to an array of type defined by
      *                 getTransferType() and length w*h*getNumDataElements()
      *                 containing the pixel data to place between x,y and
      *                 x+h, y+h.
--- a/jdk/src/java.desktop/share/classes/sun/awt/image/ShortInterleavedRaster.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/awt/image/ShortInterleavedRaster.java	Wed Jun 03 18:11:45 2015 -0700
@@ -225,7 +225,7 @@
      * and references anything other than an array of transferType.
      * @param x        The X coordinate of the pixel location.
      * @param y        The Y coordinate of the pixel location.
-     * @param outData  An object reference to an array of type defined by
+     * @param obj      An object reference to an array of type defined by
      *                 getTransferType() and length getNumDataElements().
      *                 If null an array of appropriate type and size will be
      *                 allocated.
@@ -271,9 +271,9 @@
      * </pre>
      * @param x        The X coordinate of the upper left pixel location.
      * @param y        The Y coordinate of the upper left pixel location.
-     * @param width    Width of the pixel rectangle.
-     * @param height   Height of the pixel rectangle.
-     * @param outData  An object reference to an array of type defined by
+     * @param w        Width of the pixel rectangle.
+     * @param h        Height of the pixel rectangle.
+     * @param obj      An object reference to an array of type defined by
      *                 getTransferType() and length w*h*getNumDataElements().
      *                 If null an array of appropriate type and size will be
      *                 allocated.
@@ -324,8 +324,8 @@
      * </pre>
      * @param x        The X coordinate of the upper left pixel location.
      * @param y        The Y coordinate of the upper left pixel location.
-     * @param width    Width of the sample rectangle.
-     * @param height   Height of the sample rectangle.
+     * @param w        Width of the sample rectangle.
+     * @param h        Height of the sample rectangle.
      * @param band     The band to return.
      * @param outData  If non-null, data elements for all bands
      *                 at the specified location are returned in this array.
@@ -387,8 +387,8 @@
      * </pre>
      * @param x        The X coordinate of the upper left pixel location.
      * @param y        The Y coordinate of the upper left pixel location.
-     * @param width    Width of the pixel rectangle.
-     * @param height   Height of the pixel rectangle.
+     * @param w        Width of the pixel rectangle.
+     * @param h        Height of the pixel rectangle.
      * @param outData  If non-null, data elements for all bands
      *                 at the specified location are returned in this array.
      * @return         Data array with data elements for all bands.
@@ -429,7 +429,7 @@
      * and references anything other than an array of transferType.
      * @param x        The X coordinate of the pixel location.
      * @param y        The Y coordinate of the pixel location.
-     * @param inData   An object reference to an array of type defined by
+     * @param obj      An object reference to an array of type defined by
      *                 getTransferType() and length getNumDataElements()
      *                 containing the pixel data to place at x,y.
      */
@@ -525,7 +525,7 @@
      * @param y        The Y coordinate of the upper left pixel location.
      * @param w        Width of the pixel rectangle.
      * @param h        Height of the pixel rectangle.
-     * @param inData   An object reference to an array of type defined by
+     * @param obj      An object reference to an array of type defined by
      *                 getTransferType() and length w*h*getNumDataElements()
      *                 containing the pixel data to place between x,y and
      *                 x+h, y+h.
--- a/jdk/src/java.desktop/share/classes/sun/awt/shell/ShellFolderColumnInfo.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/awt/shell/ShellFolderColumnInfo.java	Wed Jun 03 18:11:45 2015 -0700
@@ -40,7 +40,7 @@
     private SortOrder sortOrder;
     private Comparator<?> comparator;
     /**
-     * <code>false</code> (default) if the {@link comparator} expects folders as arguments,
+     * <code>false</code> (default) if the {@link #comparator} expects folders as arguments,
      * and <code>true</code> if folder's column values. The first option is used default for comparison
      * on Windows and also for separating files from directories when sorting using
      * ShellFolderManager's inner comparator.
--- a/jdk/src/java.desktop/share/classes/sun/awt/util/IdentityArrayList.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/awt/util/IdentityArrayList.java	Wed Jun 03 18:11:45 2015 -0700
@@ -68,7 +68,7 @@
  * synchronizing on some object that naturally encapsulates the list.
  *
  * If no such object exists, the list should be "wrapped" using the
- * {@link Collections#synchronizedList Collections.synchronizedList}
+ * {@link java.util.Collections#synchronizedList Collections.synchronizedList}
  * method.  This is best done at creation time, to prevent accidental
  * unsynchronized access to the list:<pre>
  *   List list = Collections.synchronizedList(new IdentityArrayList(...));</pre>
--- a/jdk/src/java.desktop/share/classes/sun/awt/util/IdentityLinkedList.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/awt/util/IdentityLinkedList.java	Wed Jun 03 18:11:45 2015 -0700
@@ -41,7 +41,7 @@
  * the <tt>IdentityLinkedList</tt> class provides uniformly named methods to
  * <tt>get</tt>, <tt>remove</tt> and <tt>insert</tt> an element at the
  * beginning and end of the list.  These operations allow linked lists to be
- * used as a stack, {@linkplain Queue queue}, or {@linkplain Deque
+ * used as a stack, {@linkplain java.util.Queue queue}, or {@linkplain Deque
  * double-ended queue}. <p>
  *
  * The class implements the <tt>Deque</tt> interface, providing
@@ -62,7 +62,7 @@
  * encapsulates the list.
  *
  * If no such object exists, the list should be "wrapped" using the
- * {@link Collections#synchronizedList Collections.synchronizedList}
+ * {@link java.util.Collections#synchronizedList Collections.synchronizedList}
  * method.  This is best done at creation time, to prevent accidental
  * unsynchronized access to the list:<pre>
  *   List list = Collections.synchronizedList(new IdentityLinkedList(...));</pre>
@@ -478,7 +478,7 @@
      * Adds the specified element as the tail (last element) of this list.
      *
      * @param e the element to add
-     * @return <tt>true</tt> (as specified by {@link Queue#offer})
+     * @return <tt>true</tt> (as specified by {@link java.util.Queue#offer})
      * @since 1.5
      */
     public boolean offer(E e) {
--- a/jdk/src/java.desktop/share/classes/sun/font/ScriptRun.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/font/ScriptRun.java	Wed Jun 03 18:11:45 2015 -0700
@@ -138,7 +138,7 @@
      * Get the script code for the script of the current script run.
      *
      * @return the script code for the script of the current script run.
-     * @see #Script
+     * @see Script
      */
     public int getScriptCode() {
         return scriptCode;
@@ -274,7 +274,7 @@
      * @param scriptOne one of the script codes.
      * @param scriptTwo the other script code.
      * @return <code>true</code> if the two scripts are the same.
-     * @see com.ibm.icu.lang.Script
+     * @see Script
      */
     private static boolean sameScript(int scriptOne, int scriptTwo) {
         return scriptOne == scriptTwo || scriptOne <= Script.INHERITED || scriptTwo <= Script.INHERITED;
--- a/jdk/src/java.desktop/share/classes/sun/font/StandardTextSource.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/font/StandardTextSource.java	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, 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,42 +33,43 @@
 import java.awt.font.FontRenderContext;
 import java.awt.font.LineMetrics;
 
-public class StandardTextSource extends TextSource {
-  char[] chars;
-  int start;
-  int len;
-  int cstart;
-  int clen;
-  int level; // assumed all uniform
-  int flags; // see GlyphVector.java
-  Font font;
-  FontRenderContext frc;
-  CoreMetrics cm;
+final class StandardTextSource extends TextSource {
 
-  /**
-   * Create a simple implementation of a TextSource.
-   *
-   * Chars is an array containing clen chars in the context, in
-   * logical order, contiguously starting at cstart.  Start and len
-   * represent that portion of the context representing the true
-   * source; start, like cstart, is relative to the start of the
-   * character array.
-   *
-   * Level is the bidi level (0-63 for the entire context. Flags is
-   * the layout flags. Font is the font, frc is the render context,
-   * and lm is the line metrics for the entire source text, but not
-   * necessarily the context.
-   */
-  public StandardTextSource(char[] chars,
-                            int start,
-                            int len,
-                            int cstart,
-                            int clen,
-                            int level,
-                            int flags,
-                            Font font,
-                            FontRenderContext frc,
-                            CoreMetrics cm) {
+    private final char[] chars;
+    private final int start;
+    private final int len;
+    private final int cstart;
+    private final int clen;
+    private final int level; // assumed all uniform
+    private final int flags; // see GlyphVector.java
+    private final Font font;
+    private final FontRenderContext frc;
+    private final CoreMetrics cm;
+
+    /**
+     * Create a simple implementation of a TextSource.
+     *
+     * Chars is an array containing clen chars in the context, in
+     * logical order, contiguously starting at cstart.  Start and len
+     * represent that portion of the context representing the true
+     * source; start, like cstart, is relative to the start of the
+     * character array.
+     *
+     * Level is the bidi level (0-63 for the entire context. Flags is
+     * the layout flags. Font is the font, frc is the render context,
+     * and lm is the line metrics for the entire source text, but not
+     * necessarily the context.
+     */
+    StandardTextSource(char[] chars,
+                       int start,
+                       int len,
+                       int cstart,
+                       int clen,
+                       int level,
+                       int flags,
+                       Font font,
+                       FontRenderContext frc,
+                       CoreMetrics cm) {
     if (chars == null) {
       throw new IllegalArgumentException("bad chars: null");
     }
@@ -97,7 +98,7 @@
       throw new IllegalArgumentException("bad frc: null");
     }
 
-    this.chars = chars.clone();
+    this.chars = chars;
     this.start = start;
     this.len = len;
     this.cstart = cstart;
@@ -115,40 +116,10 @@
     }
   }
 
-  /** Create a StandardTextSource whose context is coextensive with the source. */
-  public StandardTextSource(char[] chars,
-                            int start,
-                            int len,
-                            int level,
-                            int flags,
-                            Font font,
-                            FontRenderContext frc,
-                            CoreMetrics cm) {
-    this(chars, start, len, start, len, level, flags, font, frc, cm);
-  }
-
-  /** Create a StandardTextSource whose context and source are coextensive with the entire char array. */
-  public StandardTextSource(char[] chars,
-                            int level,
-                            int flags,
-                            Font font,
-                            FontRenderContext frc) {
-    this(chars, 0, chars.length, 0, chars.length, level, flags, font, frc, null);
-  }
-
-  /** Create a StandardTextSource whose context and source are all the text in the String. */
-  public StandardTextSource(String str,
-                            int level,
-                            int flags,
-                            Font font,
-                            FontRenderContext frc) {
-    this(str.toCharArray(), 0, str.length(), 0, str.length(), level, flags, font, frc, null);
-  }
-
   // TextSource API
 
   public char[] getChars() {
-    return chars.clone();
+    return chars;
   }
 
   public int getStart() {
--- a/jdk/src/java.desktop/share/classes/sun/font/TextLabelFactory.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/font/TextLabelFactory.java	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2015, 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,19 +41,19 @@
    *
    * @see Font
    * @see FontRenderContext
-   * @see GlyphVector
+   * @see java.awt.font.GlyphVector
    * @see TextLabel
    * @see ExtendedTextLabel
    * @see Bidi
-   * @see TextLayout
+   * @see java.awt.font.TextLayout
    */
 
-public class TextLabelFactory {
-  private FontRenderContext frc;
-  private char[] text;
-  private Bidi bidi;
+public final class TextLabelFactory {
+  private final FontRenderContext frc;
+  private final char[] text;
+  private final Bidi bidi;
   private Bidi lineBidi;
-  private int flags;
+  private final int flags;
   private int lineStart;
   private int lineLimit;
 
--- a/jdk/src/java.desktop/share/classes/sun/java2d/NullSurfaceData.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/NullSurfaceData.java	Wed Jun 03 18:11:45 2015 -0700
@@ -86,7 +86,7 @@
      * In most cases, the returned Raster might contain more pixels
      * than requested.
      *
-     * @see useTightBBoxes
+     * @see #useTightBBoxes
      */
     public Raster getRaster(int x, int y, int w, int h) {
         throw new InvalidPipeException("should be NOP");
@@ -101,7 +101,7 @@
      * the pixels has to be made when doing a getRaster.  The
      * fewer pixels copied, the faster the operation will go.
      *
-     * @see getRaster
+     * @see #getRaster
      */
     public boolean useTightBBoxes() {
         return false;
--- a/jdk/src/java.desktop/share/classes/sun/java2d/SunCompositeContext.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/SunCompositeContext.java	Wed Jun 03 18:11:45 2015 -0700
@@ -88,13 +88,13 @@
      * @param src2 The second source tile for the compositing operation.
      * @param dst The tile where the result of the operation is stored.
      */
-    public void compose(Raster srcArg, Raster dstIn, WritableRaster dstOut) {
+    public void compose(Raster src1, Raster src2, WritableRaster dst) {
         WritableRaster src;
         int w;
         int h;
 
-        if (dstIn != dstOut) {
-            dstOut.setDataElements(0, 0, dstIn);
+        if (src2 != dst) {
+            dst.setDataElements(0, 0, src2);
         }
 
         // REMIND: We should be able to create a SurfaceData from just
@@ -102,20 +102,20 @@
         // create a SurfaceData from a BufferedImage then we need to
         // make a WritableRaster since it is needed to construct a
         // BufferedImage.
-        if (srcArg instanceof WritableRaster) {
-            src = (WritableRaster) srcArg;
+        if (src1 instanceof WritableRaster) {
+            src = (WritableRaster) src1;
         } else {
-            src = srcArg.createCompatibleWritableRaster();
-            src.setDataElements(0, 0, srcArg);
+            src = src1.createCompatibleWritableRaster();
+            src.setDataElements(0, 0, src1);
         }
 
-        w = Math.min(src.getWidth(), dstIn.getWidth());
-        h = Math.min(src.getHeight(), dstIn.getHeight());
+        w = Math.min(src.getWidth(), src2.getWidth());
+        h = Math.min(src.getHeight(), src2.getHeight());
 
         BufferedImage srcImg = new BufferedImage(srcCM, src,
                                                  srcCM.isAlphaPremultiplied(),
                                                  null);
-        BufferedImage dstImg = new BufferedImage(dstCM, dstOut,
+        BufferedImage dstImg = new BufferedImage(dstCM, dst,
                                                  dstCM.isAlphaPremultiplied(),
                                                  null);
 
--- a/jdk/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java	Wed Jun 03 18:11:45 2015 -0700
@@ -874,13 +874,13 @@
      * space.  The rendering attributes taken into account include the
      * clip, transform, and stroke attributes.
      * @param rect The area in device space to check for a hit.
-     * @param p The path to check for a hit.
+     * @param s The path to check for a hit.
      * @param onStroke Flag to choose between testing the stroked or
      * the filled path.
      * @return True if there is a hit, false otherwise.
      * @see #setStroke
-     * @see #fillPath
-     * @see #drawPath
+     * @see #fill(Shape)
+     * @see #draw(Shape)
      * @see #transform
      * @see #setTransform
      * @see #clip
@@ -1295,7 +1295,7 @@
 
     /**
      * Returns the preferences for the rendering algorithms.
-     * @param hintCategory The category of hint to be set. The strings
+     * @param hintKey The category of hint to be set. The strings
      * are defined in the RenderingHints class.
      * @return The preferences for rendering algorithms. The strings
      * are defined in the RenderingHints class.
@@ -1577,7 +1577,7 @@
      * Cx'(p) = Cx(Tx(p)).
      * A copy of the Tx is made, if necessary, so further
      * modifications to Tx do not affect rendering.
-     * @param Tx The Transform object to be composed with the current
+     * @param xform The Transform object to be composed with the current
      * transform.
      * @see #setTransform
      * @see AffineTransform
@@ -1606,7 +1606,6 @@
      * Sets the Transform in the current graphics state.
      * @param Tx The Transform object to be used in the rendering process.
      * @see #transform
-     * @see TransformChain
      * @see AffineTransform
      */
     @Override
@@ -1789,8 +1788,8 @@
      * of the component, use appropriate methods of the component.
      * @param color The background color that should be used in
      * subsequent calls to clearRect().
-     * @see getBackground
-     * @see Graphics.clearRect()
+     * @see #getBackground
+     * @see Graphics#clearRect
      */
     public void setBackground(Color color) {
         backgroundColor = color;
@@ -1798,7 +1797,7 @@
 
     /**
      * Returns the background color used for clearing a region.
-     * @see setBackground
+     * @see #setBackground
      */
     public Color getBackground() {
         return backgroundColor;
@@ -1806,7 +1805,7 @@
 
     /**
      * Returns the current Stroke in the Graphics2D state.
-     * @see setStroke
+     * @see #setStroke
      */
     public Stroke getStroke() {
         return stroke;
@@ -2056,7 +2055,7 @@
      * with the current transform in the Graphics2D state before being
      * intersected with the current clip. This method is used to make the
      * current clip smaller. To make the clip larger, use any setClip method.
-     * @param p The Path to be intersected with the current clip.
+     * @param s The Path to be intersected with the current clip.
      */
     public void clip(Shape s) {
         s = transformShape(s);
@@ -2483,7 +2482,7 @@
      * Strokes the outline of a Path using the settings of the current
      * graphics state.  The rendering attributes applied include the
      * clip, transform, paint or color, composite and stroke attributes.
-     * @param p The path to be drawn.
+     * @param s The path to be drawn.
      * @see #setStroke
      * @see #setPaint
      * @see java.awt.Graphics#setColor
--- a/jdk/src/java.desktop/share/classes/sun/java2d/SurfaceData.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/SurfaceData.java	Wed Jun 03 18:11:45 2015 -0700
@@ -939,7 +939,7 @@
      * In most cases, the returned Raster might contain more pixels
      * than requested.
      *
-     * @see useTightBBoxes
+     * @see #useTightBBoxes
      */
     public abstract Raster getRaster(int x, int y, int w, int h);
 
@@ -952,7 +952,7 @@
      * the pixels has to be made when doing a getRaster.  The
      * fewer pixels copied, the faster the operation will go.
      *
-     * @see getRaster
+     * @see #getRaster
      */
     public boolean useTightBBoxes() {
         // Note: The native equivalent would trigger on VISIBLE_TO_NATIVE
--- a/jdk/src/java.desktop/share/classes/sun/java2d/pipe/PixelToParallelogramConverter.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/pipe/PixelToParallelogramConverter.java	Wed Jun 03 18:11:45 2015 -0700
@@ -56,7 +56,7 @@
      * @param minPenSize minimum pen size for dropout control
      * @param normPosition sub-pixel location to normalize endpoints
      *                     for STROKE_NORMALIZE cases
-     * @param adjustFill boolean to control whethere normalization
+     * @param adjustfill boolean to control whethere normalization
      *                   constants are also applied to fill operations
      *                   (normally true for non-AA, false for AA)
      */
--- a/jdk/src/java.desktop/share/classes/sun/java2d/pipe/RenderingEngine.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/pipe/RenderingEngine.java	Wed Jun 03 18:11:45 2015 -0700
@@ -66,7 +66,7 @@
  * line width can get before dropouts occur.  Rendering with a BasicStroke
  * is defined to never allow the line to have breaks, gaps, or dropouts
  * even if the width is set to 0.0f, so this information allows the
- * {@link SunGraphics2D} class to detect the "thin line" case and set
+ * {@link sun.java2d.SunGraphics2D} class to detect the "thin line" case and set
  * the rendering attributes accordingly.
  * </dl>
  * At startup the runtime will load a single instance of this class.
@@ -177,11 +177,11 @@
      * The specified {@code src} {@link Shape} is widened according
      * to the parameters specified by the {@link BasicStroke} object.
      * Adjustments are made to the path as appropriate for the
-     * {@link VALUE_STROKE_NORMALIZE} hint if the {@code normalize}
-     * boolean parameter is true.
+     * {@link java.awt.RenderingHints#VALUE_STROKE_NORMALIZE} hint if the
+     * {@code normalize} boolean parameter is true.
      * Adjustments are made to the path as appropriate for the
-     * {@link VALUE_ANTIALIAS_ON} hint if the {@code antialias}
-     * boolean parameter is true.
+     * {@link java.awt.RenderingHints#VALUE_ANTIALIAS_ON} hint if the
+     * {@code antialias} boolean parameter is true.
      * <p>
      * The geometry of the widened path is forwarded to the indicated
      * {@link PathConsumer2D} object as it is calculated.
--- a/jdk/src/java.desktop/share/classes/sun/java2d/pipe/hw/AccelDeviceEventNotifier.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/pipe/hw/AccelDeviceEventNotifier.java	Wed Jun 03 18:11:45 2015 -0700
@@ -137,7 +137,7 @@
      *
      * @param screen a screen number with which the device which is a source of
      * the event is associated with
-     * @param eventType a type of the event
+     * @param deviceEventType a type of the event
      * @see #DEVICE_DISPOSED
      * @see #DEVICE_RESET
      */
--- a/jdk/src/java.desktop/share/classes/sun/java2d/pipe/hw/AccelGraphicsConfig.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/pipe/hw/AccelGraphicsConfig.java	Wed Jun 03 18:11:45 2015 -0700
@@ -77,7 +77,7 @@
      * events.
      *
      * Note: a hard link to the listener may be kept so it must be explicitly
-     * removed via {@link #removeDeviceEventListener()}.
+     * removed via {@link #removeDeviceEventListener}.
      *
      * @param l the listener
      * @see AccelDeviceEventListener
--- a/jdk/src/java.desktop/share/classes/sun/java2d/pipe/hw/ContextCapabilities.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/pipe/hw/ContextCapabilities.java	Wed Jun 03 18:11:45 2015 -0700
@@ -65,7 +65,7 @@
     /**
      * Constructs a {@code ContextCapabilities} object.
      * @param caps an {@code int} representing the capabilities
-     * @param a {@code String} representing the name of the adapter, or null,
+     * @param adapterId {@code String} representing the name of the adapter, or null,
      * in which case the adapterId will be set to "unknown adapter".
      */
     protected ContextCapabilities(int caps, String adapterId) {
--- a/jdk/src/java.desktop/share/classes/sun/java2d/pisces/PiscesCache.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/pisces/PiscesCache.java	Wed Jun 03 18:11:45 2015 -0700
@@ -29,8 +29,6 @@
 
 /**
  * An object used to cache pre-rendered complex paths.
- *
- * @see PiscesRenderer#render
  */
 final class PiscesCache {
 
--- a/jdk/src/java.desktop/share/classes/sun/java2d/pisces/PiscesRenderingEngine.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/pisces/PiscesRenderingEngine.java	Wed Jun 03 18:11:45 2015 -0700
@@ -108,11 +108,11 @@
      * The specified {@code src} {@link Shape} is widened according
      * to the parameters specified by the {@link BasicStroke} object.
      * Adjustments are made to the path as appropriate for the
-     * {@link VALUE_STROKE_NORMALIZE} hint if the {@code normalize}
-     * boolean parameter is true.
+     * {@link java.awt.RenderingHints#VALUE_STROKE_NORMALIZE} hint if the
+     * {@code normalize} boolean parameter is true.
      * Adjustments are made to the path as appropriate for the
-     * {@link VALUE_ANTIALIAS_ON} hint if the {@code antialias}
-     * boolean parameter is true.
+     * {@link java.awt.RenderingHints#VALUE_ANTIALIAS_ON} hint if the
+     * {@code antialias} boolean parameter is true.
      * <p>
      * The geometry of the widened path is forwarded to the indicated
      * {@link PathConsumer2D} object as it is calculated.
--- a/jdk/src/java.desktop/share/classes/sun/print/DialogOwner.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/print/DialogOwner.java	Wed Jun 03 18:11:45 2015 -0700
@@ -45,10 +45,9 @@
     private Frame dlgOwner;
 
     /**
-     * Construct a new dialog type selection enumeration value with the
-     * given integer value.
+     * Construct a new dialog owner attribute with the given frame.
      *
-     * @param  value  Integer value.
+     * @param  frame the frame that owns the print dialog
      */
     public DialogOwner(Frame frame) {
         dlgOwner = frame;
--- a/jdk/src/java.desktop/share/classes/sun/print/OpenBook.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/print/OpenBook.java	Wed Jun 03 18:11:45 2015 -0700
@@ -74,8 +74,8 @@
 
     /**
      * Return the PageFormat of the page specified by 'pageIndex'.
-     * @param int The zero based index of the page whose
-     *            PageFormat is being requested.
+     * @param pageIndex The zero based index of the page whose
+     *                  PageFormat is being requested.
      * @return The PageFormat describing the size and orientation
      */
     public PageFormat getPageFormat(int pageIndex) {
@@ -85,8 +85,8 @@
     /**
      * Return the Printable instance responsible for rendering
      * the page specified by 'pageIndex'.
-     * @param int The zero based index of the page whose
-     *            Printable is being requested.
+     * @param pageIndex The zero based index of the page whose
+     *                  Printable is being requested.
      * @return The Printable that will draw the page.
      */
     public Printable getPrintable(int pageIndex)
--- a/jdk/src/java.desktop/share/classes/sun/print/PSPathGraphics.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/print/PSPathGraphics.java	Wed Jun 03 18:11:45 2015 -0700
@@ -126,7 +126,7 @@
      * such as Hebrew and Arabic, the glyphs can be rendered from right to
      * left, in which case the coordinate supplied is the location of the
      * leftmost character on the baseline.
-     * @param s the <code>String</code> to be rendered
+     * @param str the <code>String</code> to be rendered
      * @param x,&nbsp;y the coordinates where the <code>String</code>
      * should be rendered
      * @see #setPaint
@@ -256,7 +256,7 @@
      * is transformed by the supplied AffineTransform and
      * drawn using PS to the printer context.
      *
-     * @param   img     The image to be drawn.
+     * @param   image   The image to be drawn.
      *                  This method does nothing if <code>img</code> is null.
      * @param   xform   Used to transform the image before drawing.
      *                  This can be null.
--- a/jdk/src/java.desktop/share/classes/sun/print/PeekGraphics.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/print/PeekGraphics.java	Wed Jun 03 18:11:45 2015 -0700
@@ -361,9 +361,9 @@
      * use this font.
      * @param  font   the font.
      * @see     java.awt.Graphics#getFont
-     * @see     java.awt.Graphics#drawChars(java.lang.String, int, int)
-     * @see     java.awt.Graphics#drawString(byte[], int, int, int, int)
-     * @see     java.awt.Graphics#drawBytes(char[], int, int, int, int)
+     * @see     java.awt.Graphics#drawChars(char[], int, int, int, int)
+     * @see     java.awt.Graphics#drawString(String, int, int)
+     * @see     java.awt.Graphics#drawBytes(byte[], int, int, int, int)
      * @since   1.0
     */
     public void setFont(Font font) {
@@ -1446,7 +1446,7 @@
      * Draws a string of text.
      * The rendering attributes applied include the clip, transform,
      * paint or color, font and composite attributes.
-     * @param s The string to be drawn.
+     * @param str The string to be drawn.
      * @param x,y The coordinates where the string should be drawn.
      * @see #setPaint
      * @see java.awt.Graphics#setColor
@@ -1548,7 +1548,7 @@
      * @param comp The Composite object to be used for drawing.
      * @see java.awt.Graphics#setXORMode
      * @see java.awt.Graphics#setPaintMode
-     * @see AlphaComposite
+     * @see java.awt.AlphaComposite
      */
     public void setComposite(Composite comp) {
         mGraphics.setComposite(comp);
@@ -1560,8 +1560,8 @@
      * @param paint The Paint object to be used to generate color in
      * the rendering process.
      * @see java.awt.Graphics#setColor
-     * @see GradientPaint
-     * @see TexturePaint
+     * @see java.awt.GradientPaint
+     * @see java.awt.TexturePaint
      */
     public void setPaint(Paint paint) {
         mGraphics.setPaint(paint);
@@ -1594,7 +1594,7 @@
      * Returns the preferences for the rendering algorithms.
      * @param hintCategory The category of hint to be set.
      * @return The preferences for rendering algorithms.
-     * @see RenderingHings
+     * @see RenderingHints
      */
     public Object getRenderingHint(Key hintCategory) {
         return mGraphics.getRenderingHint(hintCategory);
@@ -1647,7 +1647,6 @@
      * @param Tx The Transform object to be composed with the current
      * transform.
      * @see #setTransform
-     * @see TransformChain
      * @see AffineTransform
      */
     public void transform(AffineTransform Tx) {
@@ -1658,7 +1657,6 @@
      * Sets the Transform in the current graphics state.
      * @param Tx The Transform object to be used in the rendering process.
      * @see #transform
-     * @see TransformChain
      * @see AffineTransform
      */
     public void setTransform(AffineTransform Tx) {
@@ -1700,8 +1698,8 @@
      * of the component, use appropriate methods of the component.
      * @param color The background color that should be used in
      * subsequent calls to clearRect().
-     * @see getBackground
-     * @see Graphics.clearRect()
+     * @see #getBackground
+     * @see Graphics#clearRect
      */
     public void setBackground(Color color) {
         mGraphics.setBackground(color);
@@ -1709,7 +1707,7 @@
 
     /**
      * Returns the background color used for clearing a region.
-     * @see setBackground
+     * @see #setBackground
      */
     public Color getBackground() {
         return mGraphics.getBackground();
@@ -1717,7 +1715,7 @@
 
     /**
      * Returns the current Stroke in the Graphics2D state.
-     * @see setStroke
+     * @see #setStroke
      */
     public Stroke getStroke() {
         return mGraphics.getStroke();
--- a/jdk/src/java.desktop/share/classes/sun/print/PrintJob2D.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/print/PrintJob2D.java	Wed Jun 03 18:11:45 2015 -0700
@@ -79,7 +79,7 @@
  * A class which initiates and executes a print job using
  * the underlying PrinterJob graphics conversions.
  *
- * @see Toolkit#getPrintJob
+ * @see java.awt.Toolkit#getPrintJob
  *
  */
 public class PrintJob2D extends PrintJob implements Printable, Runnable {
@@ -750,7 +750,7 @@
      * The page is sent to the printer when the graphics
      * object is disposed.  This graphics object will also implement
      * the PrintGraphics interface.
-     * @see PrintGraphics
+     * @see java.awt.PrintGraphics
      */
     public Graphics getGraphics() {
 
@@ -937,7 +937,7 @@
      * If the requested page does not exist then this method returns
      * NO_SUCH_PAGE; otherwise PAGE_EXISTS is returned.
      * The <code>Graphics</code> class or subclass implements the
-     * {@link PrinterGraphics} interface to provide additional
+     * {@link java.awt.PrintGraphics} interface to provide additional
      * information.  If the <code>Printable</code> object
      * aborts the print job then it throws a {@link PrinterException}.
      * @param graphics the context into which the page is drawn
--- a/jdk/src/java.desktop/share/classes/sun/print/ProxyGraphics2D.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/print/ProxyGraphics2D.java	Wed Jun 03 18:11:45 2015 -0700
@@ -297,9 +297,9 @@
      * use this font.
      * @param  font   the font.
      * @see     java.awt.Graphics#getFont
-     * @see     java.awt.Graphics#drawChars(java.lang.String, int, int)
-     * @see     java.awt.Graphics#drawString(byte[], int, int, int, int)
-     * @see     java.awt.Graphics#drawBytes(char[], int, int, int, int)
+     * @see     java.awt.Graphics#drawChars(char[], int, int, int, int)
+     * @see     java.awt.Graphics#drawString(String, int, int)
+     * @see     java.awt.Graphics#drawBytes(byte[], int, int, int, int)
      * @since   1.0
     */
     public void setFont(Font font) {
@@ -1345,7 +1345,7 @@
      * Draws a string of text.
      * The rendering attributes applied include the clip, transform,
      * paint or color, font and composite attributes.
-     * @param s The string to be drawn.
+     * @param str The string to be drawn.
      * @param x,y The coordinates where the string should be drawn.
      * @see #setPaint
      * @see java.awt.Graphics#setColor
@@ -1432,7 +1432,7 @@
      * @param comp The Composite object to be used for drawing.
      * @see java.awt.Graphics#setXORMode
      * @see java.awt.Graphics#setPaintMode
-     * @see AlphaComposite
+     * @see java.awt.AlphaComposite
      */
     public void setComposite(Composite comp) {
         mGraphics.setComposite(comp);
@@ -1444,8 +1444,8 @@
      * @param paint The Paint object to be used to generate color in
      * the rendering process.
      * @see java.awt.Graphics#setColor
-     * @see GradientPaint
-     * @see TexturePaint
+     * @see java.awt.GradientPaint
+     * @see java.awt.TexturePaint
      */
     public void setPaint(Paint paint) {
         mGraphics.setPaint(paint);
@@ -1455,7 +1455,7 @@
      * Sets the Stroke in the current graphics state.
      * @param s The Stroke object to be used to stroke a Shape in
      * the rendering process.
-     * @see BasicStroke
+     * @see java.awt.BasicStroke
      */
     public void setStroke(Stroke s) {
         mGraphics.setStroke(s);
@@ -1478,7 +1478,7 @@
      * Returns the preferences for the rendering algorithms.
      * @param hintCategory The category of hint to be set.
      * @return The preferences for rendering algorithms.
-     * @see RenderingHings
+     * @see RenderingHints
      */
     public Object getRenderingHint(Key hintCategory) {
         return mGraphics.getRenderingHint(hintCategory);
@@ -1531,7 +1531,6 @@
      * @param Tx The Transform object to be composed with the current
      * transform.
      * @see #setTransform
-     * @see TransformChain
      * @see AffineTransform
      */
     public void transform(AffineTransform Tx) {
@@ -1542,7 +1541,6 @@
      * Sets the Transform in the current graphics state.
      * @param Tx The Transform object to be used in the rendering process.
      * @see #transform
-     * @see TransformChain
      * @see AffineTransform
      */
     public void setTransform(AffineTransform Tx) {
@@ -1584,8 +1582,8 @@
      * of the component, use appropriate methods of the component.
      * @param color The background color that should be used in
      * subsequent calls to clearRect().
-     * @see getBackground
-     * @see Graphics.clearRect()
+     * @see #getBackground
+     * @see Graphics#clearRect
      */
     public void setBackground(Color color) {
         mGraphics.setBackground(color);
@@ -1593,7 +1591,7 @@
 
     /**
      * Returns the background color used for clearing a region.
-     * @see setBackground
+     * @see #setBackground
      */
     public Color getBackground() {
         return mGraphics.getBackground();
@@ -1601,7 +1599,7 @@
 
     /**
      * Returns the current Stroke in the Graphics2D state.
-     * @see setStroke
+     * @see #setStroke
      */
     public Stroke getStroke() {
         return mGraphics.getStroke();
--- a/jdk/src/java.desktop/share/classes/sun/print/ProxyPrintGraphics.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/print/ProxyPrintGraphics.java	Wed Jun 03 18:11:45 2015 -0700
@@ -69,7 +69,7 @@
      * <code>Graphics</code> object, but with a new translation and
      * clip area.
      * Refer to
-     * {@link sun.print.ProxyGraphics#createGraphics}
+     * {@link sun.print.ProxyGraphics#create(int, int, int, int)}
      * for a complete description of this method.
      * <p>
      * @param      x   the <i>x</i> coordinate.
--- a/jdk/src/java.desktop/share/classes/sun/print/RasterPrinterJob.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/print/RasterPrinterJob.java	Wed Jun 03 18:11:45 2015 -0700
@@ -498,7 +498,7 @@
      * Throws <code>PrinterException</code> if the specified service
      * cannot support the <code>Pageable</code> and
      * <code>Printable</code> interfaces necessary to support 2D printing.
-     * @param a print service which supports 2D printing.
+     * @param service print service which supports 2D printing.
      *
      * @throws PrinterException if the specified service does not support
      * 2D printing or no longer available.
@@ -1024,7 +1024,7 @@
      * The pages in the document to be printed by this PrinterJob
      * are drawn by the Printable object 'painter'. The PageFormat
      * for each page is the default page format.
-     * @param Printable Called to render each page of the document.
+     * @param painter Called to render each page of the document.
      */
     public void setPrintable(Printable painter) {
         setPageable(new OpenBook(defaultPage(new PageFormat()), painter));
@@ -1034,9 +1034,9 @@
      * The pages in the document to be printed by this PrinterJob
      * are drawn by the Printable object 'painter'. The PageFormat
      * of each page is 'format'.
-     * @param Printable Called to render each page of the document.
-     * @param PageFormat The size and orientation of each page to
-     *                   be printed.
+     * @param painter Called to render each page of the document.
+     * @param format  The size and orientation of each page to
+     *                be printed.
      */
     public void setPrintable(Printable painter, PageFormat format) {
         setPageable(new OpenBook(format, painter));
@@ -1048,7 +1048,7 @@
      * Pageable instance 'document'. 'document' will be queried
      * for the number of pages as well as the PageFormat and
      * Printable for each page.
-     * @param Pageable The document to be printed. It may not be null.
+     * @param document The document to be printed. It may not be null.
      * @exception NullPointerException the Pageable passed in was null.
      * @see PageFormat
      * @see Printable
--- a/jdk/src/java.desktop/share/classes/sun/swing/CachedPainter.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/swing/CachedPainter.java	Wed Jun 03 18:11:45 2015 -0700
@@ -89,7 +89,7 @@
      * @param y Y-coordinate to render to
      * @param w Width to render in
      * @param h Height to render in
-     * @param arg Variable arguments that will be passed to paintToImage
+     * @param args Variable arguments that will be passed to paintToImage
      */
     public void paint(Component c, Graphics g, int x,
                          int y, int w, int h, Object... args) {
--- a/jdk/src/java.desktop/share/classes/sun/swing/UIAction.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/swing/UIAction.java	Wed Jun 03 18:11:45 2015 -0700
@@ -54,7 +54,6 @@
  * <code>isEnabled(Component)</code>, and be aware that the passed in
  * <code>Component</code> may be null.
  *
- * @see com.sun.java.swing.ExtendedAction
  * @see javax.swing.Action
  * @author Scott Violet
  */
--- a/jdk/src/java.desktop/share/classes/sun/swing/plaf/synth/DefaultSynthStyle.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/swing/plaf/synth/DefaultSynthStyle.java	Wed Jun 03 18:11:45 2015 -0700
@@ -289,7 +289,7 @@
     /**
      * Sets the insets.
      *
-     * @param Insets.
+     * @param insets the new insets.
      */
     public void setInsets(Insets insets) {
         this.insets = insets;
@@ -300,7 +300,7 @@
      * insets will be placed in it, otherwise a new Insets object will be
      * created and returned.
      *
-     * @param context SynthContext identifying requestor
+     * @param state SynthContext identifying requestor
      * @param to Where to place Insets
      * @return Insets.
      */
@@ -435,7 +435,7 @@
      * Returns the default value for a particular property.  This is only
      * invoked if this style doesn't define a property for <code>key</code>.
      *
-     * @param state SynthContext identifying requestor
+     * @param context SynthContext identifying requestor
      * @param key Property being requested.
      * @return Value of the named property
      */
@@ -724,8 +724,6 @@
          *
          * @param state Component state(s) that this StateInfo should be used
          * for
-         * @param painter Painter responsible for rendering
-         * @param bgPainter Painter responsible for rendering the background
          * @param font Font for this state
          * @param colors Colors for this state
          */
--- a/jdk/src/java.desktop/share/classes/sun/swing/plaf/synth/Paint9Painter.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/swing/plaf/synth/Paint9Painter.java	Wed Jun 03 18:11:45 2015 -0700
@@ -118,7 +118,7 @@
      * @param dInsets Destination insets specifying the portion of the image
      *                will be stretched or tiled, if <code>null</code> empty
      *                <code>Insets</code> will be used.
-     * @param paintType Specifies what type of algorithm to use in painting
+     * @param type Specifies what type of algorithm to use in painting
      * @param mask Specifies portion of image to render, if
      *             <code>PAINT_ALL</code> is specified, any other regions
      *             specified will not be painted, for example
--- a/jdk/src/java.desktop/share/classes/sun/swing/text/TextComponentPrintable.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/share/classes/sun/swing/text/TextComponentPrintable.java	Wed Jun 03 18:11:45 2015 -0700
@@ -212,7 +212,7 @@
      * level {@code JEditorPanes}.  For instance if there is a frame
      * inside the frame it will return the top frame only.
      *
-     * @param c the container to find all frames under
+     * @param container the container to find all frames under
      * @param list {@code List} to append the results too
      */
     private static void getFrames(final Container container, List<JEditorPane> list) {
--- a/jdk/src/java.desktop/unix/classes/sun/awt/FcFontManager.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/FcFontManager.java	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 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
@@ -98,8 +98,7 @@
         return info;
     }
 
-    protected native String getFontPathNative(boolean noType1Fonts,
-                                              boolean isX11GE);
+    native String getFontPathNative(boolean noType1Fonts, boolean isX11GE);
 
     protected synchronized String getFontPath(boolean noType1Fonts) {
         return getFontPathNative(noType1Fonts, false);
--- a/jdk/src/java.desktop/unix/classes/sun/awt/UNIXToolkit.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/UNIXToolkit.java	Wed Jun 03 18:11:45 2015 -0700
@@ -189,7 +189,7 @@
      * @param stockId String which defines the stock id of the gtk item.
      * For a complete list reference the API at www.gtk.org for StockItems.
      * @param iconSize One of the GtkIconSize values defined in GTKConstants
-     * @param textDirection One of the TextDirection values defined in
+     * @param direction One of the TextDirection values defined in
      * GTKConstants
      * @param detail Render detail that is passed to the native engine (feel
      * free to pass null)
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XAtom.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XAtom.java	Wed Jun 03 18:11:45 2015 -0700
@@ -338,7 +338,6 @@
 
     /**  Gets the window property for the specified window
      * @param window window id to use
-     * @param str value to set to.
      * @return string with the property.
      * @since 1.5
      */
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XComponentPeer.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XComponentPeer.java	Wed Jun 03 18:11:45 2015 -0700
@@ -680,7 +680,6 @@
      *      obtained
      * @return the font metrics for <code>font</code>
      * @see       #getFont
-     * @see       #getPeer
      * @see       java.awt.peer.ComponentPeer#getFontMetrics(Font)
      * @see       Toolkit#getFontMetrics(Font)
      * @since     1.0
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XListPeer.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XListPeer.java	Wed Jun 03 18:11:45 2015 -0700
@@ -1952,7 +1952,6 @@
          * Paint the horizontal scrollbar to the screen
          *
          * @param g the graphics context to draw into
-         * @param colors the colors used to draw the scrollbar
          * @param paintAll paint the whole scrollbar if true, just the thumb if false
          */
         void paintHorScrollbar(Graphics g, boolean paintAll) {
@@ -1964,7 +1963,6 @@
          * Paint the vertical scrollbar to the screen
          *
          * @param g the graphics context to draw into
-         * @param colors the colors used to draw the scrollbar
          * @param paintAll paint the whole scrollbar if true, just the thumb if false
          */
         void paintVerScrollbar(Graphics g, boolean paintAll) {
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMenuBarPeer.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMenuBarPeer.java	Wed Jun 03 18:11:45 2015 -0700
@@ -222,7 +222,7 @@
     }
 
     /**
-     * @see XBaseMenuWindow.map
+     * @see XBaseMenuWindow#map
      */
     protected MappingData map() {
         XMenuItemPeer[] itemVector = copyItems();
@@ -292,7 +292,7 @@
     }
 
     /**
-     * @see XBaseMenuWindow.getSubmenuBounds
+     * @see XBaseMenuWindow#getSubmenuBounds
      */
     protected Rectangle getSubmenuBounds(Rectangle itemBounds, Dimension windowSize) {
         Rectangle globalBounds = toGlobal(itemBounds);
@@ -362,7 +362,7 @@
      ************************************************/
 
     /**
-     * @see XBaseMenuWindow.doDispose()
+     * @see XBaseMenuWindow#doDispose()
      */
     protected void doDispose() {
         super.doDispose();
@@ -388,7 +388,7 @@
 
     /**
      * Performs ungrabbing of input
-     * @see XBaseWindow.ungrabInputImpl()
+     * @see XBaseWindow#ungrabInputImpl()
      */
     void ungrabInputImpl() {
         selectItem(null, false);
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMenuItemPeer.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMenuItemPeer.java	Wed Jun 03 18:11:45 2015 -0700
@@ -437,7 +437,7 @@
      * Sets mapping of item to window.
      * @param bounds bounds of item in container's coordinates
      * @param textOrigin point for drawString in container's coordinates
-     * @see XBaseMenuWindow.map()
+     * @see XBaseMenuWindow#map()
      */
     void map(Rectangle bounds, Point textOrigin) {
         this.bounds = bounds;
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMenuWindow.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMenuWindow.java	Wed Jun 03 18:11:45 2015 -0700
@@ -192,14 +192,14 @@
      ************************************************/
 
     /**
-     * @see XBaseMenuWindow.getParentMenuWindow()
+     * @see XBaseMenuWindow#getParentMenuWindow()
      */
     protected XBaseMenuWindow getParentMenuWindow() {
         return (menuPeer != null) ? menuPeer.getContainer() : null;
     }
 
     /**
-     * @see XBaseMenuWindow.map()
+     * @see XBaseMenuWindow#map()
      */
     protected MappingData map() {
         //TODO:Implement popup-menu caption mapping and painting and tear-off
@@ -274,7 +274,7 @@
     }
 
     /**
-     * @see XBaseMenuWindow.getSubmenuBounds()
+     * @see XBaseMenuWindow#getSubmenuBounds
      */
     protected Rectangle getSubmenuBounds(Rectangle itemBounds, Dimension windowSize) {
         Rectangle globalBounds = toGlobal(itemBounds);
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollbar.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XScrollbar.java	Wed Jun 03 18:11:45 2015 -0700
@@ -161,8 +161,6 @@
      * paint the scrollbar
      * @param g the graphics context to paint into
      * @param colors the colors to use when painting the scrollbar
-     * @param width the width of the scrollbar
-     * @param height the height of the scrollbar
      * @param paintAll paint the whole scrollbar if true, just the thumb is false
      */
     void paint(Graphics g, Color colors[], boolean paintAll) {
@@ -393,7 +391,7 @@
 
     /**
      * Scroll one unit.
-     * @see notifyValue
+     * @see #notifyValue
      */
     void scroll() {
         switch (mode) {
@@ -607,7 +605,6 @@
      * @param minimum is the minimum value of the scrollbar
      * @param maximum is the maximum value of the scrollbar
      * @param unitSize is the unit size for increment or decrement of the value
-     * @param page is the block size for increment or decrement of the value
      * @see #setValues
      */
     synchronized void setValues(int value, int visible, int minimum, int maximum,
@@ -631,7 +628,7 @@
 
     /**
      * Sets the value of this Scrollbar to the specified value.
-     * @param value the new value of the Scrollbar. If this value is
+     * @param newValue the new value of the Scrollbar. If this value is
      * below the current minimum or above the current maximum minus
      * the visible amount, it becomes the new one of those values,
      * respectively.
@@ -655,7 +652,7 @@
 
     /**
      * Sets the minimum value for this Scrollbar.
-     * @param minimum the minimum value of the scrollbar
+     * @param newMinimum the minimum value of the scrollbar
      */
     synchronized void setMinimum(int newMinimum) {
         /* Use setValues so that a consistent policy
@@ -675,7 +672,7 @@
 
     /**
      * Sets the maximum value for this Scrollbar.
-     * @param maximum the maximum value of the scrollbar
+     * @param newMaximum the maximum value of the scrollbar
      */
     synchronized void setMaximum(int newMaximum) {
         /* Use setValues so that a consistent policy
@@ -694,7 +691,7 @@
     /**
      * Sets the visible amount of this Scrollbar, which is the range
      * of values represented by the width of the scroll bar's bubble.
-     * @param visible the amount visible per page
+     * @param newAmount the amount visible per page
      */
     synchronized void setVisibleAmount(int newAmount) {
         setValues(val, newAmount, min, max);
@@ -759,7 +756,7 @@
 
     /**
      * Returns the scale factor for the thumbArea ( thumbAreaH / (max - min)).
-     * @see #getArrowAreaSize
+     * @see #getArrowAreaWidth
      */
     private double getScaleFactor(){
         double f = (double)(barLength - 2*getArrowAreaWidth()) / Math.max(1,(max - min));
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java	Wed Jun 03 18:11:45 2015 -0700
@@ -616,14 +616,19 @@
                         }
                     }
                 }
-                if( keyEventLog.isLoggable(PlatformLogger.Level.FINE) && (ev.get_type() == XConstants.KeyPress || ev.get_type() == XConstants.KeyRelease) ) {
-                    keyEventLog.fine("before XFilterEvent:"+ev);
+                if (keyEventLog.isLoggable(PlatformLogger.Level.FINE) && (
+                        ev.get_type() == XConstants.KeyPress
+                                || ev.get_type() == XConstants.KeyRelease)) {
+                    keyEventLog.fine("before XFilterEvent:" + ev);
                 }
                 if (XlibWrapper.XFilterEvent(ev.getPData(), w)) {
                     continue;
                 }
-                if( keyEventLog.isLoggable(PlatformLogger.Level.FINE) && (ev.get_type() == XConstants.KeyPress || ev.get_type() == XConstants.KeyRelease) ) {
-                    keyEventLog.fine("after XFilterEvent:"+ev); // IS THIS CORRECT?
+                if (keyEventLog.isLoggable(PlatformLogger.Level.FINE) && (
+                        ev.get_type() == XConstants.KeyPress
+                                || ev.get_type() == XConstants.KeyRelease)) {
+                    keyEventLog.fine(
+                            "after XFilterEvent:" + ev); // IS THIS CORRECT?
                 }
 
                 dispatchEvent(ev);
@@ -639,21 +644,28 @@
         }
     }
 
+    /**
+     * Listener installed to detect display changes.
+     */
+    private static final DisplayChangedListener displayChangedHandler =
+            new DisplayChangedListener() {
+                @Override
+                public void displayChanged() {
+                    // 7045370: Reset the cached values
+                    XToolkit.screenWidth = -1;
+                    XToolkit.screenHeight = -1;
+                }
+
+                @Override
+                public void paletteChanged() {
+                }
+            };
+
     static {
         GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
         if (ge instanceof SunGraphicsEnvironment) {
-            ((SunGraphicsEnvironment)ge).addDisplayChangedListener(
-                new DisplayChangedListener() {
-                    @Override
-                    public void displayChanged() {
-                        // 7045370: Reset the cached values
-                        XToolkit.screenWidth = -1;
-                        XToolkit.screenHeight = -1;
-                    }
-
-                    @Override
-                    public void paletteChanged() {}
-            });
+            ((SunGraphicsEnvironment) ge).addDisplayChangedListener(
+                    displayChangedHandler);
         }
     }
 
@@ -663,7 +675,9 @@
             try {
                 XWindowAttributes pattr = new XWindowAttributes();
                 try {
-                    XlibWrapper.XGetWindowAttributes(XToolkit.getDisplay(), XToolkit.getDefaultRootWindow(), pattr.pData);
+                    XlibWrapper.XGetWindowAttributes(XToolkit.getDisplay(),
+                                                     XToolkit.getDefaultRootWindow(),
+                                                     pattr.pData);
                     screenWidth  = pattr.get_width();
                     screenHeight = pattr.get_height();
                 } finally {
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11FontManager.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11FontManager.java	Wed Jun 03 18:11:45 2015 -0700
@@ -44,7 +44,6 @@
 import sun.font.CompositeFont;
 import sun.font.FontManager;
 import sun.font.SunFontManager;
-import sun.font.FontConfigManager;
 import sun.font.FcFontConfiguration;
 import sun.font.FontAccess;
 import sun.font.FontUtilities;
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11GraphicsConfig.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11GraphicsConfig.java	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -27,7 +27,6 @@
 
 import java.awt.AWTException;
 import java.awt.BufferCapabilities;
-import java.awt.BufferCapabilities.FlipContents;
 import java.awt.Component;
 import java.awt.Toolkit;
 import java.awt.GraphicsConfiguration;
@@ -35,7 +34,6 @@
 import java.awt.Image;
 import java.awt.ImageCapabilities;
 import java.awt.Transparency;
-import java.awt.image.BufferedImage;
 import java.awt.image.ColorModel;
 import java.awt.color.ColorSpace;
 import java.awt.image.ComponentColorModel;
@@ -55,13 +53,12 @@
 import sun.awt.image.OffScreenImage;
 import sun.awt.image.SunVolatileImage;
 import sun.awt.image.SurfaceManager;
-import sun.awt.X11ComponentPeer;
 
 /**
  * This is an implementation of a GraphicsConfiguration object for a
  * single X11 visual.
  *
- * @see GraphicsEnvironment
+ * @see java.awt.GraphicsEnvironment
  * @see GraphicsDevice
  */
 public class X11GraphicsConfig extends GraphicsConfiguration
@@ -314,7 +311,7 @@
         return pGetBounds(screen.getScreen());
     }
 
-    public native Rectangle pGetBounds(int screenNum);
+    private native Rectangle pGetBounds(int screenNum);
 
     private static class XDBECapabilities extends BufferCapabilities {
         public XDBECapabilities() {
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11GraphicsDevice.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11GraphicsDevice.java	Wed Jun 03 18:11:45 2015 -0700
@@ -52,10 +52,8 @@
  * @see GraphicsEnvironment
  * @see GraphicsConfiguration
  */
-public class X11GraphicsDevice
-    extends GraphicsDevice
-    implements DisplayChangedListener
-{
+public final class X11GraphicsDevice extends GraphicsDevice
+        implements DisplayChangedListener {
     int screen;
     HashMap<SurfaceType, Object> x11ProxyKeyMap = new HashMap<>();
 
@@ -201,16 +199,15 @@
     /*
      * Returns the depth for the given index of graphics configurations.
      */
-    public native int getConfigDepth (int index, int screen);
+    private native int getConfigDepth(int index, int screen);
 
     /*
      * Returns the colormap for the given index of graphics configurations.
      */
-    public native int getConfigColormap (int index, int screen);
-
+    private native int getConfigColormap(int index, int screen);
 
     // Whether or not double-buffering extension is supported
-    public static native boolean isDBESupported();
+    static native boolean isDBESupported();
     // Callback for adding a new double buffer visual into our set
     private void addDoubleBufferVisual(int visNum) {
         doubleBufferVisuals.add(Integer.valueOf(visNum));
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11GraphicsEnvironment.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11GraphicsEnvironment.java	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -29,13 +29,6 @@
 import java.awt.GraphicsDevice;
 import java.awt.Point;
 import java.awt.Rectangle;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.FileNotFoundException;
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.StreamTokenizer;
 import java.net.InetAddress;
 import java.net.NetworkInterface;
 import java.net.SocketException;
@@ -43,11 +36,6 @@
 
 import java.util.*;
 
-import sun.font.MFontConfiguration;
-import sun.font.FcFontConfiguration;
-import sun.font.Font2D;
-import sun.font.FontManager;
-import sun.font.NativeFont;
 import sun.java2d.SunGraphicsEnvironment;
 import sun.java2d.SurfaceManagerFactory;
 import sun.java2d.UnixSurfaceManagerFactory;
@@ -60,11 +48,10 @@
  * for X11 environments.
  *
  * @see GraphicsDevice
- * @see GraphicsConfiguration
+ * @see java.awt.GraphicsConfiguration
  */
-public class X11GraphicsEnvironment
-    extends SunGraphicsEnvironment
-{
+public final class X11GraphicsEnvironment extends SunGraphicsEnvironment {
+
     private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11GraphicsEnvironment");
     private static final PlatformLogger screenLog = PlatformLogger.getLogger("sun.awt.screen.X11GraphicsEnvironment");
 
@@ -200,7 +187,7 @@
         return new X11GraphicsDevice(screennum);
     }
 
-    protected native int getDefaultScreenNum();
+    private native int getDefaultScreenNum();
     /**
      * Returns the default screen graphics device.
      */
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11InputMethod.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11InputMethod.java	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -35,16 +35,9 @@
 import java.awt.Container;
 import java.awt.EventQueue;
 import java.awt.Window;
-import java.awt.im.InputContext;
 import java.awt.im.InputMethodHighlight;
 import java.awt.im.spi.InputMethodContext;
 import sun.awt.im.InputMethodAdapter;
-import java.awt.event.InputEvent;
-import java.awt.event.KeyEvent;
-import java.awt.event.MouseEvent;
-import java.awt.event.FocusEvent;
-import java.awt.event.ComponentEvent;
-import java.awt.event.WindowEvent;
 import java.awt.event.InputMethodEvent;
 import java.awt.font.TextAttribute;
 import java.awt.font.TextHitInfo;
@@ -555,7 +548,7 @@
      * method is invoked from the event handler in canvas.c in the
      * AWT Toolkit thread context and thus inside the AWT Lock.
      * @param   str     committed text
-     * @param   long    when
+     * @param   when    when
      */
     // NOTE: This method may be called by privileged threads.
     //       This functionality is implemented in a package-private method
@@ -1095,7 +1088,7 @@
     /*
      * Native methods
      */
-    protected native String resetXIC();
+    private native String resetXIC();
     private native void disposeXIC();
     private native boolean setCompositionEnabledNative(boolean enable);
     private native boolean isCompositionEnabledNative();
--- a/jdk/src/java.desktop/unix/classes/sun/font/FontConfigManager.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/unix/classes/sun/font/FontConfigManager.java	Wed Jun 03 18:11:45 2015 -0700
@@ -436,12 +436,6 @@
         return (fcInfo.compFont = new CompositeFont(physFont, jdkFont));
     }
 
-    /**
-     *
-     * @param locale
-     * @param fcFamily
-     * @return
-     */
     public FcCompFont[] getFontConfigFonts() {
         return fontConfigFonts;
     }
--- a/jdk/src/java.desktop/unix/native/common/awt/utility/rect.h	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/unix/native/common/awt/utility/rect.h	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2014, 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
--- a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_InputMethod.c	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_InputMethod.c	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -904,7 +904,6 @@
 static Bool
 createXIC(JNIEnv * env, X11InputMethodData *pX11IMData, Window w)
 {
-    XIC active_ic, passive_ic;
     XVaNestedList preedit = NULL;
     XVaNestedList status = NULL;
     XIMStyle on_the_spot_styles = XIMPreeditCallbacks,
@@ -974,6 +973,12 @@
     }
 
     if (active_styles == on_the_spot_styles) {
+        pX11IMData->ic_passive = XCreateIC(X11im,
+                                   XNClientWindow, w,
+                                   XNFocusWindow, w,
+                                   XNInputStyle, passive_styles,
+                                   NULL);
+
         callbacks = (XIMCallback *)malloc(sizeof(XIMCallback) * NCALLBACKS);
         if (callbacks == (XIMCallback *)NULL)
             return False;
@@ -1024,12 +1029,6 @@
                                               NULL);
         XFree((void *)preedit);
 #endif /* __linux__ || MACOSX */
-        pX11IMData->ic_passive = XCreateIC(X11im,
-                                           XNClientWindow, w,
-                                           XNFocusWindow, w,
-                                           XNInputStyle, passive_styles,
-                                           NULL);
-
     } else {
         pX11IMData->ic_active = XCreateIC(X11im,
                                           XNClientWindow, w,
--- a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.c	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.c	Wed Jun 03 18:11:45 2015 -0700
@@ -1313,9 +1313,6 @@
             {
                 result = gtk2_widgets[_GTK_COMBO_BOX_TEXT_FIELD_TYPE] =
                      (*fp_gtk_entry_new)();
-
-                GtkSettings* settings = fp_gtk_widget_get_settings(result);
-                fp_g_object_set(settings, "gtk-cursor-blink", FALSE, NULL);
             }
             result = gtk2_widgets[_GTK_COMBO_BOX_TEXT_FIELD_TYPE];
             break;
@@ -1360,10 +1357,6 @@
             {
                 gtk2_widgets[_GTK_ENTRY_TYPE] =
                     (*fp_gtk_entry_new)();
-
-                GtkSettings* settings =
-                    fp_gtk_widget_get_settings(gtk2_widgets[_GTK_ENTRY_TYPE]);
-                fp_g_object_set(settings, "gtk-cursor-blink", FALSE, NULL);
             }
             result = gtk2_widgets[_GTK_ENTRY_TYPE];
             break;
@@ -1555,9 +1548,6 @@
             {
                 result = gtk2_widgets[_GTK_SPIN_BUTTON_TYPE] =
                     (*fp_gtk_spin_button_new)(NULL, 0, 0);
-
-                GtkSettings* settings = fp_gtk_widget_get_settings(result);
-                fp_g_object_set(settings, "gtk-cursor-blink", FALSE, NULL);
             }
             result = gtk2_widgets[_GTK_SPIN_BUTTON_TYPE];
             break;
@@ -2507,14 +2497,20 @@
 
     return result;
 }
-/*
+
 jobject get_integer_property(JNIEnv *env, GtkSettings* settings, const gchar* key)
 {
-    gint    intval = NULL;
-
+    gint intval = NULL;
     (*fp_g_object_get)(settings, key, &intval, NULL);
     return create_Integer(env, intval);
-}*/
+}
+
+jobject get_boolean_property(JNIEnv *env, GtkSettings* settings, const gchar* key)
+{
+    gint intval = NULL;
+    (*fp_g_object_get)(settings, key, &intval, NULL);
+    return create_Boolean(env, intval);
+}
 
 jobject gtk2_get_setting(JNIEnv *env, Setting property)
 {
@@ -2526,6 +2522,10 @@
             return get_string_property(env, settings, "gtk-font-name");
         case GTK_ICON_SIZES:
             return get_string_property(env, settings, "gtk-icon-sizes");
+        case GTK_CURSOR_BLINK:
+            return get_boolean_property(env, settings, "gtk-cursor-blink");
+        case GTK_CURSOR_BLINK_TIME:
+            return get_integer_property(env, settings, "gtk-cursor-blink-time");
     }
 
     return NULL;
--- a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.h	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.h	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2015, 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
@@ -140,7 +140,9 @@
 typedef enum _Setting
 {
     GTK_FONT_NAME,
-    GTK_ICON_SIZES
+    GTK_ICON_SIZES,
+    GTK_CURSOR_BLINK,
+    GTK_CURSOR_BLINK_TIME
 } Setting;
 
 /* GTK types, here to eliminate need for GTK headers at compile time */
--- a/jdk/src/java.desktop/windows/classes/sun/awt/Win32FontManager.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/Win32FontManager.java	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2015, 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
@@ -279,9 +279,9 @@
          });
     }
 
-    protected static native void registerFontWithPlatform(String fontName);
+    private static native void registerFontWithPlatform(String fontName);
 
-    protected static native void deRegisterFontWithPlatform(String fontName);
+    private static native void deRegisterFontWithPlatform(String fontName);
 
     /**
      * populate the map with the most common windows fonts.
--- a/jdk/src/java.desktop/windows/classes/sun/awt/Win32GraphicsDevice.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/Win32GraphicsDevice.java	Wed Jun 03 18:11:45 2015 -0700
@@ -226,7 +226,7 @@
      * are disabled.  Do not call this function with an index of 0.
      * @param index a PixelFormat index
      */
-    protected native boolean isPixFmtSupported(int index, int screen);
+    private native boolean isPixFmtSupported(int index, int screen);
 
     /**
      * Returns the PixelFormatID of the default graphics configuration
--- a/jdk/src/java.desktop/windows/classes/sun/awt/Win32GraphicsEnvironment.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/Win32GraphicsEnvironment.java	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -28,19 +28,11 @@
 import java.awt.AWTError;
 import java.awt.GraphicsConfiguration;
 import java.awt.GraphicsDevice;
-import java.awt.GraphicsEnvironment;
-import java.awt.Toolkit;
 import java.awt.peer.ComponentPeer;
-import java.io.File;
-import java.io.IOException;
 import java.lang.ref.WeakReference;
 import java.util.ArrayList;
 import java.util.ListIterator;
-import java.util.NoSuchElementException;
-import java.util.StringTokenizer;
-import sun.awt.DisplayChangedListener;
-import sun.awt.SunDisplayChanger;
-import sun.awt.windows.WPrinterJob;
+
 import sun.awt.windows.WToolkit;
 import sun.java2d.SunGraphicsEnvironment;
 import sun.java2d.SurfaceManagerFactory;
@@ -57,9 +49,8 @@
  * @see GraphicsConfiguration
  */
 
-public class Win32GraphicsEnvironment
-    extends SunGraphicsEnvironment
-{
+public final class Win32GraphicsEnvironment extends SunGraphicsEnvironment {
+
     static {
         // Ensure awt is loaded already.  Also, this forces static init
         // of WToolkit and Toolkit, which we depend upon
@@ -91,7 +82,7 @@
     }
 
     protected native int getNumScreens();
-    protected native int getDefaultScreen();
+    private native int getDefaultScreen();
 
     public GraphicsDevice getDefaultScreenDevice() {
         GraphicsDevice[] screens = getScreenDevices();
--- a/jdk/src/java.desktop/windows/classes/sun/awt/shell/Win32ShellFolder2.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/shell/Win32ShellFolder2.java	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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
@@ -163,6 +163,27 @@
         }
     }
 
+    // Known Folder data
+    static class KnownFolderDefinition {
+        String guid;
+        int category;
+        String name;
+        String description;
+        String parent;
+        String relativePath;
+        String parsingName;
+        String tooltip;
+        String localizedName;
+        String icon;
+        String security;
+        long attributes;
+        int defenitionFlags;
+        String ftidType;
+        String path;
+        String saveLocation;
+        static final List<KnownFolderDefinition> libraries = getLibraries();
+    }
+
     static class FolderDisposer implements sun.java2d.DisposerRecord {
         /*
          * This is cached as a concession to getFolderType(), which needs
@@ -578,7 +599,22 @@
                 return s;
             }
         }
-        return getDisplayNameOf(parentIShellFolder, relativePIDL, SHGDN_FORPARSING);
+        String path = getDisplayNameOf(parentIShellFolder, relativePIDL,
+                        SHGDN_FORPARSING);
+        // if this is a library its default save location is taken as a path
+        // this is a temp fix until java.io starts support Libraries
+        if( path != null && path.startsWith("::{") &&
+                path.toLowerCase().endsWith(".library-ms")) {
+            for (KnownFolderDefinition kf : KnownFolderDefinition.libraries) {
+                if( path.toLowerCase().endsWith(
+                            kf.relativePath.toLowerCase()) &&
+                            path.toUpperCase().startsWith(
+                            kf.parsingName.substring(0, 40).toUpperCase()) ) {
+                    return kf.saveLocation;
+                }
+            }
+        }
+        return path;
     }
 
     // Needs to be accessible to Win32ShellFolderManager2
@@ -848,6 +884,9 @@
                                                   long relativePIDL,
                                                   int attrs);
 
+    // Returns data of all Known Folders registered in the system
+    private static native KnownFolderDefinition[] loadKnownFolders();
+
     /**
      * @return The name used to display this shell folder
      */
@@ -1178,4 +1217,26 @@
             return result == null ? 0 : result;
         }
     }
+
+    // Extracts libraries and their default save locations from Known Folders list
+    private static List<KnownFolderDefinition> getLibraries() {
+        return invoke(new Callable<List<KnownFolderDefinition>>() {
+            @Override
+            public List<KnownFolderDefinition> call() throws Exception {
+                KnownFolderDefinition[] all = loadKnownFolders();
+                List<KnownFolderDefinition> folders = new ArrayList<>();
+                if (all != null) {
+                    for (KnownFolderDefinition kf : all) {
+                        if (kf.relativePath == null || kf.parsingName == null ||
+                                kf.saveLocation == null) {
+                            continue;
+                        }
+                        folders.add(kf);
+                    }
+                }
+                return folders;
+            }
+        });
+    }
+
 }
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WComponentPeer.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WComponentPeer.java	Wed Jun 03 18:11:45 2015 -0700
@@ -663,7 +663,7 @@
      * This method is intentionally not synchronized as it is called while
      * holding other locks.
      *
-     * @see sun.java2d.d3d.D3DScreenUpdateManager#validate(D3DWindowSurfaceData)
+     * @see sun.java2d.d3d.D3DScreenUpdateManager#validate
      */
     public Color getBackgroundNoSync() {
         return background;
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WObjectPeer.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WObjectPeer.java	Wed Jun 03 18:11:45 2015 -0700
@@ -31,9 +31,9 @@
     }
 
     // The Windows handle for the native widget.
-    long pData;
+    volatile long pData;
     // if the native peer has been destroyed
-    boolean destroyed = false;
+    volatile boolean destroyed = false;
     // The associated AWT object.
     Object target;
 
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WPathGraphics.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WPathGraphics.java	Wed Jun 03 18:11:45 2015 -0700
@@ -386,7 +386,7 @@
      * such as Hebrew and Arabic, the glyphs can be rendered from right to
      * left, in which case the coordinate supplied is the location of the
      * leftmost character on the baseline.
-     * @param s the <code>String</code> to be rendered
+     * @param str the <code>String</code> to be rendered
      * @param x,&nbsp;y the coordinates where the <code>String</code>
      * should be rendered
      * @see #setPaint
@@ -877,7 +877,7 @@
      * is transformed by the supplied AffineTransform and
      * drawn using GDI to the printer context.
      *
-     * @param   img     The image to be drawn.
+     * @param   image   The image to be drawn.
      * @param   xform   Used to transform the image before drawing.
      *                  This can be null.
      * @param   bgcolor This color is drawn where the image has transparent
--- a/jdk/src/java.desktop/windows/classes/sun/awt/windows/WPrinterJob.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/windows/classes/sun/awt/windows/WPrinterJob.java	Wed Jun 03 18:11:45 2015 -0700
@@ -591,7 +591,7 @@
      * Throws <code>PrinterException</code> if the specified service
      * cannot support the <code>Pageable</code> and
      * </code>Printable</code> interfaces necessary to support 2D printing.
-     * @param a print service which supports 2D printing.
+     * @param service print service which supports 2D printing.
      *
      * @throws PrinterException if the specified service does not support
      * 2D printing.
--- a/jdk/src/java.desktop/windows/classes/sun/java2d/d3d/D3DScreenUpdateManager.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/windows/classes/sun/java2d/d3d/D3DScreenUpdateManager.java	Wed Jun 03 18:11:45 2015 -0700
@@ -59,7 +59,7 @@
  * GDIWindowSurfaceData. A background thread handles the swap chain flips.
  *
  * There are some restrictions to which windows we would use this for.
- * @see #createScreenSurface()
+ * @see #createScreenSurface
  */
 public class D3DScreenUpdateManager extends ScreenUpdateManager
     implements Runnable
@@ -290,7 +290,7 @@
     /**
      * Adds a surface to the list of tracked surfaces.
      *
-     * @param d3dw the surface to be added
+     * @param sd the surface to be added
      */
     private void trackScreenSurface(SurfaceData sd) {
         if (!done && sd instanceof D3DWindowSurfaceData) {
--- a/jdk/src/java.desktop/windows/classes/sun/java2d/d3d/D3DSurfaceData.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/windows/classes/sun/java2d/d3d/D3DSurfaceData.java	Wed Jun 03 18:11:45 2015 -0700
@@ -118,7 +118,7 @@
 
     /**
      * To be used with getNativeResource() only.
-     * @see #getNativeResource()
+     * @see #getNativeResource
      */
     public static final int D3D_DEVICE_RESOURCE= 100;
     /*
--- a/jdk/src/java.desktop/windows/classes/sun/java2d/opengl/WGLSurfaceData.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/windows/classes/sun/java2d/opengl/WGLSurfaceData.java	Wed Jun 03 18:11:45 2015 -0700
@@ -244,7 +244,7 @@
      * Updates the layered window with the contents of the surface.
      *
      * @param psdops pointer to the native ogl sd structure
-     * @param pData pointer to the AwtWindow peer data
+     * @param peer pointer to the AwtWindow peer data
      * @param w width of the window
      * @param h height of the window
      * @see sun.awt.windows.TranslucentWindowPainter
--- a/jdk/src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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
@@ -64,6 +64,19 @@
 
 //#include <sun_awt_shell_Win32ShellFolder2.h>
 
+#ifndef DASSERT
+#define DASSERT(x)
+#endif
+#define DEFINE_FIELD_ID(var, cls, field, type)                            \
+    jfieldID var = env->GetFieldID(cls, field, type);                     \
+    DASSERT(var != NULL);                                                 \
+    CHECK_NULL_RETURN(var, NULL);
+
+#define EXCEPTION_CHECK                                                   \
+   if(env->ExceptionCheck()) {                                            \
+        throw std::bad_alloc();                                           \
+   }
+
 // Shell Functions
 typedef BOOL (WINAPI *DestroyIconType)(HICON);
 typedef HINSTANCE (WINAPI *FindExecutableType)(LPCTSTR,LPCTSTR,LPTSTR);
@@ -1263,5 +1276,216 @@
     return 0;
 }
 
+/*
+ * Class:     sun_awt_shell_Win32ShellFolder2
+ * Method:    loadKnownFolders
+ * Signature: (V)[BLsun/awt/shell/Win32ShellFolder2$KnownfolderDefenition;
+ */
+JNIEXPORT jobjectArray JNICALL Java_sun_awt_shell_Win32ShellFolder2_loadKnownFolders
+    (JNIEnv* env, jclass cls )
+{
+    CoInitialize(NULL);
+    IKnownFolderManager* pkfm = NULL;
+    HRESULT hr = CoCreateInstance(CLSID_KnownFolderManager, NULL,
+                                CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&pkfm));
+    if (!SUCCEEDED(hr)) return NULL;
+
+    TRY;
+
+    jclass cl = env->FindClass("sun/awt/shell/Win32ShellFolder2$KnownFolderDefinition");
+    CHECK_NULL_RETURN(cl, NULL);
+    DEFINE_FIELD_ID(field_guid, cl, "guid", "Ljava/lang/String;")
+    DEFINE_FIELD_ID(field_name, cl, "name", "Ljava/lang/String;");
+    DEFINE_FIELD_ID(field_description, cl, "description", "Ljava/lang/String;");
+    DEFINE_FIELD_ID(field_parent, cl, "parent", "Ljava/lang/String;");
+    DEFINE_FIELD_ID(field_relativePath, cl, "relativePath", "Ljava/lang/String;");
+    DEFINE_FIELD_ID(field_parsingName, cl, "parsingName", "Ljava/lang/String;");
+    DEFINE_FIELD_ID(field_tooltip, cl, "tooltip", "Ljava/lang/String;");
+    DEFINE_FIELD_ID(field_localizedName, cl, "localizedName", "Ljava/lang/String;");
+    DEFINE_FIELD_ID(field_icon, cl, "icon", "Ljava/lang/String;");
+    DEFINE_FIELD_ID(field_security, cl, "security", "Ljava/lang/String;");
+    DEFINE_FIELD_ID(field_path, cl, "path", "Ljava/lang/String;");
+    DEFINE_FIELD_ID(field_saveLocation, cl, "saveLocation", "Ljava/lang/String;");
+    DEFINE_FIELD_ID(field_category, cl, "category", "I");
+    DEFINE_FIELD_ID(field_attributes, cl, "attributes", "J");
+    DEFINE_FIELD_ID(field_defenitionFlags, cl, "defenitionFlags", "I");
+    DEFINE_FIELD_ID(field_ftidType, cl, "ftidType", "Ljava/lang/String;");
+
+    jobjectArray result;
+    KNOWNFOLDERID* pFoldersIds = NULL;
+    UINT count = 0;
+    if (SUCCEEDED(pkfm->GetFolderIds(&pFoldersIds, &count))) {
+        jmethodID initMethod;
+        try {
+            result = env->NewObjectArray(count, cl, NULL);
+            initMethod = env->GetMethodID(cl, "<init>", "()V");
+            EXCEPTION_CHECK
+        } catch (std::bad_alloc&) {
+            CoTaskMemFree(pFoldersIds);
+            pkfm->Release();
+            throw;
+        }
+        for(UINT i = 0; i < count; ++i)
+        {
+            jobject fld;
+            const KNOWNFOLDERID& folderId = pFoldersIds[i];
+            LPOLESTR guid = NULL;
+            try {
+                fld = env->NewObject(cl, initMethod);
+                if (fld) {
+                    env->SetObjectArrayElement(result, i, fld);
+                }
+                EXCEPTION_CHECK
+
+                if (SUCCEEDED(StringFromCLSID(folderId, &guid))) {
+                    jstring jstr = JNU_NewStringPlatform(env, guid);
+                    if (jstr) {
+                        env->SetObjectField(fld, field_guid, jstr);
+                    }
+                    CoTaskMemFree(guid);
+                    EXCEPTION_CHECK
+                }
+            } catch (std::bad_alloc&) {
+                CoTaskMemFree(pFoldersIds);
+                pkfm->Release();
+                throw;
+            }
+
+            IKnownFolder* pFolder = NULL;
+            if (SUCCEEDED(pkfm->GetFolder(folderId, &pFolder))) {
+                KNOWNFOLDER_DEFINITION kfDef;
+                if (SUCCEEDED(pFolder->GetFolderDefinition(&kfDef)))
+                {
+                    try {
+                        jstring jstr = JNU_NewStringPlatform(env, kfDef.pszName);
+                        if(jstr) {
+                            env->SetObjectField(fld, field_name, jstr);
+                        }
+                        EXCEPTION_CHECK
+                        if (kfDef.pszDescription) {
+                            jstr = JNU_NewStringPlatform(env, kfDef.pszDescription);
+                            if (jstr) {
+                                env->SetObjectField(fld, field_description, jstr);
+                            }
+                            EXCEPTION_CHECK
+                        }
+                        EXCEPTION_CHECK
+                        if (SUCCEEDED(StringFromCLSID(kfDef.fidParent, &guid))) {
+                            jstr = JNU_NewStringPlatform(env, guid);
+                            if (jstr) {
+                                env->SetObjectField(fld, field_parent, jstr);
+                            }
+                            CoTaskMemFree(guid);
+                            EXCEPTION_CHECK
+                        }
+                        if (kfDef.pszRelativePath) {
+                            jstr = JNU_NewStringPlatform(env, kfDef.pszRelativePath);
+                            if (jstr) {
+                                env->SetObjectField(fld, field_relativePath, jstr);
+                            }
+                            EXCEPTION_CHECK
+                        }
+                        if (kfDef.pszParsingName) {
+                            jstr = JNU_NewStringPlatform(env, kfDef.pszParsingName);
+                            if (jstr) {
+                                env->SetObjectField(fld, field_parsingName, jstr);
+                            }
+                            EXCEPTION_CHECK
+                        }
+                        if (kfDef.pszTooltip) {
+                            jstr = JNU_NewStringPlatform(env, kfDef.pszTooltip);
+                            if (jstr) {
+                                env->SetObjectField(fld, field_tooltip, jstr);
+                            }
+                            EXCEPTION_CHECK
+                        }
+                        if (kfDef.pszLocalizedName) {
+                            jstr = JNU_NewStringPlatform(env, kfDef.pszLocalizedName);
+                            if (jstr) {
+                                env->SetObjectField(fld, field_localizedName, jstr);
+                            }
+                            EXCEPTION_CHECK
+                        }
+                        if (kfDef.pszIcon) {
+                            jstr = JNU_NewStringPlatform(env, kfDef.pszIcon);
+                            if (jstr) {
+                                env->SetObjectField(fld, field_icon, jstr);
+                            }
+                            EXCEPTION_CHECK
+                        }
+                        if (kfDef.pszSecurity) {
+                            jstr = JNU_NewStringPlatform(env, kfDef.pszSecurity);
+                            if (jstr) {
+                                env->SetObjectField(fld, field_security, jstr);
+                            }
+                            EXCEPTION_CHECK
+                        }
+                        if (SUCCEEDED(StringFromCLSID(kfDef.ftidType, &guid))) {
+                            jstr = JNU_NewStringPlatform(env, guid);
+                            if (jstr) {
+                                env->SetObjectField(fld, field_ftidType, jstr);
+                            }
+                            CoTaskMemFree(guid);
+                            EXCEPTION_CHECK
+                        }
+                        env->SetIntField(fld, field_category, kfDef.category);
+                        env->SetIntField(fld, field_defenitionFlags, kfDef.kfdFlags);
+                        env->SetLongField(fld, field_attributes, kfDef.dwAttributes);
+
+                        LPWSTR folderPath = NULL;
+                        if (SUCCEEDED(pFolder->GetPath(KF_FLAG_NO_ALIAS, &folderPath))
+                                    && folderPath) {
+                            jstr = JNU_NewStringPlatform(env, folderPath);
+                            if (jstr) {
+                                env->SetObjectField(fld, field_path, jstr);
+                            }
+                            CoTaskMemFree(folderPath);
+                            EXCEPTION_CHECK
+                        }
+
+                        IShellLibrary *plib = NULL;
+                        hr = CoCreateInstance(CLSID_ShellLibrary, NULL,
+                                         CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&plib));
+                        if (SUCCEEDED(hr)) {
+                            hr = plib->LoadLibraryFromKnownFolder(folderId, STGM_READWRITE);
+                            if (SUCCEEDED(hr)) {
+                                IShellItem *item = NULL;
+                                hr = plib->GetDefaultSaveFolder(DSFT_DETECT,
+                                        IID_PPV_ARGS(&item));
+                                if (SUCCEEDED(hr) && item) {
+                                    LPWSTR loc = NULL;
+                                    hr = item->GetDisplayName(SIGDN_FILESYSPATH, &loc);
+                                    if (SUCCEEDED(hr) && loc)
+                                    {
+                                        jstr = JNU_NewStringPlatform(env, loc);
+                                        if (jstr) {
+                                            env->SetObjectField(fld, field_saveLocation, jstr);
+                                        }
+                                        CoTaskMemFree(loc);
+                                    }
+                                    item->Release();
+                                }
+                            }
+                            plib->Release();
+                            EXCEPTION_CHECK
+                        }
+                        FreeKnownFolderDefinitionFields(&kfDef);
+                    } catch (std::bad_alloc&) {
+                        FreeKnownFolderDefinitionFields(&kfDef);
+                        pFolder->Release();
+                        CoTaskMemFree(pFoldersIds);
+                        pkfm->Release();
+                        throw;
+                    }
+                }
+            }
+            pFolder->Release();
+        }
+        CoTaskMemFree(pFoldersIds);
+    }
+    pkfm->Release();
+    return result;
+    CATCH_BAD_ALLOC_RET(NULL);
+}
 
 } // extern "C"
--- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_Frame.cpp	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_Frame.cpp	Wed Jun 03 18:11:45 2015 -0700
@@ -1864,6 +1864,7 @@
 
     AwtFrame::activateEmbeddingTopLevelMID = env->GetMethodID(cls, "activateEmbeddingTopLevel", "()V");
     DASSERT(AwtFrame::activateEmbeddingTopLevelMID != NULL);
+    CHECK_NULL(AwtFrame::activateEmbeddingTopLevelMID);
 
     AwtFrame::isEmbeddedInIEID = env->GetFieldID(cls, "isEmbeddedInIE", "Z");
     DASSERT(AwtFrame::isEmbeddedInIEID != NULL);
--- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_Menu.cpp	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_Menu.cpp	Wed Jun 03 18:11:45 2015 -0700
@@ -239,6 +239,7 @@
     }
     jobject menuItem = env->CallObjectMethod(target, AwtMenu::getItemMID,
                                              index);
+    if (!menuItem) return NULL; // menu item was removed concurrently
     DASSERT(!safe_ExceptionOccurred(env));
 
     jobject wMenuItemPeer = GetPeerForTarget(env, menuItem);
@@ -264,9 +265,9 @@
     }
     /* target is a java.awt.Menu */
     jobject target = GetTarget(env);
-
+    if(!target || env->ExceptionCheck()) return;
     int nCount = CountItem(target);
-    for (int i = 0; i < nCount; i++) {
+    for (int i = 0; i < nCount && !env->ExceptionCheck(); i++) {
         AwtMenuItem* awtMenuItem = GetItem(target, i);
         if (awtMenuItem != NULL) {
             SendDrawItem(awtMenuItem, drawInfo);
@@ -294,8 +295,9 @@
     }
    /* target is a java.awt.Menu */
     jobject target = GetTarget(env);
+    if(!target || env->ExceptionCheck()) return;
     int nCount = CountItem(target);
-    for (int i = 0; i < nCount; i++) {
+    for (int i = 0; i < nCount && !env->ExceptionCheck(); i++) {
         AwtMenuItem* awtMenuItem = GetItem(target, i);
         if (awtMenuItem != NULL) {
             SendMeasureItem(awtMenuItem, hDC, measureInfo);
--- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_MenuBar.cpp	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_MenuBar.cpp	Wed Jun 03 18:11:45 2015 -0700
@@ -156,13 +156,16 @@
     }
 
     jobject menu = env->CallObjectMethod(target, AwtMenuBar::getMenuMID,index);
+    if (!menu) return NULL; // menu item was removed concurrently
     DASSERT(!safe_ExceptionOccurred(env));
 
     jobject menuItemPeer = GetPeerForTarget(env, menu);
     PDATA pData;
-    JNI_CHECK_PEER_RETURN_NULL(menuItemPeer);
+    JNI_CHECK_PEER_GOTO(menuItemPeer, done);
+
     AwtMenuItem* awtMenuItem = (AwtMenuItem*)pData;
 
+done:
     env->DeleteLocalRef(menu);
     env->DeleteLocalRef(menuItemPeer);
 
--- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_MenuItem.cpp	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_MenuItem.cpp	Wed Jun 03 18:11:45 2015 -0700
@@ -112,6 +112,7 @@
 
     JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
     if (m_peerObject != NULL) {
+        JNI_SET_DESTROYED(m_peerObject);
         JNI_SET_PDATA(m_peerObject, NULL);
         env->DeleteGlobalRef(m_peerObject);
         m_peerObject = NULL;
--- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_new.cpp	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_new.cpp	Wed Jun 03 18:11:45 2015 -0700
@@ -172,6 +172,9 @@
             env->ExceptionClear();
             // rethrow exception
             env->Throw(xcp);
+            // temp solution to reveal all concurrency issues in jtreg and JCK
+            // we will switch it back to silent mode before the release
+            env->ExceptionDescribe();
             return xcp;
         }
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Component/SetEnabledPerformance/SetEnabledPerformance.java	Wed Jun 03 18:11:45 2015 -0700
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2015, 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.FlowLayout;
+import java.awt.Frame;
+import java.awt.Robot;
+
+import javax.swing.JButton;
+import javax.swing.SwingUtilities;
+
+/**
+ * @test
+ * @bug 8071306
+ * @author Sergey Bylokhov
+ */
+public final class SetEnabledPerformance {
+
+    private static Frame frame;
+
+    private static void createAndShowGUI() {
+        frame = new Frame();
+        frame.setLayout(new FlowLayout(FlowLayout.CENTER, 25, 0));
+        frame.setSize(600, 600);
+        frame.setLocationRelativeTo(null);
+        for (int i = 1; i < 10001; ++i) {
+            frame.add(new JButton("Button " + i));
+        }
+        frame.setVisible(true);
+    }
+
+    public static void main(final String[] args) throws Exception {
+        SwingUtilities.invokeAndWait(() -> createAndShowGUI());
+        final Robot robot = new Robot();
+        robot.waitForIdle();
+        robot.mouseMove(frame.getX() + 15, frame.getY() + 300);
+        robot.waitForIdle();
+        SwingUtilities.invokeAndWait(() -> {
+            long m = System.currentTimeMillis();
+            for (final Component comp : frame.getComponents()) {
+                comp.setEnabled(false);
+            }
+            m = System.currentTimeMillis() - m;
+            System.err.println("Disabled in " + m + " ms");
+            frame.dispose();
+            // we should be much faster, but leaves 1000 for the slow systems
+            if (m > 1000) {
+                throw new RuntimeException("Too slow");
+            }
+        });
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/EventQueue/6980209/bug6980209.java	Wed Jun 03 18:11:45 2015 -0700
@@ -0,0 +1,241 @@
+/*
+ * Copyright (c) 2015, 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 6980209
+   @summary Make tracking SecondaryLoop.enter/exit methods easier
+   @author Semyon Sadetsky
+  */
+
+import sun.util.logging.PlatformLogger;
+
+import javax.swing.*;
+import java.awt.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.KeyListener;
+
+public class bug6980209 implements ActionListener {
+    private final static PlatformLogger log =
+            PlatformLogger.getLogger("java.awt.event.WaitDispatchSupport");
+    public static final int ATTEMPTS = 100;
+    public static final int EVENTS = 5;
+
+    private static boolean runInEDT;
+    private static JFrame frame;
+    private static int disorderCounter = 0;
+    private static Boolean enterReturn;
+    private static Boolean exitReturn;
+    private static int dispatchedEvents;
+
+    public static void main(String[] args) throws Exception {
+        System.out.println(
+                "PLEASE DO NOT TOUCH KEYBOARD AND MOUSE DURING THE TEST RUN!");
+        // log.setLevel(PlatformLogger.Level.FINE);
+        // log.setLevel(PlatformLogger.Level.FINEST);
+        try {
+            SwingUtilities.invokeAndWait(new Runnable() {
+                public void run() {
+                    frame = new JFrame();
+                    frame.setUndecorated(true);
+                    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+                    setup(frame);
+                }
+            });
+            testExitBeforeEnter();
+            System.out.println("Run random test in EDT");
+            runInEDT = true;
+            testRandomly();
+            System.out.println("Run random test in another thread");
+            runInEDT = false;
+            testRandomly();
+            System.out.println("ok");
+
+        } finally {
+            SwingUtilities.invokeAndWait(new Runnable() {
+                @Override
+                public void run() {
+                    frame.dispose();
+                }
+            });
+        }
+    }
+
+    private static void testExitBeforeEnter() throws Exception {
+        final SecondaryLoop loop =
+                Toolkit.getDefaultToolkit().getSystemEventQueue()
+                        .createSecondaryLoop();
+        loop.exit();
+        Robot robot = new Robot();
+        robot.mouseWheel(1);
+        robot.waitForIdle();
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                if(loop.enter()) {
+                    throw new RuntimeException("Wrong enter() return value");
+                }
+            }
+        });
+    }
+
+    private static void testRandomly() throws AWTException {
+        disorderCounter = 0;
+        final Robot robot = new Robot();
+        for (int i = 0; i < ATTEMPTS; i++) {
+            enterReturn = null;
+            exitReturn = null;
+            dispatchedEvents = 0;
+            synchronized (bug6980209.class) {
+                try {
+                    for (int j = 0; j < EVENTS; j++) {
+                        robot.keyPress(KeyEvent.VK_1);
+                        robot.keyRelease(KeyEvent.VK_1);
+                    }
+
+                    // trigger the button action that starts secondary loop
+                    robot.keyPress(KeyEvent.VK_SPACE);
+                    robot.keyRelease(KeyEvent.VK_SPACE);
+
+                    for (int j = 0; j < EVENTS; j++) {
+                        robot.keyPress(KeyEvent.VK_1);
+                        robot.keyRelease(KeyEvent.VK_1);
+                    }
+                    long time = System.nanoTime();
+                    // wait for enter() returns
+                    bug6980209.class.wait(1000);
+                    if (enterReturn == null) {
+                        System.out.println("wait time=" +
+                                ((System.nanoTime() - time) / 1E9) +
+                                " seconds");
+                        throw new RuntimeException(
+                                "It seems the secondary loop will never end");
+                    }
+                    if (!enterReturn) disorderCounter++;
+
+                    robot.waitForIdle();
+                    if (dispatchedEvents <
+                            2 * EVENTS) { //check that all events are dispatched
+                        throw new RuntimeException(
+                                "KeyEvent.VK_1 has been lost!");
+                    }
+
+                } catch (InterruptedException e) {
+                    throw new RuntimeException("Interrupted!");
+                }
+            }
+        }
+        if (disorderCounter == 0) {
+            System.out.println(
+                    "Zero disordered enter/exit caught. It is recommended to run scenario again");
+        } else {
+            System.out.println(
+                    "Disordered calls is " + disorderCounter + " from " +
+                            ATTEMPTS);
+        }
+    }
+
+    private static void setup(final JFrame frame) {
+        JButton jButton = new JButton("Button");
+        frame.getContentPane().add(jButton);
+        jButton.addActionListener(new bug6980209());
+        frame.pack();
+        frame.setVisible(true);
+        jButton.setFocusable(true);
+        jButton.requestFocus();
+        jButton.addKeyListener(new KeyListener() {
+            @Override
+            public void keyTyped(KeyEvent e) {
+            }
+
+            @Override
+            public void keyPressed(KeyEvent e) {
+                if (e.getKeyChar() == '1') dispatchedEvents++;
+            }
+
+            @Override
+            public void keyReleased(KeyEvent e) {
+                if (e.getKeyChar() == '1') dispatchedEvents++;
+            }
+        });
+    }
+
+
+    @Override
+    public void actionPerformed(ActionEvent e) {
+        if (runInEDT) {
+            runSecondaryLoop();
+            return;
+        }
+        new Thread("Secondary loop run thread") {
+            @Override
+            public void run() {
+                runSecondaryLoop();
+            }
+        }.start();
+    }
+
+    private static void runSecondaryLoop() {
+        log.fine("\n---TEST START---");
+
+        final SecondaryLoop loop =
+                Toolkit.getDefaultToolkit().getSystemEventQueue()
+                        .createSecondaryLoop();
+
+        final Object LOCK = new Object(); //lock to start simultaneously
+        Thread exitThread = new Thread("Exit thread") {
+            @Override
+            public void run() {
+                synchronized (LOCK) {
+                    LOCK.notify();
+                }
+                Thread.yield();
+                exitReturn = loop.exit();
+                log.fine("exit() returns " + exitReturn);
+            }
+        };
+
+        synchronized (LOCK) {
+            try {
+                exitThread.start();
+                LOCK.wait();
+            } catch (InterruptedException e1) {
+                throw new RuntimeException("What?");
+            }
+        }
+
+        enterReturn = loop.enter();
+        log.fine("enter() returns " + enterReturn);
+
+        try {
+            exitThread.join();
+        } catch (InterruptedException e) {
+            throw new RuntimeException("What?");
+        }
+        synchronized (bug6980209.class) {
+            bug6980209.class.notifyAll();
+        }
+        log.fine("\n---TEST END---");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/FileDialog/8003399/bug8003399.java	Wed Jun 03 18:11:45 2015 -0700
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2015, 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 8003399
+   @summary JFileChooser gives wrong path to selected file when saving to Libraries folder on Windows 7
+   @author Semyon Sadetsky
+   @library /lib/testlibrary
+   @build jdk.testlibrary.OSInfo
+   @run main bug8003399
+  */
+
+import jdk.testlibrary.OSInfo;
+
+import javax.swing.filechooser.FileSystemView;
+import java.io.File;
+
+public class bug8003399 {
+
+    public static void main(String[] args) throws Exception {
+        if (OSInfo.getOSType() == OSInfo.OSType.WINDOWS &&
+                OSInfo.getWindowsVersion().compareTo(OSInfo.WINDOWS_VISTA) > 0 ) {
+            FileSystemView fsv = FileSystemView.getFileSystemView();
+            for (File file : fsv.getFiles(fsv.getHomeDirectory(), false)) {
+                if(file.isDirectory()) {
+                    for (File file1 : fsv.getFiles(file, false)) {
+                        if(file1.isDirectory())
+                        {
+                            String path = file1.getPath();
+                            if(path.startsWith("::{") &&
+                                    path.toLowerCase().endsWith(".library-ms")) {
+                                throw new RuntimeException("Unconverted library link found");
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        System.out.println("ok");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Frame/MaximizedToUnmaximized/MaximizedToUnmaximized.java	Wed Jun 03 18:11:45 2015 -0700
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2015, 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.GraphicsConfiguration;
+import java.awt.GraphicsEnvironment;
+import java.awt.Insets;
+import java.awt.Rectangle;
+import java.awt.Robot;
+import java.awt.Toolkit;
+
+/**
+ * @test
+ * @bug 8065739
+ * @summary [macosx] Frame warps to lower left of screen when displayed
+ * @author Alexandr Scherbatiy
+ */
+public class MaximizedToUnmaximized {
+
+    public static void main(String[] args) throws Exception {
+        testFrame(false);
+        testFrame(true);
+    }
+
+    static void testFrame(boolean isUndecorated) throws Exception {
+        Frame frame = new Frame();
+        try {
+            Robot robot = new Robot();
+            robot.setAutoDelay(100);
+
+            frame.setUndecorated(isUndecorated);
+            GraphicsConfiguration gc = GraphicsEnvironment.getLocalGraphicsEnvironment()
+                    .getDefaultScreenDevice().getDefaultConfiguration();
+            Rectangle bounds = gc.getBounds();
+            Insets insets = Toolkit.getDefaultToolkit().getScreenInsets(gc);
+            int x = bounds.x + insets.left;
+            int y = bounds.y + insets.top;
+            int width = bounds.width - insets.left - insets.right;
+            int height = bounds.height - insets.top - insets.bottom;
+            Rectangle rect = new Rectangle(x, y, width, height);
+            frame.pack();
+            frame.setBounds(rect);
+            frame.setVisible(true);
+            robot.waitForIdle();
+            robot.delay(500);
+
+            if (frame.getWidth() <= width / 2
+                    || frame.getHeight() <= height / 2) {
+                throw new RuntimeException("Frame size is small!");
+            }
+
+            if (!isUndecorated && frame.getExtendedState() != Frame.MAXIMIZED_BOTH) {
+                throw new RuntimeException("Frame state does not equal"
+                        + " MAXIMIZED_BOTH!");
+            }
+        } finally {
+            frame.dispose();
+        }
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Frame/SetMaximizedBounds/MaximizedMovedWindow.java	Wed Jun 03 18:11:45 2015 -0700
@@ -0,0 +1,127 @@
+/*
+ * Copyright (c) 2015, 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.*;
+
+/*
+ * @test
+ * @bug 8065739
+ * @summary Moved window is maximazed to new screen
+ * @author Alexandr Scherbatiy
+ *
+ * @run main MaximizedMovedWindow
+ */
+public class MaximizedMovedWindow {
+
+    public static void main(String[] args) throws Exception {
+
+        //Supported platforms are Windows and OS X.
+        String os = System.getProperty("os.name").toLowerCase();
+        if (!os.contains("os x")) {
+            return;
+        }
+
+        if (!Toolkit.getDefaultToolkit().
+                isFrameStateSupported(Frame.MAXIMIZED_BOTH)) {
+            return;
+        }
+
+        GraphicsEnvironment ge = GraphicsEnvironment.
+                getLocalGraphicsEnvironment();
+
+        if (ge.isHeadlessInstance()) {
+            return;
+        }
+
+        GraphicsDevice[] devices = ge.getScreenDevices();
+
+        if (devices.length < 2) {
+            return;
+        }
+
+        Frame frame = null;
+        try {
+
+            GraphicsConfiguration gc1 = devices[0].getDefaultConfiguration();
+            GraphicsConfiguration gc2 = devices[1].getDefaultConfiguration();
+
+            Robot robot = new Robot();
+            robot.setAutoDelay(50);
+
+            frame = new Frame();
+            Rectangle maxArea1 = getMaximizedScreenArea(gc1);
+            frame.setBounds(getSmallerRectangle(maxArea1));
+            frame.setVisible(true);
+            robot.waitForIdle();
+
+            frame.setExtendedState(Frame.MAXIMIZED_BOTH);
+            robot.waitForIdle();
+            robot.delay(1000);
+
+            Rectangle bounds = frame.getBounds();
+            if (!bounds.equals(maxArea1)) {
+                throw new RuntimeException("The bounds of the Frame do not equal"
+                        + " to screen 1 size");
+            }
+
+            frame.setExtendedState(Frame.NORMAL);
+            robot.waitForIdle();
+            robot.delay(1000);
+
+            Rectangle maxArea2 = getMaximizedScreenArea(gc2);
+            frame.setBounds(getSmallerRectangle(maxArea2));
+            robot.waitForIdle();
+            robot.delay(1000);
+
+            frame.setExtendedState(Frame.MAXIMIZED_BOTH);
+            robot.waitForIdle();
+            robot.delay(1000);
+
+            bounds = frame.getBounds();
+            if (!bounds.equals(maxArea2)) {
+                throw new RuntimeException("The bounds of the Frame do not equal"
+                        + " to screen 2 size");
+            }
+        } finally {
+            if (frame != null) {
+                frame.dispose();
+            }
+        }
+    }
+
+    static Rectangle getSmallerRectangle(Rectangle rect) {
+        return new Rectangle(
+                rect.x + rect.width / 6,
+                rect.y + rect.height / 6,
+                rect.width / 3,
+                rect.height / 3);
+    }
+    static Rectangle getMaximizedScreenArea(GraphicsConfiguration gc) {
+        Rectangle bounds = gc.getBounds();
+        Insets insets = Toolkit.getDefaultToolkit().getScreenInsets(gc);
+        return new Rectangle(
+                bounds.x + insets.left,
+                bounds.y + insets.top,
+                bounds.width - insets.left - insets.right,
+                bounds.height - insets.top - insets.bottom);
+    }
+}
--- a/jdk/test/java/awt/Frame/SetMaximizedBounds/SetMaximizedBounds.java	Thu Jun 04 00:19:16 2015 +0000
+++ b/jdk/test/java/awt/Frame/SetMaximizedBounds/SetMaximizedBounds.java	Wed Jun 03 18:11:45 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, 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
@@ -22,67 +22,108 @@
  */
 
 import java.awt.*;
-
 /*
  * @test
  * @summary When Frame.setExtendedState(Frame.MAXIMIZED_BOTH)
  *          is called for a Frame after been called setMaximizedBounds() with
  *          certain value, Frame bounds must equal to this value.
  *
- * @library ../../../../lib/testlibrary
- * @build ExtendedRobot
  * @run main SetMaximizedBounds
  */
 
 public class SetMaximizedBounds {
 
-    Frame frame;
-    Rectangle bound;
-    boolean supported;
-    ExtendedRobot robot;
-    static Rectangle max = new Rectangle(100,100,400,400);
+    public static void main(String[] args) throws Exception {
 
-    public void doTest() throws Exception {
-        robot = new ExtendedRobot();
+        //Supported platforms are Windows and OS X.
+        String os = System.getProperty("os.name").toLowerCase();
+        if (!os.contains("windows") && !os.contains("os x")) {
+            return;
+        }
 
-        EventQueue.invokeAndWait( () -> {
-            frame = new Frame( "TestFrame ");
-            frame.setLayout(new FlowLayout());
+        if (!Toolkit.getDefaultToolkit().
+                isFrameStateSupported(Frame.MAXIMIZED_BOTH)) {
+            return;
+        }
 
-            if (Toolkit.getDefaultToolkit().isFrameStateSupported(Frame.MAXIMIZED_BOTH)) {
-                supported = true;
-                frame.setMaximizedBounds(max);
-            } else {
-                supported = false;
+        GraphicsEnvironment ge = GraphicsEnvironment.
+                getLocalGraphicsEnvironment();
+
+        if (ge.isHeadlessInstance()) {
+            return;
+        }
+
+        for (GraphicsDevice gd : ge.getScreenDevices()) {
+            for (GraphicsConfiguration gc : gd.getConfigurations()) {
+                testMaximizedBounds(gc);
+            }
+        }
+    }
+
+    static void testMaximizedBounds(GraphicsConfiguration gc) throws Exception {
+
+        Frame frame = null;
+        try {
+
+            Rectangle maxArea = getMaximizedScreenArea(gc);
+
+            Robot robot = new Robot();
+            robot.setAutoDelay(50);
+
+            frame = new Frame();
+            Rectangle maximizedBounds = new Rectangle(
+                    maxArea.x + maxArea.width / 6,
+                    maxArea.y + maxArea.height / 6,
+                    maxArea.width / 3,
+                    maxArea.height / 3);
+            frame.setMaximizedBounds(maximizedBounds);
+            frame.setSize(maxArea.width / 8, maxArea.height / 8);
+            frame.setVisible(true);
+            robot.waitForIdle();
+
+            frame.setExtendedState(Frame.MAXIMIZED_BOTH);
+            robot.waitForIdle();
+            robot.delay(1000);
+
+            Rectangle bounds = frame.getBounds();
+            if (!bounds.equals(maximizedBounds)) {
+                throw new RuntimeException("The bounds of the Frame do not equal to what"
+                        + " is specified when the frame is in Frame.MAXIMIZED_BOTH state");
             }
 
-            frame.setSize(200, 200);
-            frame.setVisible(true);
-        });
+            frame.setExtendedState(Frame.NORMAL);
+            robot.waitForIdle();
+            robot.delay(1000);
 
-        robot.waitForIdle(2000);
-        if (supported) {
-            EventQueue.invokeAndWait( () -> {
-                frame.setExtendedState(Frame.MAXIMIZED_BOTH);
-            });
-            robot.waitForIdle(2000);
-            bound = frame.getBounds();
-            if(!bound.equals(max))
+            maximizedBounds = new Rectangle(
+                    maxArea.x + maxArea.width / 10,
+                    maxArea.y + maxArea.height / 10,
+                    maxArea.width / 5,
+                    maxArea.height / 5);
+            frame.setMaximizedBounds(maximizedBounds);
+            frame.setExtendedState(Frame.MAXIMIZED_BOTH);
+            robot.waitForIdle();
+            robot.delay(1000);
+
+            bounds = frame.getBounds();
+            if (!bounds.equals(maximizedBounds)) {
                 throw new RuntimeException("The bounds of the Frame do not equal to what"
-                    + " is specified when the frame is in Frame.MAXIMIZED_BOTH state");
-        } else {
-            System.out.println("Frame.MAXIMIZED_BOTH not supported");
+                        + " is specified when the frame is in Frame.MAXIMIZED_BOTH state");
+            }
+        } finally {
+            if (frame != null) {
+                frame.dispose();
+            }
         }
-
-        frame.dispose();
     }
 
-    public static void main(String[] args) throws Exception {
-        String os = System.getProperty("os.name").toLowerCase();
-        System.out.println(os);
-        if (os.contains("windows") || os.contains("os x"))
-            new SetMaximizedBounds().doTest();
-        else
-            System.out.println("Platform "+os+" is not supported. Supported platforms are Windows and OS X.");
+    static Rectangle getMaximizedScreenArea(GraphicsConfiguration gc) {
+        Rectangle bounds = gc.getBounds();
+        Insets insets = Toolkit.getDefaultToolkit().getScreenInsets(gc);
+        return new Rectangle(
+                bounds.x + insets.left,
+                bounds.y + insets.top,
+                bounds.width - insets.left - insets.right,
+                bounds.height - insets.top - insets.bottom);
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Mouse/MouseDragEvent/MouseDraggedTest.java	Wed Jun 03 18:11:45 2015 -0700
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) 2015, 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.*;
+/*
+ * @test
+ * @bug 8080137
+ * @summary Dragged events for extra mouse buttons (4,5,6) are not generated
+ *            on JSplitPane
+ * @author alexandr.scherbatiy area=awt.event
+ * @run main MouseDraggedTest
+ */
+public class MouseDraggedTest {
+
+    private static JFrame frame;
+    private static Rectangle frameBounds;
+    private static volatile boolean mouseDragged;
+
+    public static void main(String[] args) throws Exception {
+        try {
+            Robot robot = new Robot();
+            robot.setAutoDelay(50);
+
+            SwingUtilities.invokeAndWait(MouseDraggedTest::createAndShowGUI);
+            robot.waitForIdle();
+
+            SwingUtilities.invokeAndWait(() -> frameBounds = frame.getBounds());
+            robot.waitForIdle();
+
+            for (int i = 1; i <= MouseInfo.getNumberOfButtons(); i++) {
+                testMouseDrag(i, robot);
+            }
+        } finally {
+            SwingUtilities.invokeLater(() -> {
+                if (frame != null) {
+                    frame.dispose();
+                }
+            });
+        }
+    }
+
+    private static void testMouseDrag(int button, Robot robot) {
+
+        mouseDragged = false;
+        int x1 = frameBounds.x + frameBounds.width / 4;
+        int y1 = frameBounds.y + frameBounds.height / 4;
+        int x2 = frameBounds.x + frameBounds.width / 2;
+        int y2 = frameBounds.y + frameBounds.height / 2;
+
+        robot.mouseMove(x1, y1);
+        robot.waitForIdle();
+
+        int buttonMask = InputEvent.getMaskForButton(button);
+        robot.mousePress(buttonMask);
+        robot.mouseMove(x2, y2);
+        robot.mouseRelease(buttonMask);
+        robot.waitForIdle();
+
+        if (!mouseDragged) {
+            throw new RuntimeException("Mouse button " + button
+                    + " is not dragged");
+        }
+    }
+
+    static void createAndShowGUI() {
+
+        frame = new JFrame();
+        frame.setSize(400, 400);
+        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+        JPanel panel = new JPanel(new BorderLayout());
+        panel.addMouseMotionListener(new MouseAdapter() {
+
+            @Override
+            public void mouseDragged(MouseEvent e) {
+                mouseDragged = true;
+            }
+        });
+        frame.add(panel, BorderLayout.CENTER);
+        frame.setVisible(true);
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/MouseInfo/GetPointerInfoTest.java	Wed Jun 03 18:11:45 2015 -0700
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2014, 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
+  @summary unit test for getPointerInfo() from MouseInfo class
+  @author dav@sparc.spb.su: area=
+  @bug 4009555
+  @run main GetPointerInfoTest
+*/
+
+import java.awt.*;
+
+/**
+ * Simply check the result on non-null and results are correct.
+ */
+public class GetPointerInfoTest {
+    private static final String successStage = "Test stage completed.Passed.";
+
+    public static void main(String[] args) throws Exception {
+        GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
+        GraphicsDevice[] gds = ge.getScreenDevices();
+        int gdslen = gds.length;
+        System.out.println("There are " + gdslen + " Graphics Devices");
+        if (gdslen == 0) {
+            System.out.println("Nothing to be done.");
+            return;
+        }
+        Robot robot = new Robot(gds[0]);
+        robot.setAutoDelay(0);
+        robot.setAutoWaitForIdle(true);
+        robot.delay(10);
+        robot.waitForIdle();
+        Point p = new Point(101, 99);
+        robot.mouseMove(p.x, p.y);
+
+        PointerInfo pi = MouseInfo.getPointerInfo();
+        if (pi == null) {
+            throw new RuntimeException("Test failed. getPointerInfo() returned null value.");
+        } else {
+            System.out.println(successStage);
+        }
+        Point piLocation = pi.getLocation();
+
+        if (piLocation.x != p.x || piLocation.y != p.y) {
+            throw new RuntimeException("Test failed.getPointerInfo() returned incorrect result.");
+        } else {
+            System.out.println(successStage);
+        }
+
+        System.out.println("Test PASSED.");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/MouseInfo/MultiscreenPointerInfo.java	Wed Jun 03 18:11:45 2015 -0700
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2014, 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
+  @summary unit test for getPointerInfo() from MouseInfo class
+  @author prs@sparc.spb.su: area=
+  @bug 4009555
+  @run main MultiscreenPointerInfo
+*/
+
+import java.awt.*;
+
+/**
+ * Simply check the result on non-null and results are correct.
+ */
+public class MultiscreenPointerInfo
+{
+    private static final String successStage = "Test stage completed.Passed.";
+
+    public static void main(String[] args) throws Exception {
+        GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
+        GraphicsDevice[] gds = ge.getScreenDevices();
+        int gdslen = gds.length;
+        System.out.println("There are " + gdslen + " Graphics Devices");
+        if (gdslen < 2) {
+            System.out.println("Nothing to be done. PASSED automatically.");
+            return;
+        }
+        Rectangle rx = gds[1].getDefaultConfiguration().getBounds();
+        Robot robot;
+
+        if (rx.x == 0 && rx.y == 0) {
+            // Assuming independent graphics devices
+            robot = new Robot(gds[1]);
+        } else {
+            // Means we have a virtual device
+            robot = new Robot(gds[0]);
+        }
+        robot.setAutoDelay(0);
+        robot.setAutoWaitForIdle(true);
+        robot.delay(10);
+        robot.waitForIdle();
+        Point p = new Point(rx.x + 101, rx.y + 99);
+        robot.mouseMove(p.x, p.y);
+        PointerInfo pi = MouseInfo.getPointerInfo();
+        if (pi == null) {
+            throw new RuntimeException("Test failed. getPointerInfo() returned null value.");
+        } else {
+            System.out.println(successStage);
+        }
+
+        Point piLocation = pi.getLocation();
+
+        if (piLocation.x != p.x || piLocation.y != p.y) {
+            throw new RuntimeException("Test failed.getPointerInfo() returned incorrect location.");
+        } else {
+            System.out.println(successStage);
+        }
+
+        GraphicsDevice dev = pi.getDevice();
+
+        if (dev != gds[1]) {
+            throw new RuntimeException("Test failed.getPointerInfo() returned incorrect device.");
+        } else {
+            System.out.println(successStage);
+        }
+        System.out.println("Test PASSED.");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Robot/RobotWheelTest/RobotWheelTest.java	Wed Jun 03 18:11:45 2015 -0700
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 1998, 2015, 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.Button;
+import java.awt.Frame;
+import java.awt.Rectangle;
+import java.awt.Robot;
+import jdk.testlibrary.OSInfo;
+
+/*
+ * @test 1.2 98/08/05
+ * @bug 4373478 8079255
+ * @summary Test mouse wheel functionality of Robot
+ * @author bchristi: area=Robot
+ * @library ../../../../lib/testlibrary
+ * @build jdk.testlibrary.OSInfo
+ * @run main RobotWheelTest
+ */
+public class RobotWheelTest {
+
+    private static final int NUMTESTS = 20;
+    private static volatile int wheelRotation;
+
+    public static void main(String[] args) throws Exception {
+
+        Frame frame = null;
+        try {
+            int wheelSign = OSInfo.getOSType().equals(OSInfo.OSType.MACOSX) ? -1 : 1;
+
+            frame = new Frame();
+            frame.setSize(200, 200);
+            Button button = new Button("WheelButton");
+            button.addMouseWheelListener(e -> wheelRotation = e.getWheelRotation());
+            frame.add(button);
+            frame.setVisible(true);
+
+            Robot robot = new Robot();
+            robot.setAutoDelay(100);
+            robot.waitForIdle();
+
+            Rectangle bounds = frame.getBounds();
+            int centerX = bounds.x + bounds.width / 2;
+            int centerY = bounds.y + bounds.height / 2;
+            robot.mouseMove(centerX, centerY);
+            robot.waitForIdle();
+
+            for (int i = -NUMTESTS; i <= NUMTESTS; i++) {
+                if (i == 0) {
+                    continue;
+                }
+                robot.mouseWheel(i);
+                robot.waitForIdle();
+                if (i != wheelSign * wheelRotation) {
+                    throw new RuntimeException("wheelRotation = " + wheelRotation
+                            + ", expected value = " + i);
+                }
+            }
+        } finally {
+            if (frame != null) {
+                frame.dispose();
+            }
+        }
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/Scrollbar/ScrollbarMouseWheelTest/ScrollbarMouseWheelTest.java	Wed Jun 03 18:11:45 2015 -0700
@@ -0,0 +1,180 @@
+/*
+ * Copyright (c) 1998, 2015, 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.*;
+
+/**
+ * @test
+ * @bug 4449139
+ * @summary test MouseWheelEvent generation by Scrollbar component
+ */
+public final class ScrollbarMouseWheelTest
+        implements MouseWheelListener, WindowListener {
+
+    final static String tk = Toolkit.getDefaultToolkit().getClass().getName();
+    final static int REPS = 5;
+    // There is a bug on Windows: 4616935.
+    // Wheel events comes to every component in the hierarchy so we should
+    // check a platform.
+    // There are two scrollbars within one Panel and both accept 5 clicks, so
+    // Panel would accept 5*2 clicks on Windows.
+    final static int PANEL_REPS = tk.equals("sun.awt.windows.WToolkit")? REPS * 2: REPS;
+
+    Scrollbar sb1;
+    Scrollbar sb2;
+    Panel pnl;
+    class Sema {
+        boolean flag;
+        boolean getVal() { return flag;}
+        void setVal(boolean b) { flag = b;}
+    }
+    Sema sema = new Sema();
+
+    Robot robot;
+
+    int sb1upevents, sb2upevents, pnlupevents;
+    int sb1downevents, sb2downevents, pnldownevents;
+
+    public static void main(final String[] args) {
+        new ScrollbarMouseWheelTest().test();
+    }
+
+    public void test() {
+        // Move mouse to upper-right area
+        try {
+            robot = new Robot();
+        } catch (AWTException e) {
+            System.out.println("Problem creating Robot.  FAIL.");
+            throw new RuntimeException("Problem creating Robot.  FAIL.");
+
+        }
+
+        robot.setAutoDelay(500);
+        robot.setAutoWaitForIdle(true);
+
+        // Show test Frame
+        Frame frame = new Frame("ScrollbarMouseWheelTest");
+        frame.addWindowListener(this);
+        pnl = new Panel();
+        pnl.setLayout(new GridLayout(1, 2));
+        pnl.addMouseWheelListener(this);
+        sb1 = new Scrollbar();
+        sb1.addMouseWheelListener(this);
+        pnl.add(sb1);
+        sb2 = new Scrollbar();
+        pnl.add(sb2);
+        frame.add(pnl);
+        frame.setSize(200, 400);
+        frame.setLocationRelativeTo(null);
+        frame.setVisible(true);
+        frame.toFront();
+
+        // When Frame is active, start testing (handled in windowActivated())
+        while (true) {
+            synchronized (sema) {
+                if (sema.getVal()) {
+                    break;
+                }
+            }
+        }
+        // up on sb1
+        testComp(sb1, true);
+        // down on sb1
+        testComp(sb1, false);
+        // up on sb2
+        testComp(sb2, true);
+        // down on sb2
+        testComp(sb2, false);
+        frame.dispose();
+        System.out.println("Test done.");
+        if (sb1upevents == REPS &&
+                sb2upevents == 0 &&
+                pnlupevents == PANEL_REPS &&
+                sb1downevents == REPS &&
+                sb2downevents == 0 &&
+                pnldownevents == PANEL_REPS) {
+            System.out.println("PASSED.");
+        } else {
+            System.out.println("Test Failed:" +
+                                       "\n\tsb1upevents =" + sb1upevents +
+                                       "\n\tsb2upevents = " + sb2upevents +
+                                       "\n\tpnlupevents = " + pnlupevents +
+                                       "\n\tsb1downevents =" + sb1downevents +
+                                       "\n\tsb2downevents = " + sb2downevents +
+                                       "\n\tpnldownevents = " + pnldownevents);
+            throw new RuntimeException("Test FAILED.");
+        }
+    }
+
+    public void testComp(Component comp, boolean up) {
+        Point loc = comp.getLocationOnScreen();
+        robot.mouseMove(loc.x + comp.getWidth() / 2,
+                        loc.y + comp.getHeight() / 2);
+        for (int loop = 0; loop < REPS; loop++) {
+            System.out.println("Robot.mouseWheel() on " + comp.getName());
+            robot.mouseWheel(up ? -1 : 1);
+        }
+    }
+
+    public void mouseWheelMoved(MouseWheelEvent mwe) {
+        Component src = mwe.getComponent();
+        System.out.println("mouseWheelMoved() on " + src.getName());
+        if (mwe.getWheelRotation() == -1) {
+            if (src == sb1) {
+                sb1upevents++;
+            } else if (src == sb2) {
+                sb2upevents++;
+            } else if (src == pnl) {
+                pnlupevents++;
+            } else {
+                System.out.println("weird source component");
+            }
+        } else if (mwe.getWheelRotation() == 1) {
+            if (src == sb1) {
+                sb1downevents++;
+            } else if (src == sb2) {
+                sb2downevents++;
+            } else if (src == pnl) {
+                pnldownevents++;
+            } else {
+                System.out.println("weird source component");
+            }
+        } else {
+            System.out.println("weird wheel rotation");
+        }
+    }
+
+    public void windowActivated(WindowEvent we) {
+        synchronized (sema) {
+            sema.setVal(true);
+        }
+    }
+
+    public void windowClosed(WindowEvent we) {}
+    public void windowClosing(WindowEvent we) {}
+    public void windowDeactivated(WindowEvent we) {}
+    public void windowDeiconified(WindowEvent we) {}
+    public void windowIconified(WindowEvent we) {}
+    public void windowOpened(WindowEvent we) {}
+}// class ScrollbarMouseWheelTest
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/java/awt/font/OpenType/OpticalBoundsTagTest.java	Wed Jun 03 18:11:45 2015 -0700
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2015, 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.font.OpenType;
+import java.io.IOException;
+
+/**
+  * @test
+  * @bug 8077584
+  * @summary Test for TAG_OPBD tag. Should be unique and not same as TAG_MORT.
+  * @run main OpticalBoundsTagTest
+  */
+
+public class OpticalBoundsTagTest {
+
+    public static void main(String[] a) throws Exception {
+
+        int tag_opbd = java.awt.font.OpenType.TAG_OPBD;
+        if (tag_opbd == java.awt.font.OpenType.TAG_MORT) {
+            System.out.println("Test failed: TAG_OPBD:" + tag_opbd);
+            throw new RuntimeException("TAG_OPBD same as TAG_MORT");
+        } else {
+            System.out.println("Test passed: TAG_OPBD: " + tag_opbd);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/print/attribute/URLPDFPrinting.java	Wed Jun 03 18:11:45 2015 -0700
@@ -0,0 +1,117 @@
+/*
+ * Copyright (c) 2014, 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 4899773
+ * @summary Test for DocFlavor.URL.PDF support.  No exception should be thrown.
+ * @run main URLPDFPrinting
+*/
+
+import java.awt.*;
+import javax.print.*;
+import javax.print.attribute.standard.*;
+import javax.print.attribute.*;
+import java.io.*;
+import java.util.Locale;
+import java.net.URL;
+
+public class URLPDFPrinting {
+        /**
+         * Constructor
+         */
+         public URLPDFPrinting() {
+                super();
+        }
+        /**
+         * Starts the application.
+         */
+        public static void main(java.lang.String[] args) {
+                URLPDFPrinting pd = new URLPDFPrinting();
+                PrintService service[] = null, defService = null;
+
+                service = PrintServiceLookup.lookupPrintServices(DocFlavor.URL.PDF, null);
+                if (service.length == 0) {
+                        System.out.println("No PrintService support DocFlavor.URL.PDF");
+                        return;
+                } else {
+                        defService = service[0];
+                        System.out.println("Print Service which supports DocFlavor.URL.PDF: "+defService);
+                }
+
+                System.out.println("is DocFlavor.URL.PDF supported? "+defService.isDocFlavorSupported(DocFlavor.URL.PDF));
+                HashPrintRequestAttributeSet prSet = new HashPrintRequestAttributeSet();
+                prSet.add(new Destination(new File("./dest.prn").toURI()));
+
+                DocPrintJob pj = defService.createPrintJob();
+                PrintDocument prDoc = new PrintDocument();
+                try {
+                        pj.print(prDoc, prSet);
+                } catch (Exception e) {
+                        e.printStackTrace();
+                }
+
+        }
+}
+
+class PrintDocument implements Doc {
+        InputStream fStream = null;
+        DocFlavor flavor = null;
+        HashDocAttributeSet docSet = new HashDocAttributeSet();
+        URL url =  null;
+
+        public PrintDocument() {
+                try {
+                        url =  PrintDocument.class.getResource("hello.pdf");
+                        try{ Thread.sleep(6000); }catch(Exception e){ e.printStackTrace();}
+                        fStream = url.openStream();
+                        System.out.println("URL input stream "+fStream);
+                } catch(Exception e) {
+                        e.printStackTrace();
+                }
+                docSet.add(OrientationRequested.LANDSCAPE);
+        }
+
+        public DocAttributeSet getAttributes() {
+                System.out.println("getAttributes called");
+                return docSet;
+        }
+
+        public DocFlavor getDocFlavor() {
+                System.out.println("getDocFlavor called");
+                return DocFlavor.URL.PDF;
+        }
+
+        public Object getPrintData(){
+                System.out.println("getPrintData called");
+                return url;
+        }
+
+        public Reader getReaderForText() {
+                return null;
+        }
+
+        public InputStream getStreamForBytes() {
+                System.out.println("getStreamForBytes called");
+                return fStream;
+        }
+}
Binary file jdk/test/javax/print/attribute/hello.pdf has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/GroupLayout/8079640/bug8079640.java	Wed Jun 03 18:11:45 2015 -0700
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2015, 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 8079640
+   @summary GroupLayout incorrect layout with large JTextArea
+   @author Semyon Sadetsky
+  */
+
+
+import javax.swing.*;
+import java.awt.*;
+
+public class bug8079640 {
+
+    private static JFrame frame;
+    private static JComponent comp2;
+
+    public static void main(String[] args) throws Exception {
+
+        try {
+            SwingUtilities.invokeAndWait(new Runnable() {
+                @Override
+                public void run() {
+                    frame = new JFrame("A Frame");
+                    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+                    frame.setUndecorated(true);
+                    setup(frame);
+                    frame.setVisible(true);
+                }
+            });
+
+            test();
+            System.out.println("ok");
+
+        } finally {
+            SwingUtilities.invokeLater(new Runnable() {
+                @Override
+                public void run() {
+                    frame.dispose();
+                }
+            });
+        }
+    }
+
+    private static void test() throws Exception {
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                if(comp2.getLocation().getY() > frame.getHeight())
+                    throw new RuntimeException("GroupLayout fails: comp2 is out of the window");
+            }
+        });
+    }
+
+
+    static void setup(JFrame frame)  {
+        JPanel panel = new JPanel();
+        JComponent comp1 = new JLabel("Test Label 1");
+        comp1.setMinimumSize(new Dimension(1000, 40000));
+        comp1.setPreferredSize(new Dimension(1000, 40000));
+        JScrollPane scroll = new JScrollPane(comp1);
+        comp2 = new JLabel("Test Label 2");
+        GroupLayout layout = new GroupLayout(panel);
+        layout.setHorizontalGroup(
+                layout.createParallelGroup(GroupLayout.Alignment.LEADING)
+                        .addComponent(scroll)
+                        .addComponent(comp2));
+        layout.setVerticalGroup(
+                layout.createSequentialGroup()
+                        .addComponent(scroll)
+                        .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
+                        .addComponent(comp2));
+        panel.setLayout(layout);
+        frame.getContentPane().add(panel, BorderLayout.CENTER);
+        frame.setSize(800, 600);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JComboBox/8033069/bug8033069NoScrollBar.java	Wed Jun 03 18:11:45 2015 -0700
@@ -0,0 +1,182 @@
+/*
+ * Copyright (c) 2015, 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.AWTException;
+import java.awt.Dimension;
+import java.awt.GridLayout;
+import java.awt.Point;
+import java.awt.Robot;
+import java.awt.event.InputEvent;
+import javax.swing.JComboBox;
+import javax.swing.JFrame;
+import javax.swing.JPanel;
+import javax.swing.SwingUtilities;
+import javax.swing.UIManager;
+import javax.swing.UIManager.LookAndFeelInfo;
+import javax.swing.UnsupportedLookAndFeelException;
+
+/* @test
+ * @bug 8033069
+ * @summary Checks that JComboBox popup does not close when mouse wheel is
+ *          rotated over combo box and over its popup. The case where popup
+ *          has no scroll bar.
+ * @library ../../regtesthelpers
+ * @build Util
+ * @run main bug8033069NoScrollBar
+ * @author Alexey Ivanov
+ */
+public class bug8033069NoScrollBar implements Runnable {
+
+    private static final String[] NO_SCROLL_ITEMS = new String[] {
+        "A", "B", "C", "D", "E", "F"
+    };
+
+    private final Robot robot;
+
+    private final String[] items;
+
+    private JFrame frame;
+    private JComboBox cb1;
+    private JComboBox cb2;
+
+    public static void main(String[] args) throws Exception {
+        iterateLookAndFeels(new bug8033069NoScrollBar(NO_SCROLL_ITEMS));
+    }
+
+    protected static void iterateLookAndFeels(final bug8033069NoScrollBar test) throws Exception {
+        LookAndFeelInfo[] lafInfo = UIManager.getInstalledLookAndFeels();
+        for (LookAndFeelInfo info : lafInfo) {
+            try {
+                UIManager.setLookAndFeel(info.getClassName());
+                System.out.println("Look and Feel: " + info.getClassName());
+                test.runTest();
+            } catch (UnsupportedLookAndFeelException e) {
+                System.out.println("Skipping unsupported LaF: " + info);
+            }
+        }
+    }
+
+    public bug8033069NoScrollBar(String[] items) throws AWTException {
+        this.items = items;
+
+        robot = new Robot();
+        robot.setAutoDelay(200);
+    }
+
+    private void setupUI() {
+        frame = new JFrame();
+        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+
+        cb1 = new JComboBox<>(items);
+        cb2 = new JComboBox<>(items);
+        JPanel panel = new JPanel(new GridLayout(1, 2));
+        panel.add(cb1);
+        panel.add(cb2);
+
+        frame.add(panel);
+
+        frame.pack();
+        frame.setVisible(true);
+    }
+
+    public void runTest() throws Exception {
+        try {
+            SwingUtilities.invokeAndWait(this);
+
+            robot.waitForIdle();
+            assertFalse("cb1 popup is visible",
+                        Util.invokeOnEDT(cb1::isPopupVisible));
+
+            // Move mouse pointer to the center of the fist combo box
+            Point p = cb1.getLocationOnScreen();
+            Dimension d = cb1.getSize();
+            robot.mouseMove(p.x + d.width / 2, p.y + d.height / 2);
+            // Click it to open popup
+            robot.mousePress(InputEvent.BUTTON1_MASK);
+            robot.mouseRelease(InputEvent.BUTTON1_MASK);
+
+            robot.waitForIdle();
+            assertTrue("cb1 popup is not visible",
+                       Util.invokeOnEDT(cb1::isPopupVisible));
+
+            robot.mouseWheel(1);
+            robot.waitForIdle();
+            assertTrue("cb1 popup is not visible after mouse wheel up on combo box",
+                       Util.invokeOnEDT(cb1::isPopupVisible));
+
+            robot.mouseWheel(-1);
+            robot.waitForIdle();
+            assertTrue("cb1 popup is not visible after mouse wheel down on combo box",
+                       Util.invokeOnEDT(cb1::isPopupVisible));
+
+            // Move mouse down on the popup
+            robot.mouseMove(p.x + d.width / 2, p.y + d.height * 3);
+
+            robot.mouseWheel(1);
+            robot.waitForIdle();
+            assertTrue("cb1 popup is not visible after mouse wheel up on popup",
+                       Util.invokeOnEDT(cb1::isPopupVisible));
+
+            robot.mouseWheel(-1);
+            robot.waitForIdle();
+            assertTrue("cb1 popup is not visible after mouse wheel down on popup",
+                       Util.invokeOnEDT(cb1::isPopupVisible));
+
+
+            // Move mouse pointer to the center of the second combo box
+            p = cb2.getLocationOnScreen();
+            d = cb2.getSize();
+            robot.mouseMove(p.x + d.width / 2, p.y + d.height / 2);
+
+            robot.mouseWheel(1);
+            robot.waitForIdle();
+            assertFalse("cb1 popup is visible after mouse wheel up on cb2",
+                        Util.invokeOnEDT(cb1::isPopupVisible));
+        } finally {
+            if (frame != null) {
+                frame.dispose();
+            }
+        }
+
+        System.out.println("Test passed");
+    }
+
+    @Override
+    public void run() {
+        setupUI();
+    }
+
+    private static void assertTrue(String message, boolean value) {
+        assertEquals(message, true, value);
+    }
+
+    private static void assertFalse(String message, boolean value) {
+        assertEquals(message, false, value);
+    }
+
+    private static void assertEquals(String message, boolean expected, boolean actual) {
+        if (expected != actual) {
+            throw new RuntimeException(message);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JComboBox/8033069/bug8033069ScrollBar.java	Wed Jun 03 18:11:45 2015 -0700
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2015, 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.AWTException;
+
+/* @test
+ * @bug 8033069
+ * @summary Checks that JComboBox popup does not close when mouse wheel is
+ *          rotated over combo box and over its popup. The case where
+ *          popup has scroll bar.
+ * @library ../../regtesthelpers
+ * @build Util
+ * @run main bug8033069ScrollBar
+ * @author Alexey Ivanov
+ */
+public class bug8033069ScrollBar extends bug8033069NoScrollBar {
+
+    private static final String[] SCROLL_ITEMS = new String[] {
+            "A", "B", "C", "D", "E", "F",
+            "G", "H", "I", "J", "K", "L",
+            "M", "N", "O", "P", "Q", "R"
+    };
+
+    public static void main(String[] args) throws Exception {
+        iterateLookAndFeels(new bug8033069ScrollBar(SCROLL_ITEMS));
+    }
+
+    public bug8033069ScrollBar(String[] items) throws AWTException {
+        super(items);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JFileChooser/8080628/bug8080628.java	Wed Jun 03 18:11:45 2015 -0700
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2015, 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.util.Locale;
+import javax.swing.SwingUtilities;
+import javax.swing.UIManager;
+import javax.swing.UIManager.LookAndFeelInfo;
+
+import sun.swing.SwingUtilities2;
+
+/*
+ * @test
+ * @bug 8080628
+ * @summary No mnemonics on Open and Save buttons in JFileChooser.
+ * @author Alexey Ivanov
+ * @run main bug8080628
+ */
+public class bug8080628 {
+    public static final String[] MNEMONIC_KEYS = new String[] {
+            "FileChooser.saveButtonMnemonic",
+            "FileChooser.openButtonMnemonic",
+            "FileChooser.cancelButtonMnemonic",
+            "FileChooser.directoryOpenButtonMnemonic"
+    };
+
+    public static final Locale[] LOCALES = new Locale[] {
+            new Locale("en"),
+            new Locale("de"),
+            new Locale("es"),
+            new Locale("fr"),
+            new Locale("it"),
+            new Locale("ja"),
+            new Locale("ko"),
+            new Locale("pt", "BR"),
+            new Locale("sv"),
+            new Locale("zh", "CN"),
+            new Locale("zh", "TW")
+    };
+
+    private static volatile Exception exception;
+
+    public static void main(String[] args) throws Exception {
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                runTest();
+            }
+        });
+
+        if (exception != null) {
+            throw exception;
+        }
+    }
+
+    private static void runTest() {
+        try {
+            LookAndFeelInfo[] lafInfo = UIManager.getInstalledLookAndFeels();
+            for (LookAndFeelInfo info : lafInfo) {
+                UIManager.setLookAndFeel(info.getClassName());
+
+                for (Locale locale : LOCALES) {
+                    for (String key : MNEMONIC_KEYS) {
+                        int mnemonic = SwingUtilities2.getUIDefaultsInt(key, locale);
+                        if (mnemonic != 0) {
+                            throw new RuntimeException("No mnemonic expected (" + mnemonic + ") " +
+                                    "for '" + key + "' " +
+                                    "in locale '" + locale + "' " +
+                                    "in Look-and-Feel '"
+                                        + UIManager.getLookAndFeel().getClass().getName() + "'");
+                        }
+                    }
+                }
+            }
+            System.out.println("Test passed");
+        } catch (Exception e) {
+            exception = e;
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JRadioButton/8075609/bug8075609.java	Wed Jun 03 18:11:45 2015 -0700
@@ -0,0 +1,115 @@
+/*
+ * Copyright (c) 2015, 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 8075609
+ * @summary  IllegalArgumentException when transferring focus from JRadioButton using tab
+ * @author Vivi An
+ * @run main bug8075609
+ */
+
+import javax.swing.*;
+import javax.swing.event.*;
+import java.awt.event.*;
+import java.awt.*;
+import sun.awt.SunToolkit;
+
+public class bug8075609 {
+    private static Robot robot;
+    private static SunToolkit toolkit;
+    private static JTextField textField;
+
+    public static void main(String args[]) throws Throwable {
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                createAndShowGUI();
+            }
+        });
+
+        robot = new Robot();
+        Thread.sleep(100);
+
+        robot.setAutoDelay(100);
+        toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
+
+        // Radio button group tab key test
+        runTest1();
+    }
+
+    private static void createAndShowGUI() {
+        JFrame mainFrame = new JFrame("Bug 8075609 - 1 test");
+
+        JPanel rootPanel = new JPanel();
+        rootPanel.setLayout(new BorderLayout());
+
+        JPanel formPanel = new JPanel();
+        formPanel.setFocusTraversalPolicy(new LayoutFocusTraversalPolicy());
+        formPanel.setFocusCycleRoot(true);
+
+        JRadioButton option1 = new JRadioButton("Option 1", true);
+        JRadioButton option2 = new JRadioButton("Option 2");
+
+        ButtonGroup radioButtonGroup = new ButtonGroup();
+        radioButtonGroup.add(option1);
+        radioButtonGroup.add(option2);
+
+        formPanel.add(option1);
+        formPanel.add(option2);
+        textField = new JTextField("Another focusable component");
+        formPanel.add(textField);
+
+        rootPanel.add(formPanel, BorderLayout.CENTER);
+
+        JButton okButton = new JButton("OK");
+        rootPanel.add(okButton, BorderLayout.SOUTH);
+
+        mainFrame.add(rootPanel);
+        mainFrame.pack();
+        mainFrame.setVisible(true);
+        mainFrame.toFront();
+    }
+
+    // Radio button Group as a single component when traversing through tab key
+    private static void runTest1() throws Exception{
+        hitKey(robot, KeyEvent.VK_TAB);
+
+        robot.setAutoDelay(1000 );
+        SwingUtilities.invokeAndWait(new Runnable() {
+            public void run() {
+                if (textField.hasFocus()) {
+                    System.out.println("Radio Button Group Go To Next Component through Tab Key failed");
+                    throw new RuntimeException("Focus is not on textField as Expected");
+                }
+            }
+        });
+    }
+
+    private static void hitKey(Robot robot, int keycode) {
+        robot.keyPress(keycode);
+        robot.keyRelease(keycode);
+        toolkit.realSync();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JRootPane/SilenceOfDeprecatedMenuBar/SilenceOfDeprecatedMenuBar.java	Wed Jun 03 18:11:45 2015 -0700
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2015, 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.JFrame;
+import javax.swing.JMenuBar;
+import javax.swing.JRootPane;
+import javax.swing.SwingUtilities;
+import javax.swing.UIManager;
+import javax.swing.UnsupportedLookAndFeelException;
+
+import static javax.swing.UIManager.getInstalledLookAndFeels;
+
+/**
+ * @test
+ * @bug 6368321
+ * @author Sergey Bylokhov
+ */
+public final class SilenceOfDeprecatedMenuBar implements Runnable {
+
+    public static void main(final String[] args) throws Exception {
+        for (final UIManager.LookAndFeelInfo laf : getInstalledLookAndFeels()) {
+            SwingUtilities.invokeAndWait(() -> setLookAndFeel(laf));
+            SwingUtilities.invokeAndWait(new SilenceOfDeprecatedMenuBar());
+        }
+    }
+
+    @Override
+    public void run() {
+        final JFrame frame = new DeprecatedFrame();
+        try {
+            final JMenuBar bar = new JMenuBar();
+            frame.setJMenuBar(bar);
+            frame.setBounds(100, 100, 100, 100);
+            frame.setLocationRelativeTo(null);
+            frame.setVisible(true);
+            if (bar != frame.getJMenuBar()) {
+                throw new RuntimeException("Wrong JMenuBar");
+            }
+        } finally {
+            frame.dispose();
+        }
+    }
+
+    private static void setLookAndFeel(final UIManager.LookAndFeelInfo laf) {
+        try {
+            UIManager.setLookAndFeel(laf.getClassName());
+            System.out.println("LookAndFeel: " + laf.getClassName());
+        } catch (ClassNotFoundException | InstantiationException |
+                UnsupportedLookAndFeelException | IllegalAccessException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    private static class DeprecatedFrame extends JFrame {
+
+        @Override
+        protected JRootPane createRootPane() {
+            return new JRootPane() {
+                @Override
+                public JMenuBar getMenuBar() {
+                    throw new RuntimeException("Should not be here");
+                }
+                @Override
+                public void setMenuBar(final JMenuBar menu) {
+                    throw new RuntimeException("Should not be here");
+                }
+            };
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JSpinner/WrongEditorTextFieldFont/WrongEditorTextFieldFont.java	Wed Jun 03 18:11:45 2015 -0700
@@ -0,0 +1,114 @@
+/*
+ * Copyright (c) 2015, 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.FlowLayout;
+import java.awt.Font;
+
+import javax.swing.JFrame;
+import javax.swing.JSpinner;
+import javax.swing.SwingUtilities;
+import javax.swing.UIManager;
+import javax.swing.UnsupportedLookAndFeelException;
+import javax.swing.plaf.UIResource;
+
+import static javax.swing.JSpinner.*;
+import static javax.swing.UIManager.getInstalledLookAndFeels;
+
+/**
+ * @test
+ * @bug 5036022
+ * @author Sergey Bylokhov
+ */
+public class WrongEditorTextFieldFont implements Runnable {
+
+    private static final Font USERS_FONT = new Font("dialog", Font.BOLD, 41);
+
+    public static void main(final String[] args) throws Exception {
+        for (final UIManager.LookAndFeelInfo laf : getInstalledLookAndFeels()) {
+            SwingUtilities.invokeAndWait(() -> setLookAndFeel(laf));
+            SwingUtilities.invokeAndWait(new WrongEditorTextFieldFont());
+        }
+    }
+
+    @Override
+    public void run() {
+        final JFrame frame1 = new JFrame();
+        try {
+            testDefaultFont(frame1);
+        } finally {
+            frame1.dispose();
+        }
+    }
+
+    private static void testDefaultFont(final JFrame frame) {
+        final JSpinner spinner = new JSpinner();
+        final JSpinner spinner_u = new JSpinner();
+        frame.setLayout(new FlowLayout(FlowLayout.CENTER, 50, 50));
+        frame.getContentPane().add(spinner);
+        frame.getContentPane().add(spinner_u);
+        frame.pack();
+        frame.setLocationRelativeTo(null);
+        frame.setVisible(true);
+        final DefaultEditor ed = (DefaultEditor) spinner.getEditor();
+        final DefaultEditor ed_u = (DefaultEditor) spinner_u.getEditor();
+        ed_u.getTextField().setFont(USERS_FONT);
+
+        for (int i = 5; i < 40; i += 5) {
+            /*
+             * Validate that the font of the text field is changed to the
+             * font of JSpinner if the font of text field was not set by the
+             * user.
+             */
+            final Font tff = ed.getTextField().getFont();
+            if (!(tff instanceof UIResource)) {
+                throw new RuntimeException("Font must be UIResource");
+            }
+            if (spinner.getFont().getSize() != tff.getSize()) {
+                throw new RuntimeException("Rrong size");
+            }
+            spinner.setFont(new Font("dialog", Font.BOLD, i));
+            /*
+             * Validate that the font of the text field is NOT changed to the
+             * font of JSpinner if the font of text field was set by the user.
+             */
+            final Font tff_u = ed_u.getTextField().getFont();
+            if (tff_u instanceof UIResource || !tff_u.equals(USERS_FONT)) {
+                throw new RuntimeException("Font must NOT be UIResource");
+            }
+            if (spinner_u.getFont().getSize() == tff_u.getSize()) {
+                throw new RuntimeException("Wrong size");
+            }
+            spinner_u.setFont(new Font("dialog", Font.BOLD, i));
+        }
+    }
+
+    private static void setLookAndFeel(final UIManager.LookAndFeelInfo laf) {
+        try {
+            UIManager.setLookAndFeel(laf.getClassName());
+            System.out.println("LookAndFeel: " + laf.getClassName());
+        } catch (ClassNotFoundException | InstantiationException |
+                UnsupportedLookAndFeelException | IllegalAccessException e) {
+            throw new RuntimeException(e);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/JTextArea/TextViewOOM/TextViewOOM.java	Wed Jun 03 18:11:45 2015 -0700
@@ -0,0 +1,95 @@
+/*
+ * Copyright (c) 2015, 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.EventQueue;
+
+import javax.swing.JFrame;
+import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
+
+/**
+ * @test
+ * @bug 8072775
+ * @run main/othervm -Xmx80m TextViewOOM
+ */
+public class TextViewOOM {
+
+    private static JFrame frame;
+    private static JTextArea ta;
+    private static final String STRING = "\uDC00\uD802\uDFFF";
+    private static final int N = 5000;
+
+    private static void createAndShowGUI() {
+        frame = new JFrame();
+        final JScrollPane jScrollPane1 = new JScrollPane();
+        ta = new JTextArea();
+
+        ta.setEditable(false);
+        ta.setColumns(20);
+        ta.setRows(5);
+        jScrollPane1.setViewportView(ta);
+        frame.add(ta);
+
+        frame.pack();
+        frame.setLocationRelativeTo(null);
+        frame.setVisible(true);
+    }
+
+    public static void main(final String[] args) throws Exception {
+        /* Create and display the form */
+        EventQueue.invokeAndWait(TextViewOOM::createAndShowGUI);
+        for (int i = 0; i < 10; i++) {
+            System.gc();
+            Thread.sleep(1000);
+        }
+        long mem = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();
+        System.err.println("Memory before creating the text: "+mem);
+        final StringBuilder sb = new StringBuilder(N * STRING.length());
+        for (int i = 0; i < N; i++) {
+            sb.append(STRING);
+        }
+        for (int i = 0; i < 10; i++) {
+            System.gc();
+            Thread.sleep(1000);
+        }
+        mem = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();
+        System.err.println("Memory after  creating the text: "+mem);
+
+        EventQueue.invokeAndWait(() -> {
+            ta.setText(sb.toString());
+            for (int i = 0; i < 10; i++) {
+                System.gc();
+                try {Thread.sleep(200);} catch (InterruptedException iex) {}
+            }
+            long mem1 = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();
+            System.err.println("Memory after  setting the text: " + mem1);
+        });
+        for (int i = 0; i < 10; i++) {
+            System.gc();
+            Thread.sleep(1000);
+        }
+        mem = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();
+        System.err.println("Final memory  after everything: " + mem);
+        EventQueue.invokeAndWait(frame::dispose);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/RepaintManager/DisplayListenerLeak/DisplayListenerLeak.java	Wed Jun 03 18:11:45 2015 -0700
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2015, 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 java.awt.Dimension;
+import java.awt.EventQueue;
+import java.awt.GraphicsEnvironment;
+
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+
+import sun.java2d.SunGraphicsEnvironment;
+
+/**
+ * @test
+ * @bug 8041654
+ * @run main/othervm -Xmx80m DisplayListenerLeak
+ */
+public final class DisplayListenerLeak {
+
+    private static JFrame frame;
+    private volatile static boolean failed = false;
+
+    private static void createAndShowGUI() {
+        Thread.currentThread().setUncaughtExceptionHandler((t, e) -> {
+            e.printStackTrace();
+            failed = true;
+        });
+        frame = new JFrame();
+        JLabel emptyLabel = new JLabel("");
+        emptyLabel.setPreferredSize(new Dimension(600, 400));
+        frame.getContentPane().add(emptyLabel, BorderLayout.CENTER);
+        frame.pack();
+        frame.setVisible(true);
+    }
+
+    public static void main(final String[] args) throws Exception {
+        GraphicsEnvironment ge =
+                GraphicsEnvironment.getLocalGraphicsEnvironment();
+        if (!(ge instanceof SunGraphicsEnvironment)) {
+            return;
+        }
+        EventQueue.invokeAndWait(() -> createAndShowGUI());
+        SunGraphicsEnvironment sge = (SunGraphicsEnvironment) ge;
+        final long startTime = System.nanoTime();
+        while (!failed) {
+            if (System.nanoTime() - startTime > 60_000_000_000L) {
+                break;
+            }
+            System.gc(); // clear all weak references
+            EventQueue.invokeAndWait(() -> {
+                frame.setSize(frame.getHeight(), frame.getWidth());
+                frame.pack();
+            });
+            EventQueue.invokeAndWait(sge::displayChanged);
+        }
+        EventQueue.invokeAndWait(frame::dispose);
+        if (failed) {
+            throw new RuntimeException();
+        }
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/plaf/basic/BasicComboPopup/7072653/bug7072653.java	Wed Jun 03 18:11:45 2015 -0700
@@ -0,0 +1,127 @@
+/*
+ * Copyright (c) 2015, 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 7072653
+   @summary JComboBox popup mispositioned if its height exceeds the screen height
+   @author Semyon Sadetsky
+  */
+
+
+import javax.swing.*;
+import javax.swing.event.PopupMenuEvent;
+import javax.swing.event.PopupMenuListener;
+import java.awt.*;
+import java.awt.Toolkit;
+
+public class bug7072653 {
+
+    private static JComboBox combobox;
+    private static JFrame frame;
+
+    public static void main(String[] args) throws Exception {
+        try {
+            SwingUtilities.invokeAndWait(new Runnable() {
+                @Override
+                public void run() {
+                    frame = new JFrame("JComboBox Test");
+                    setup(frame);
+                }
+            });
+            test();
+        }
+        finally {
+            frame.dispose();
+        }
+
+    }
+
+    static void setup(JFrame frame)  {
+
+
+        frame.setUndecorated(true);
+        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+
+        frame.setSize(320, 200);
+
+        frame.getContentPane().setLayout(new FlowLayout());
+
+        combobox = new JComboBox(new DefaultComboBoxModel() {
+            public Object getElementAt(int index) { return "Element " + index; }
+            public int getSize() {
+                return 1000;
+            }
+        });
+
+
+        combobox.setMaximumRowCount(100);
+        frame.getContentPane().add(combobox);
+
+        frame.setVisible(true);
+
+    }
+
+    static void test() throws Exception{
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                combobox.addPopupMenuListener(new PopupMenuListener() {
+                    @Override
+                    public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
+                    }
+
+                    @Override
+                    public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
+                        int height = 0;
+                        for (Window window : JFrame.getWindows()) {
+                            if (Window.Type.POPUP == window.getType()) {
+                                height = window.getSize().height;
+                                break;
+                            }
+                        }
+                        GraphicsConfiguration gc =
+                                combobox.getGraphicsConfiguration();
+                        Insets screenInsets = Toolkit.getDefaultToolkit()
+                                .getScreenInsets(gc);
+
+                        if (height == gc.getBounds().height - screenInsets.top -
+                                screenInsets.bottom ) {
+                            System.out.println("ok");
+                            return;
+                        }
+                        throw new RuntimeException(
+                                "Popup window height is wrong " + height);
+                    }
+
+                    @Override
+                    public void popupMenuCanceled(PopupMenuEvent e) {
+                    }
+                });
+                combobox.setPopupVisible(true);
+                combobox.setPopupVisible(false);
+            }
+        });
+    }
+
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/plaf/basic/BasicLabelUI/bug7172652.java	Wed Jun 03 18:11:45 2015 -0700
@@ -0,0 +1,172 @@
+/*
+ * Copyright (c) 2015, 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 7172652
+   @summary With JDK 1.7 text field does not obtain focus when using mnemonic Alt/Key combin
+   @author Semyon Sadetsky
+   @library /lib/testlibrary
+   @build jdk.testlibrary.OSInfo
+   @run main bug7172652
+  */
+
+import javax.swing.*;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+import java.awt.*;
+import java.awt.event.KeyEvent;
+import jdk.testlibrary.OSInfo;
+
+public class bug7172652  {
+
+    private static JMenu menu;
+    private static JFrame frame;
+    private static Boolean selected;
+
+    public static void main(String[] args) throws Exception {
+        if (OSInfo.getOSType() != OSInfo.OSType.WINDOWS) {
+            System.out.println("ok");
+            return;
+        }
+        UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                setup();
+            }
+        });
+
+        test();
+        SwingUtilities.invokeLater(new Runnable() {
+            @Override
+            public void run() {
+                frame.dispose();
+            }
+        });
+    }
+
+    private static void test() throws Exception {
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                menu.getModel().addChangeListener(new ChangeListener() {
+                    @Override
+                    public void stateChanged(ChangeEvent e) {
+                        selected = menu.isSelected();
+                    }
+                });
+            }
+        });
+
+        Robot robot = new Robot();
+        robot.setAutoDelay(200);
+
+        robot.keyPress(KeyEvent.VK_ALT);
+        robot.keyPress(KeyEvent.VK_F);
+        robot.keyRelease(KeyEvent.VK_F);
+        robot.keyRelease(KeyEvent.VK_ALT);
+
+        robot.waitForIdle();
+        if( selected != null ) {
+            throw new RuntimeException("Menu is notified selected= " + selected);
+        }
+
+        robot.keyPress(KeyEvent.VK_ALT);
+        robot.keyPress(KeyEvent.VK_F);
+        robot.keyRelease(KeyEvent.VK_F);
+        robot.keyRelease(KeyEvent.VK_ALT);
+        if( selected != null ) {
+            throw new RuntimeException("Menu is notified selected= " + selected);
+        }
+
+        robot.waitForIdle();
+
+        robot.keyPress(KeyEvent.VK_ALT);
+        robot.keyPress(KeyEvent.VK_F);
+        robot.keyRelease(KeyEvent.VK_F);
+        robot.keyRelease(KeyEvent.VK_ALT);
+        if( selected != null ) {
+            throw new RuntimeException("Menu is notified selected= " + selected);
+        }
+
+        robot.waitForIdle();
+
+        robot.keyPress(KeyEvent.VK_ALT);
+        robot.keyPress(KeyEvent.VK_F);
+        robot.keyRelease(KeyEvent.VK_F);
+        robot.keyRelease(KeyEvent.VK_ALT);
+        if( selected != null ) {
+            throw new RuntimeException("Menu is notified selected= " + selected);
+        }
+
+        robot.waitForIdle();
+
+        System.out.printf("ok");
+    }
+
+    private static void setup() {
+        JLabel firstLbl = new JLabel("First name");
+        JLabel lastLbl = new JLabel("Last name");
+        JMenuBar menuBar = new JMenuBar();
+
+        JTextField firstTxtFld = new JTextField(20);
+        JTextField lastTxtFld = new JTextField(20);
+        JDesktopPane desktopPane = new JDesktopPane();
+        JInternalFrame iframe = new JInternalFrame("A frame", true, true, true, true);
+
+        // Set an initial size
+        iframe.setSize(200, 220);
+
+        // By default, internal frames are not visible; make it visible
+        iframe.setVisible(true);
+
+        JPanel pane = new JPanel();
+        pane.setLayout(new FlowLayout());
+
+        pane.add(firstLbl);
+        pane.add(firstTxtFld);
+        pane.add(lastLbl);
+        pane.add(lastTxtFld);
+
+        firstLbl.setLabelFor(firstTxtFld);
+        firstLbl.setDisplayedMnemonic('F');
+
+        lastLbl.setLabelFor(lastTxtFld);
+        lastLbl.setDisplayedMnemonic('L');
+
+        iframe.getContentPane().add(pane);
+        iframe.setJMenuBar(menuBar);
+        menu = new JMenu("FirstMenu");
+        //m.setMnemonic('i');
+        menuBar.add(menu);
+        desktopPane.add(iframe);
+
+        frame = new JFrame();
+        frame.setUndecorated(true);
+        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+        frame.getContentPane().add(desktopPane);
+        frame.setSize(300, 300);
+        frame.setVisible(true);
+    }
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jdk/test/javax/swing/plaf/basic/BasicTextUI/8001470/bug8001470.java	Wed Jun 03 18:11:45 2015 -0700
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2015, 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 8001470
+   @summary JTextField's size is computed incorrectly when it contains Indic or Thai characters
+   @author Semyon Sadetsky
+  */
+
+import javax.swing.*;
+import java.awt.*;
+
+public class bug8001470 {
+
+    private static JFrame frame;
+    private static JTextField textField1;
+    private static JTextField textField2;
+
+    public static void main(String[] args) throws Exception {
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                frame = new JFrame("JTextField Test");
+                frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+
+                JPanel container = (JPanel) frame.getContentPane();
+                container.setLayout(new GridLayout(2,1));
+
+                textField1 = new JTextField("\u0e01");
+                textField2 = new JTextField("\u0c01");
+
+                container.add(textField1);
+                container.add(textField2);
+                frame.setVisible(true);
+                frame.pack();
+            }
+        });
+        if( textField1.getHeight() < 10 || textField2.getHeight() < 10 )
+            throw new Exception("Wrong field height");
+        System.out.println("ok");
+        SwingUtilities.invokeLater(new Runnable() {
+            @Override
+            public void run() {
+                frame.dispose();
+            }
+        });
+    }
+}