Answer to Question #288100 in Java | JSP | JSF for Mengal

Question #288100

Design a JavaFx application for “Courier Management System”.




For your better understanding, I have divided the code into the following functions and I will be explaining you function-wise:




Login



Connect



Create/ Reset



User Menu



Admin Menu

1
Expert's answer
2022-01-17T17:55:39-0500
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;

public class Main extends Application {

    @Override
    public void start(Stage primaryStage) throws Exception {
        BorderPane mainBorderPane = new BorderPane();
        Button loginButton = new Button("Login");
        loginButton.setOnMouseReleased(mouseEvent -> {
            mainBorderPane.setCenter(new StackPane(new Label("Login")));
        });
        Button connectButton = new Button("Connect");
        connectButton.setOnMouseReleased(mouseEvent -> {
            mainBorderPane.setCenter(new StackPane(new Label("Connect")));
        });
        Button createResetButton = new Button("Create/Reset");
        createResetButton.setOnMouseReleased(mouseEvent -> {
            mainBorderPane.setCenter(new StackPane(new Label("Create/Reset")));
        });
        Button userMenuButton = new Button("User Menu");
        userMenuButton.setOnMouseReleased(mouseEvent -> {
            mainBorderPane.setCenter(new StackPane(new Label("User Menu")));
        });
        Button adminMenuButton = new Button("Admin Menu");
        adminMenuButton.setOnMouseReleased(mouseEvent -> {
            mainBorderPane.setCenter(new StackPane(new Label("Admin Menu")));
        });
        mainBorderPane.setBottom(new HBox(10, loginButton, connectButton,
                createResetButton, userMenuButton, adminMenuButton));

        primaryStage.setScene(new Scene(mainBorderPane, 400, 300));
        primaryStage.show();
    }

    public static void main(String[] args) {
        launch(args);
    }
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog