Question: Edit this code so it isn't one big start method and has multiple methods, will thumbs up . import javafx.application.Application; import javafx.stage.Stage; import javafx.scene.Scene; import
Edit this code so it isn't one big start method and has multiple methods, will thumbs up
import javafx.application.Application;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.control.RadioButton;
import javafx.scene.control.ToggleGroup;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
import javafx.scene.layout.HBox;
import javafx.scene.layout.BorderPane;
import javafx.scene.paint.Color;
import javafx.scene.shape.Circle;
import javafx.scene.shape.Rectangle;
import javafx.geometry.Pos;
public class TF extends Application
@Override
public void startStage primaryStage
VBox CPane new VBox;
CPane.setAlignmentPosCENTER;
Circle c getCircle;
Circle c getCircle;
Circle c getCircle;
CPane.getChildrenaddAllc c c;
Rectangle tb new Rectangle;
tbsetFillColorWHITE;
tbsetWidth;
tbsetHeight;
tbsetStrokeColorBLACK;
tbsetStrokeWidth;
StackPane stopSign new StackPanetb CPane;
HBox RadioButtonsPane new HBox;
RadioButtonsPane.setAlignmentPosCENTER;
RadioButton butRed new RadioButtonRed;
RadioButton butYellow new RadioButtonYellow;
RadioButton butGreen new RadioButtonGreen;
ToggleGroup group new ToggleGroup;
butRed.setToggleGroupgroup;
butYellow.setToggleGroupgroup;
butGreen.setToggleGroupgroup;
RadioButtonsPane.getChildrenaddAllbutRed butYellow, butGreen;
BorderPane TL new BorderPane;
TLsetCenterstopSign;
TLsetBottomRadioButtonsPane;
butRed.setOnActione
if butRedisSelected
csetFillColorRED;
csetFillColorWHITE;
csetFillColorWHITE;
;
butYellow.setOnActione
if butYellowisSelected
csetFillColorWHITE;
csetFillColorYELLOW;
csetFillColorWHITE;
;
butGreen.setOnActione
if butGreenisSelected
csetFillColorWHITE;
csetFillColorWHITE;
csetFillColorGREEN;
;
Scene scene new SceneTL;
primaryStage.setTitleTraffic Light";
primaryStage.setScenescene;
primaryStage.show;
private Circle getCircle
Circle c new Circle;
csetFillColorWHITE;
csetStrokeColorBLACK;
return c;
public static void mainString args
Application.launchargs;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
