Skip to content

Instantly share code, notes, and snippets.

Created April 24, 2014 01:13
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 anonymous/11238129 to your computer and use it in GitHub Desktop.
Save anonymous/11238129 to your computer and use it in GitHub Desktop.
// 檔案要用 UTF-8編碼
var Button = javafx.scene.control.Button;
var StackPane = javafx.scene.layout.StackPane;
var Scene = javafx.scene.Scene;
function start(primaryStage) {
primaryStage.title = "這是標題";
var button = new Button();
button.text = "點我";
button.onAction = function() {
print("Hello World!");
}
var root = new StackPane();
root.children.add(button);
primaryStage.scene = new Scene(root, 300, 250);
primaryStage.show();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment