Skip to content

Instantly share code, notes, and snippets.

@phdoerfler
Created March 19, 2013 23:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phdoerfler/5201162 to your computer and use it in GitHub Desktop.
Save phdoerfler/5201162 to your computer and use it in GitHub Desktop.
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