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
What is Windows Server and what is the Differences between Windows Server 2019 and the Windows Operating System that people have installed on their personal computer.
solve and show the tree on paper
I need help to resolve the following activity

Chapter 9 Solutions

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

Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
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
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning