--- old/src/java.desktop/share/classes/sun/swing/JLightweightFrame.java 2017-09-22 10:53:53.000000000 +0530 +++ new/src/java.desktop/share/classes/sun/swing/JLightweightFrame.java 2017-09-22 10:53:52.000000000 +0530 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2017, 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 @@ -54,6 +54,7 @@ import sun.awt.AWTAccessor; import sun.awt.DisplayChangedListener; import sun.awt.LightweightFrame; +import sun.awt.OverrideNativeWindowHandle; import sun.security.action.GetPropertyAction; import sun.swing.SwingUtilities2.RepaintListener; @@ -526,6 +527,14 @@ } } + //Called by reflection by SwingNode + public void overrideNativeWindowHandle(long handle) { + final Object peer = AWTAccessor.getComponentAccessor().getPeer(this); + if (peer instanceof OverrideNativeWindowHandle) { + ((OverrideNativeWindowHandle) peer).overrideWindowHandle(handle); + } + } + public T createDragGestureRecognizer( Class abstractRecognizerClass, DragSource ds, Component c, int srcActions,