Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need help connecting these two panes to one another. First when the program runs, the first menu should pop up. If Enter Database is
I need help connecting these two panes to one another. First when the program runs, the first menu should pop up. If "Enter Database" is clicked the second menu with the set of the other buttons should appear, and "Go Back" button should be able to go back to the first menu when clicked. Please any help would be highly appreciated, and thank you in advance!
D StartMenu.javaSecondMenu.java 1 package application; 3import javafx.application.Application; 4 import javafx.geometry.Pos 5 import javafx.scene.Scene; 6 import javafx.scene.control.Button; 7 import javafx.scene.layout.VBox; 8 import javafx.stage.Stage; 9 10 public class StartMenu extends Application 11 public void start(Stage primaryStage) 13 14 15 VBox paneStartMenu new VBox (20) Button bt1 new Button Enter Database); Button bt2new Button("Close Database"); panestartMenu.getChildren).add (bt1); paneStartMenu.getchildren().add (bt2); paneStartMenu.setAlignment (Pos.CENTER); 18 19 20 21 Scene scene new Scene(paneStartMenu, 50, 580); primaryStage.setTitle("Database") primarystage.setscene(scene); primaryStage.show) 23 25 26 public static void main(String[] args) 28 29 Launch (args); StartMenujavaS 81 package application; SecondMenu.java Database 3e import javafx.application.Application; 4 import javafx . geometry . Pos; S import javafx.scene.Scene; 6 import javafx.scene.control.Button; 7 import javafx.scene.layout.VBox; 8 import javafx.stage.Stage; 1e public class StartMenu extends Application 11 public void start (Stage primaryStage) 12 13 VBox panestartMenunew VBox (20); Button bt1new Button("Enter Database Button bt2new Button("Close Database" 14 paneStartMenu.getChildren().add(bt1); paneStartMenu.getChildren().add (bt2); paneStartMenu.setAlignment (Pos.cENTER); Enter Database 18 19 20 21 Close Database Scene scenenew Scene (panestartMenu, primarystage.setTitle("Database"); primarystage.setscene(scene); primaryStage.show) 23 24 26 public static void main(String[] args) ( 27 28 29 Launch(args); StartMenu.java SecondMenujava & 1 package application; import java#x.application.Application; 4 import javafx.geometry.Pos; 5 import javafx.scene.Scene; 6 import javafx.scene.control.Button; 7 import javafx.scene.layout.VBox; 8 import javafx.stage.Stage; 9 10 public class SecondMenu extends Application K 11 public void start(Stage primaryStage) ( 12 VBox paneMenuOptionsnew VBox (20); Button bt1new Button("Display Database); Button bt2 new Button("Find Person") Button bt3new Button("Add Person"); Button bt4new Button("Delete Person"); Button bt5 new Button( "Go Back"; 14 16 17 18 19 2e 21 paneMenuoptions.getchildren().add (bt1) paneMenuoptions.getchildren().add (bt2); paneMenuoptions.getchildren().add (bt3) paneMenuoptions.getchildren().add (bt4); paneMenuoptions.getchildren().add(bt5); paneMenuoptions.setAlignment (Pos. CENTER); 23 24 25 26 scene scene = new Scene(panelenuoptions, primaryStage.setTitle( "Database"); primaryStage.setscene(scene); primaryStage.show); 500, see); 28 29 30 32 public static void main(String[] args) f launch(args) 34 35 36Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started