import javafx.application.Application import javafx.stage.Stage import javafx.scene.Scene import javafx.scene.layout.HBox import javafx.scene.control.Label object Hello { def main(args: Array[String]) { Application.launch(classOf[HelloApplication], args:_*) } } class HelloApplication extends Application { def start(stage: Stage) { var hbox = new HBox() var scene = new Scene(hbox, 640, 480) hbox.getChildren().add( new Label("Hello, JavaFX World!") ) stage.setScene(scene) stage.setTitle("Hello, World") stage.show() } }