Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
import groovyx.javafx.SceneGraphBuilder
import groovyx.javafx.GroovyFX
/**
 *
 * @author jimclarke
 */
def imageURL = "file:PIA01320_hires.jpg";
GroovyFX.start({
    def sg = new SceneGraphBuilder();
    sg.stage(
        title: "Hello Image (Groovy)",
        visible: true,
    ) {
        scene(fill: "lightgray", width: 600, height:500,) {
            imageView(x: 25, y: 40) {
                image(imageURL"file:PIA01320_hires.jpg", width: 500, height: 450, preserveRatio: true);
            }
        }
    }
});