@Grab('org.codehaus.groovyfx:groovyfx:0.1') import groovyx.javafx.GroovyFX import groovyx.javafx.SceneGraphBuilder GroovyFX.start { def sg = new SceneGraphBuilder() sg.stage(title: "GroovyFX Hello World", visible: true) { scene(fill: black, width: 530, height: 300) { hbox(padding: 80) { text(text: "Groovy", style: "-fx-font-size: 80pt") { fill linearGradient(endX: 0, stops: [palegreen, seagreen]) } text(text: "FX", style: "-fx-font-size: 80pt") { fill linearGradient(endX: 0, stops: [cyan, dodgerblue]) effect dropShadow(color: dodgerblue, radius: 25, spread: 0.25) } } } } }