Question: Display the capitals please have it work in eclipse Create a JavaFX GUI program that allows a user to input the name of a state
Display the capitals
please have it work in eclipse
Create a JavaFX GUI program that allows a user to input the name of a state and display the state capital and population for that state.
When the program starts, it should first
READ and load the data Open the data file (download attached file) and read the data. Create a StateCapital object for each capital and add it to a Map. Close the data file.
You will need to create a class called StateCapital consisting of the following data - city - state - population
Include a constructor, accessor and mutator methods for each data members
Override the toString method
StateCapitals.txt
i keep getting these errors please help
or provide new code


@0verriderg public void start (Stage primaryStage) {} /// Read the data file and create the stateCapitalMapig ceadFileAndCreateMap(); // Create the GUI components 9 Label titleLabel = new Label ("State Capital Lookup"); titleLabel.setFont (new Font ("Arial", 24)); Label stateLabel = = new Label ("State: "); TextField stateTextField = new TextField(); Button l lookupButton = new B Button("Lookup"); Label resultLabel = new Label(); resultlabel.setFont (new Font("Arial", 16)); GridPane gridPane == new GridPane () ; g gridPane. setHgap (10); gridPane. setVgap (10); gridPane. setPadding(new - Insets (10)); gridPane. setAlignment (Pos.CENTER); gridPane.add (stateLabel, ,0); gridPane. add (stateTextField, 1, 0); gridPane. add (lookupButton, 2, 0); gridPane. add (resultLabel, 0,1,3,1); ; I HBox hbox= new HBox(); hbox. setAlignment(Pos.CENTER); hbox.getChildren().add(titleLabel); BorderPane borderPane = new BorderPane ();; borderPane.setTop(hbox); ; I borderPane.setCenter(gridPane)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
