From 4a2b0bc7931bb9f275592ce6fa44eea545b81ea9 Mon Sep 17 00:00:00 2001 From: JiaXinEu Date: Thu, 4 Jul 2024 22:54:26 +0800 Subject: [PATCH 1/3] Add explanation on fx:root --- tutorials/javaFxPart4.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/javaFxPart4.md b/tutorials/javaFxPart4.md index 1580ffe9..dcd1beba 100644 --- a/tutorials/javaFxPart4.md +++ b/tutorials/javaFxPart4.md @@ -105,7 +105,7 @@ We will get to that later. ![Controller for MainWindow](images/javafx/MainWindowController.png) 1. Let’s repeat the process for `DialogBox`. - The main difference here is that DialogBox checks `Use fx:root construct` and _does not define a controller class_. + The main difference here is that DialogBox checks `Use fx:root construct` and _does not define a controller class_. Checking this enables the use of the `fx:root` element, allowing you to reference a predefined root element. More about `fx:root` on the documentation [Introduction to FXML | JavaFX 2.2](https://docs.oracle.com/javafx/2/api/javafx/fxml/doc-files/introduction_to_fxml.html#root_elements). ![Settings for DialogBox](images/javafx/DialogBoxController.png) From cd81a2ee4bebb7f6eb7c11cc47456edb1f797b79 Mon Sep 17 00:00:00 2001 From: JiaXinEu Date: Wed, 10 Jul 2024 22:52:12 +0800 Subject: [PATCH 2/3] Add statement on setting controller --- tutorials/javaFxPart4.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tutorials/javaFxPart4.md b/tutorials/javaFxPart4.md index dcd1beba..cdbd0c2f 100644 --- a/tutorials/javaFxPart4.md +++ b/tutorials/javaFxPart4.md @@ -105,7 +105,9 @@ We will get to that later. ![Controller for MainWindow](images/javafx/MainWindowController.png) 1. Let’s repeat the process for `DialogBox`. - The main difference here is that DialogBox checks `Use fx:root construct` and _does not define a controller class_. Checking this enables the use of the `fx:root` element, allowing you to reference a predefined root element. More about `fx:root` on the documentation [Introduction to FXML | JavaFX 2.2](https://docs.oracle.com/javafx/2/api/javafx/fxml/doc-files/introduction_to_fxml.html#root_elements). + The main difference here is that DialogBox checks `Use fx:root construct` and _does not define a controller class_. Checking this enables the use of the `fx:root` element, allowing you to reference a root element predefined by calling the `setRoot()` method. The controller can be programatically set using the `setController()` method. + + More about `fx:root` on the documentation [Introduction to FXML | JavaFX 2.2](https://docs.oracle.com/javafx/2/api/javafx/fxml/doc-files/introduction_to_fxml.html#root_elements). ![Settings for DialogBox](images/javafx/DialogBoxController.png) From ca6690ffa366ffefa363b5c9f22d0a10aa27974b Mon Sep 17 00:00:00 2001 From: JiaXinEu Date: Sun, 21 Jul 2024 12:24:43 +0800 Subject: [PATCH 3/3] Replace check with tick --- tutorials/javaFxPart4.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/javaFxPart4.md b/tutorials/javaFxPart4.md index cdbd0c2f..0c9e3c56 100644 --- a/tutorials/javaFxPart4.md +++ b/tutorials/javaFxPart4.md @@ -105,7 +105,7 @@ We will get to that later. ![Controller for MainWindow](images/javafx/MainWindowController.png) 1. Let’s repeat the process for `DialogBox`. - The main difference here is that DialogBox checks `Use fx:root construct` and _does not define a controller class_. Checking this enables the use of the `fx:root` element, allowing you to reference a root element predefined by calling the `setRoot()` method. The controller can be programatically set using the `setController()` method. + The main difference here is that DialogBox ticks `Use fx:root construct` and _does not define a controller class_. Ticking this enables the use of the `fx:root` element, allowing you to reference a root element predefined by calling the `setRoot()` method. The controller can be programatically set using the `setController()` method. More about `fx:root` on the documentation [Introduction to FXML | JavaFX 2.2](https://docs.oracle.com/javafx/2/api/javafx/fxml/doc-files/introduction_to_fxml.html#root_elements).