src/share/classes/sun/awt/SunToolkit.java

Print this page

        

@@ -2016,10 +2016,23 @@
             }
         }
         return isInstanceOf(cls.getSuperclass(), type);
     }
 
+    protected static LightweightFrame getLightweightFrame(Component c) {
+        for (; c != null; c = c.getParent()) {
+            if (c instanceof LightweightFrame) {
+                return (LightweightFrame)c;
+            }
+            if (c instanceof Window) {
+                // Don't traverse owner windows
+                return null;
+            }
+        }
+        return null;
+    }
+
     ///////////////////////////////////////////////////////////////////////////
     //
     // The following methods help set and identify whether a particular
     // AWTEvent object was produced by the system or by user code. As of this
     // writing the only consumer is the Java Plug-In, although this information