Java examples for JavaFX:Node
set JavaFX Node Tree Focusable
//package com.java2s; import javafx.scene.Node; import javafx.scene.Parent; public class Main { public static void setNodeTreeFocusable(Node n, boolean focusable) { n.setFocusTraversable(focusable); if (n instanceof Parent) { Parent p = (Parent) n;/*from ww w.j a v a2 s. c o m*/ for (Node nn : p.getChildrenUnmodifiable()) { setNodeTreeFocusable(nn, focusable); } } } }