Skip to content

Instantly share code, notes, and snippets.

@deanriverson
Created March 7, 2012 22:16
Show Gist options
  • Save deanriverson/1996619 to your computer and use it in GitHub Desktop.
Save deanriverson/1996619 to your computer and use it in GitHub Desktop.
Testing DirectoryChooser in GroovyFX
@GrabResolver(name='groovyfx', root='https://oss.sonatype.org/content/groups/public')
@Grab('org.codehaus.groovyfx:groovyfx:0.2-SNAPSHOT')
import static groovyx.javafx.GroovyFX.start
import javafx.stage.DirectoryChooser
start {
stage(title: "DirectoryChooser Test", visible: true) {
scene(fill: black, width: 530, height: 300) {
stackPane {
button('DirChooser') {
onAction {
final dirChooser = new DirectoryChooser()
dirChooser.showDialog(primaryStage)
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment