Skip to content

Instantly share code, notes, and snippets.

@aalmiray
Created June 18, 2009 18:59
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 aalmiray/132126 to your computer and use it in GitHub Desktop.
Save aalmiray/132126 to your computer and use it in GitHub Desktop.
import javafx.stage.*;
import javafx.scene.*;
import javafx.scene.text.*;
class HelloWorldNode extends CustomNode {
public var str:String;
override function create():Node {
Text {
content: bind str
x: 10
y: 25
font: Font {
name: "Sans Serif"
size: 24
}
}
}
}
var helloWorld = HelloWorldNode{}
helloWorld.str = "Hello World!";
var stage = Stage {
var str:String;
visible: false
title: "HelloWorld"
width: 170
height: 50
scene: Scene {
content: {
helloWorld
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment