diff options
| author | Stefan Suhren <suhren.stefan@fh-swf.de> | 2015-03-20 18:18:32 +0100 |
|---|---|---|
| committer | Stefan Suhren <suhren.stefan@fh-swf.de> | 2015-03-20 18:18:32 +0100 |
| commit | bafe58a20a02e79b2af61c7b179e7d9ff68b8a4f (patch) | |
| tree | dc591f60cb5d38db05122c09d86beaa2cf785548 /src/de | |
| download | Java2-bafe58a20a02e79b2af61c7b179e7d9ff68b8a4f.tar.gz Java2-bafe58a20a02e79b2af61c7b179e7d9ff68b8a4f.zip | |
First commit of my Java 2 work
Diffstat (limited to 'src/de')
| -rw-r--r-- | src/de/fhswf/in/inf/java2/aufgabe01/JavaFxMain.java | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/src/de/fhswf/in/inf/java2/aufgabe01/JavaFxMain.java b/src/de/fhswf/in/inf/java2/aufgabe01/JavaFxMain.java new file mode 100644 index 0000000..036ae89 --- /dev/null +++ b/src/de/fhswf/in/inf/java2/aufgabe01/JavaFxMain.java @@ -0,0 +1,58 @@ +/** + * File for the JavaFX class. + */ + +package de.fhswf.in.inf.java2.aufgabe01; + +import javafx.application.Application; +import javafx.scene.Scene; +import javafx.scene.control.Label; +import javafx.scene.layout.BorderPane; +import javafx.stage.Stage; + +/** + * The class which draws the hello world application. + * + * @author $Author: $ + * @version $Revision: $, $Date: $ UTC + */ +public class JavaFxMain extends Application +{ + + /** + * Calls the function to build the main window and entry point for the + * graphical application. + * + * @param args + * Command line arguments + */ + public static void main(String[] args) + { + launch(args); + } + + /* + * (non-Javadoc) + * + * @see javafx.application.Application#start(javafx.stage.Stage) + */ + @Override + public void start(Stage primaryStage) throws Exception + { + Label label = new Label("Hello World!"); + + BorderPane root = new BorderPane(label); + + Scene scene = new Scene(root); + + primaryStage.setTitle("Hello World!"); + + // primaryStage.setFullScreen(true); + // primaryStage.setMaximized(true); + + primaryStage.setScene(scene); + primaryStage.show(); + + } + +} |
