Skip to content
Snippets Groups Projects
Commit f710699e authored by Ryan Le's avatar Ryan Le
Browse files

Update README.md

parent c5b1a5e4
Branches master
No related tags found
No related merge requests found
......@@ -189,19 +189,4 @@ public void switchScreen(javafx.event.ActionEvent event) throws IOException {
8. Run the application and verify that you can switch screens by pressing the button.
9. Now, copy and paste the same function into the new `SecondScreenController`, changing out `secondScreen.fxml` for `home.fxml`.
10. Link `secondScreen.fxml` to the `SecondScreenController` as we did previously in Step 11 of "Registering Event Handlers."
11. You should be able to move back and forth between the two scenes now!
### Passing Data Between Scenes
As of right now, our application doesn't have any data confined to it, nor does it do anything of interest. Let's throw some data onto the initial screen, and learn how to transfer that data around to other scenes in the application so that it does something a little bit more interesting.
1. Open up `home.fxml` again.
2. Add three checkboxes to the center of the `AnchorPane`, and label them as whatever you want.
3. Assign each of these checkbox an ID, something simple like `checkbox1`, `checkbox2`, etc...
4. Make you sure you create the `@FXML private CheckBox checkbox[number]` to correspond with each of the created elements in your `HomeController.java`, and import the necessary class (`javafx.scene.control.CheckBox`).
5. In the `Properties` tab of the `Inspector`, let's set the first checkbox to be auto-selected.
6. placeholder
7. Open up `secondScreen.fxml`.
8. Remove the `Label` from the `AnchorPane on top`, and add 4 new `Label`s:
- First `Label` should say 'Selected Items:'
- The next three labels should all be blank.
11. You should be able to move back and forth between the two scenes now!
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment