Java: An Introduction to Problem Solving and Programming (8th Edition)
Java: An Introduction to Problem Solving and Programming (8th Edition)
8th Edition
ISBN: 9780134462035
Author: Walter Savitch
Publisher: PEARSON
Question
Book Icon
Chapter 9, Problem 7PP
Program Plan Intro

Short survey

Program plan:

  • Import required packages.
  • Define the main class “SurveyForm”.
    • Define the “main ()” method.
      • Launch the application.
    • Override the “start ()” method.
      • Create an object for “VBox” container.
      • Add a label to the container.
      • Create an object for “ToggleGroup”.
      • Create three radio buttons for the colors “Red”, “Orange”, “Blue”, and “Green” and these buttons to the toggle group.
      • Add all the radio buttons to the container.
      • Get the age from the user using “Spinner”
      • Set the value and add the spinner to the container.
      • Get the favorite programming language by using a “ChoiceBox” and add it to the container.
      • Create an action event for clicking the “submitBtn”.
        • Override the “handle ()” method.
          • Declare a variable “color”.
          • Check if “redRB” is selected.
            • Assign the color “red” to the variable “color.”
          • Check if “greenRB” is selected.
            • Assign the color “green” to the variable “color.”
          • Check if “orangeRB” is selected.
            • Assign the color “orange” to the variable “color.”
          • Check if “blueRB” is selected.
            • Assign the color “blue” to the variable “color.”
        • Print the color, age and programming language on the screen.
              • Add the submit button to the container.
              • Create a scene and place it on the stage.
              • Set the title.
              • Display the stage.

Blurred answer
Students have asked these similar questions
Create a JavaFx application that draws a pattern of evenly spaced circles Use four constants to control the pattern: Cycle the colors of the circles through red, green, and blue the number of circles to draw the radius of the first circle the change in the radius of each subsequent circle the change in the x-coordinate of the circle
FOLLOW THE INSTRUCTIONS PLEASE Using JavaFX Write a program to design a graphical user Interface for Saloon Reservation System. Your Main Window Should have the 5 following Buttons Along with the LOGO placed at the top of the window of the company : 1- Add booking 2- Update booking 3- Delete booking 4- Search booking 5- Services   Add Booking: The system will ask the user to enter the user information (Name, Phone number, Date Booked, service or anything related to your project. Once the Booking is added a message Booking confirmed with name and service, Date Booked will be displayed. * The System need to check if the same Phone number is available, then you can add service to the same user.* The System should check the availability of the time.   Update Booking: Can update the booking date or service, etc.. for the user. Phone number is the primary key to check for user information. Delete Booking: delete the booking. Search Booking: Search for the user Booking through Mobile Number.…
Analyze the following JavaFX program and complete the missing code based on the comments. The Program should show window like this.                                                                         public class EmployeeInterface extends Application{     @Override     public void start(Stage stage) throws Exception { 1- // Create a boreder Pane object           2- // create HBox object           3- // create the two command button objects                 4- // add command buttons in the HBox object           5- // create grid pane object         6- // create the label and TextField for the name and add them in the first row in the grid pane                 7- // create the label and TextField for the Major and add them in the first row  in the grid pane               8- // Put the commands in the buttom of the BorderPane           9- // Put the GridPane which contain student information in the center of BorderPane           10- // create the Scene Object and it set it as stage…

Chapter 9 Solutions

Java: An Introduction to Problem Solving and Programming (8th Edition)

Knowledge Booster
Background pattern image
Similar questions
Recommended textbooks for you
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781305480537
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,