I am building a JavaFX GUI and have 2 scenes/windows.
One as the main GUI and a second that shows up when adding a booking.
The booking FXML window uses BookingWindowController.Java which contains the form code and stores the information in an array list like seen below
ArrayList<Surgeon> surgeonList;
The surgeon class has getter and setter methods as the data fields are private.
I can access this data from the same controller file using
String x = surgeonList.get(0).getSpeciality();
but this code does not work when trying to access it from my main window controller file (MainPortalController.java) which needs to be able to access the data as it contains my display text area.