import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.layout.Pane; import javafx.scene.text.Font; import javafx.scene.text.Text; import javafx.stage.Stage; public class Eksempel extends Application { @Override public void start(Stage teater) { Text hilsen = new Text("Hallo, alle sammen!"); hilsen.setY(60); hilsen.setFont(new Font(60)); Pane kulisser = new Pane(); kulisser.getChildren().add(hilsen); Scene scene = new Scene(kulisser); teater.setTitle("Velkommen til Java FX"); teater.setScene(scene); teater.show(); } public static void main(String[] args) { Application.launch(args); } }