Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

You may adjust the code as you want. Thank you! CODING HERE: import javafx.appli

ID: 3742268 • Letter: Y

Question

You may adjust the code as you want. Thank you!

CODING HERE:

import javafx.application.Application;
import javafx.event.*;
import javafx.scene.*;
import javafx.scene.control.*;
import javafx.scene.layout.*;
import javafx.stage.*;
import javafx.geometry.*;

public class OrderSystem extends Application implements EventHandler<ActionEvent>
{

// Attributes for GUI
private Stage stage; // The entire window, including title bar and borders
private Scene scene; // Interior of window
private BorderPane layout;

// Add four labels
private Label itemLabel = new Label("Item Name:");
private Label numberLabel = new Label("Number:");
private Label costLabel = new Label("Cost:");
private Label amountOwedLabel = new Label("Amount Owed:");
// add four textfields for labels
private TextField itemName = new TextField();
private TextField number = new TextField();
private TextField cost = new TextField();
private TextField amountOwed = new TextField();
// add buttons
private Button btnCalc = new Button("Calculate"); //To calculate the result
private Button btnSave = new Button("Save"); //To save the result
private Button btnClear = new Button("Clear"); //To clear the result
private Button btnExit = new Button("Exit"); //To exit the program
private Button btnLoad = new Button("Load"); //To load the data
private Button btnPrev = new Button("<Prev"); //To previous the data
private Button btnNext = new Button(">Next"); //To next the data
private Button btnCalcSave = new Button("Calculate & Save"); //To calculate then save


// Main of this GUI class
public static void main(String [] args)
{
launch(args);
  
} // end of main


public void start(Stage _stage) throws Exception
{
stage = _stage; // save stage as an attribute
stage.setTitle("Quoc Huynh Item Orders Calculator"); // set the text in the title bar
layout = new BorderPane();
  
FlowPane loTop = new FlowPane(10, 10);
  
loTop.setAlignment(Pos.CENTER);
loTop.getChildren().add(itemLabel);
loTop.getChildren().add(itemName);
loTop.getChildren().add(numberLabel);
loTop.getChildren().add(number);
loTop.getChildren().add(costLabel);
loTop.getChildren().add(cost);
loTop.getChildren().add(amountOwedLabel);
loTop.getChildren().add(amountOwed);
  
  

layout.setTop(loTop);
scene = new Scene(layout, 300, 200);
  
stage.setScene(scene);
stage.show();
  
}

public void handle(ActionEvent ae)
{
Button btn = (Button)ae.getSource();
}
}

GUI Applications with I/O ISTE-121-Homework 01 Overview This homework is a continuation of your lab 1. You need to complete lab 1, make a copy of lab 1 Orders, and rename to class OrderSystem for this homework Then make the modifications required for this homework You may not have received all the information to do this assignment by the time it is being handed out. The information from the second class of the course, and the lab will help you with this assignment. Some solutions to this are given in the lab, so do what you can until the lab day. Then make sure all your questions are answered for this homework The main class name for homework 1 is OrderSystem. When you get the GUI to look similar to the display that is close enough for this homework Part 1: GUI Layout (start with Lab 1 code) Part 1 is from lab 1: Create a GUI that contains right aligned labels for text fields as shown. Label, field and button object names should be self-documenting representations of the GUI components. Place all of the components in a GridPane, then add the GridPane to the root VBox Add buttons to control the actions that will take place on the screen. Your screer should now look similar to the screen shot below Have the "Amount owed" field not allow input Format the amount owed result to have two decimal places. See String class in the Javadocs how to format a number (String.format) (A. Student) Item Orders Calculator Item Name: Gidget Widget Number: 40000 Cost 2 Amount owed:80000.00 Calculate Save Clear Exit

Explanation / Answer


Hi. please find the answer above.. In case of any doubts, please ask in comments. If the answer helps you, please upvote. Thanks!

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote