Results
![]() |
|
| Windows sys 1 | Windos sys 2 |
Command window output:
C:\ece538\JavaFX\Oracle\Stage>java HelloWorld Style: DECORATED Owner: null Modality: NONE
HelloWorld.javaimport javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.text.Font;
import javafx.scene.text.Text;
import javafx.stage.Stage;
public class HelloWorld extends Application {
@Override public void start(Stage stage) {
Text text = new Text(10, 40, "Hello World!");
text.setFont(new Font(40));
Scene scene = new Scene(new Group(text));
stage.setTitle("Welcome to JavaFX!");
stage.setScene(scene);
stage.sizeToScene();
stage.show();
System.out.println("Style: " +stage.getStyle());
System.out.println("Owner: " +stage.getOwner());
System.out.println("Modality: " +stage.getModality());
}
public static void main(String[] args) {
Application.launch(args);
}
}
Maintained by John Loomis, updated Wed Jan 31 12:59:51 2018