blob: 589b6b5867fc84531b23f3a35b0f9a498cea3c98 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
/**
* File for the JavaFX class.
*/
package de.fhswf.in.inf.java2.aufgabe02;
//import java.util.LinkedHashMap;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
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
{
// LinkedHashMap<String, String> labels = new LinkedHashMap<>();
//
// for (int i = 1; i < 15; i++)
// {
// labels.put("Button " + i, "Label " + i);
// }
//
// MainBorderPane root = new MainBorderPane(labels);
BorderPane root = FXMLLoader.load(JavaFxMain.class.getResource("MainWindow.fxml"));
Scene scene = new Scene(root);
primaryStage.setTitle("Label Control!");
primaryStage.setScene(scene);
primaryStage.show();
}
}
|