Skip to content

Instantly share code, notes, and snippets.

/javafx-hello.js
Created Apr 24, 2014

Embed
What would you like to do?
// 檔案要用 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
You can’t perform that action at this time.