equal
deleted
inserted
replaced
497 * returns the applet found in the hierarchy or null if |
497 * returns the applet found in the hierarchy or null if |
498 * not found. |
498 * not found. |
499 * @return the parent applet or {@ null} |
499 * @return the parent applet or {@ null} |
500 * @since 1.6 |
500 * @since 1.6 |
501 */ |
501 */ |
|
502 @SuppressWarnings("deprecation") |
502 public static Applet getAppletIfAncestorOf(Component comp) { |
503 public static Applet getAppletIfAncestorOf(Component comp) { |
503 Container parent = comp.getParent(); |
504 Container parent = comp.getParent(); |
504 Applet applet = null; |
505 Applet applet = null; |
505 while (parent != null && !(parent instanceof EmbeddedFrame)) { |
506 while (parent != null && !(parent instanceof EmbeddedFrame)) { |
506 if (parent instanceof Applet) { |
507 if (parent instanceof Applet) { |