Added more logging and added modules.
This commit is contained in:
parent
6a24bf5979
commit
08f95c3732
2
pom.xml
2
pom.xml
@ -362,6 +362,8 @@
|
|||||||
</modulepath>
|
</modulepath>
|
||||||
<addmodules>
|
<addmodules>
|
||||||
<addmodule>javafx.controls</addmodule>
|
<addmodule>javafx.controls</addmodule>
|
||||||
|
<addmodule>javafx.graphics</addmodule>
|
||||||
|
<addmodule>javafx.fxml</addmodule>
|
||||||
</addmodules>
|
</addmodules>
|
||||||
<mainclass>${main.class}</mainclass>
|
<mainclass>${main.class}</mainclass>
|
||||||
<input>${project.build.directory}/modules</input>
|
<input>${project.build.directory}/modules</input>
|
||||||
|
|||||||
@ -19,24 +19,23 @@ public class JavaFXApp extends Application {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void start(Stage primaryStage) throws IOException {
|
public void start(Stage primaryStage) throws IOException {
|
||||||
|
try {
|
||||||
primaryStage.setTitle("Hello World!");
|
primaryStage.setTitle("Hello World!");
|
||||||
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("MainWindow.fxml"));
|
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("MainWindow.fxml"));
|
||||||
Parent root = fxmlLoader.load();
|
Parent root = fxmlLoader.load();
|
||||||
primaryStage.setScene(new Scene(root));
|
primaryStage.setScene(new Scene(root));
|
||||||
primaryStage.show();
|
primaryStage.show();
|
||||||
/*
|
} catch (Exception ex) {
|
||||||
Button btn = new Button();
|
logger.error("Exception!", ex);
|
||||||
btn.setText("Say 'Hello World'");
|
}
|
||||||
btn.setOnAction(e -> System.out.println("Hello World!"));
|
|
||||||
|
|
||||||
StackPane root = new StackPane();
|
|
||||||
root.getChildren().add(btn);
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
logger.warn("Starting ...");
|
logger.warn("Starting ...");
|
||||||
launch(args);
|
try {
|
||||||
|
launch(args);
|
||||||
|
} catch (Exception ex) {
|
||||||
|
logger.error("Exception!", ex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user