diff options
| author | Stefan Suhren <suhren.stefan@fh-swf.de> | 2015-03-31 11:19:32 +0200 |
|---|---|---|
| committer | Stefan Suhren <suhren.stefan@fh-swf.de> | 2015-03-31 11:19:32 +0200 |
| commit | e53db140f27e405f4e541ad23b737836db36b2ad (patch) | |
| tree | 8646193cd16ff1b4d0c1b95a4b7c8f2f18d21468 /src/de/fhswf/in/inf/java2/aufgabe02/JavaFxMain.java | |
| parent | bafe58a20a02e79b2af61c7b179e7d9ff68b8a4f (diff) | |
| download | Java2-e53db140f27e405f4e541ad23b737836db36b2ad.tar.gz Java2-e53db140f27e405f4e541ad23b737836db36b2ad.zip | |
Exercise No.2.1 with extra MainBorderPain
Diffstat (limited to 'src/de/fhswf/in/inf/java2/aufgabe02/JavaFxMain.java')
| -rw-r--r-- | src/de/fhswf/in/inf/java2/aufgabe02/JavaFxMain.java | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/src/de/fhswf/in/inf/java2/aufgabe02/JavaFxMain.java b/src/de/fhswf/in/inf/java2/aufgabe02/JavaFxMain.java new file mode 100644 index 0000000..21a98cc --- /dev/null +++ b/src/de/fhswf/in/inf/java2/aufgabe02/JavaFxMain.java @@ -0,0 +1,60 @@ +/** + * File for the JavaFX class. + */ + +package de.fhswf.in.inf.java2.aufgabe02; + +import java.util.LinkedHashMap; + +import javafx.application.Application; +import javafx.scene.Scene; +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 + { + + LinkedHashMap<String, String> labels = new LinkedHashMap<>(); + + for (int i = 1; i < 15; i++) + { + labels.put("Button " + i, "Label " + i); + } + + MainBorderPane root = new MainBorderPane(labels); + Scene scene = new Scene(root); + + primaryStage.setTitle("Label Control!"); + + primaryStage.setScene(scene); + primaryStage.show(); + + } + +} |
