Java examples for JavaFX:Node
is Child Of JavaFX Node
//package com.java2s; import javafx.scene.Node; public class Main { public static boolean isChildOf(Node child, Node parent) { if (child == null || parent == null) { return false; } else if (child == parent) { return true; } else {// w w w.j a va 2 s . co m Node p = child.getParent(); return p == null ? false : isChildOf(p, parent); } } }