Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
lookup
package bugs;
import javafx.scene.control.ScrollPaneBuilder;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.AnchorPaneBuilder;
import javafx.scene.layout.StackPaneBuilder;
public class LookupJava {
public static void main(String[] args) {
AnchorPane p = AnchorPaneBuilder.create()
.children(
ScrollPaneBuilder.create()
.id("foo")
.content(
StackPaneBuilder.create()
.id("bar")
.build())
.build())
.build();
System.out.println(p.lookup("#foo")); // Prints: ScrollPane[id=foo, styleClass=scroll-pane]
System.out.println(p.lookup("#foo").lookup("#bar")); // Prints: null
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.