Final answer:
The student is experiencing issues with JavaFX code to display state capitals and populations. They need to create a StateCapital class, read the contents of a file into a Map, and then use JavaFX components for the GUI.
Step-by-step explanation:
The student is asking for help with a JavaFX GUI program to input a state name and display its capital and population. To address the errors the student is facing, one has to view the actual error messages. However, we can provide a general guide to how one could go about creating such a program without seeing the specific errors.
To create the program, firstly, a StateCapital class should be defined, with the required data members: city, state, population, and corresponding constructor, accessors (getters), and mutators (setters). After completing the StateCapital class, read the data from the file 'StateCapitals.txt' and store each entry into a Map for easy access. The JavaFX GUI should include a text field for user input, a button to trigger the search, and labels or text areas to display the results. The toString method in the StateCapital class should be overridden to provide a formatted output of the state capital's data when it is requested.