import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.text.Text;
import javafx.stage.Stage;

public class FXDemo extends Application {

        @Override
        public void start(Stage stage) {
                Text text = new Text("Hello World!");
                text.setY(text.getFont().getSize());
                Scene scene = new Scene(new Group(text));

                stage.setTitle("Welcome to JavaFX!");
                stage.setScene(scene);
                stage.sizeToScene();
                stage.show();
        }

        public static void main(String[] args) {
                launch(args);
        }

}
Topic revision: r3 - 14 Apr 2020, JuttaFitzek
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback