Created
March 19, 2013 23:41
-
-
Save phdoerfler/5201162 to your computer and use it in GitHub Desktop.
lookup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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