You need to write a simple graphical interface for the program for finding the root of the equation by the method of half division. In the center of the window are 3 TextField, and the bottom button to start the calculation and Label to display the result. I planned to create for the beginning two HBox, to push in one all that should be in the center, and in the second all that below. Then use the StackPane to place the first HBox in the center and the second below. And when doing, he noticed that they do not change places at all. It turns out that in javafx one layout cannot be changed by changing the other layout, or I did something wrong, and I need to do it in another way.
PS I know that if you do not write "and quickly" will lower the rating, therefore, and FAST
public void start(Stage primaryStage) throws Exception { TextField leftLimitTextField = new TextField("Enrer left limit"); TextField rightLimitTextField = new TextField("Enter right limit"); TextField mistakeTextField = new TextField("0.0001"); HBox metodOfDivisionSpecification = new HBox(leftLimitTextField, rightLimitTextField, mistakeTextField); Label result = new Label("Here be result"); Button startCalculationButton = new Button("Start calculation"); //TODO: button event listener HBox calculationsPanel = new HBox(startCalculationButton, result); StackPane root = new StackPane(); root.getChildren().addAll(metodOfDivisionSpecification, calculationsPanel); StackPane.setAlignment(metodOfDivisionSpecification, Pos.CENTER); StackPane.setAlignment(calculationsPanel, Pos.BOTTOM_CENTER); Scene scene = new Scene(root, 300, 200); primaryStage.setScene(scene); primaryStage.show(); }