import
javafx.application.Application;
import
javafx.scene.Scene;
import
javafx.scene.control.*;
import
javafx.scene.layout.*;
import
javafx.stage.Stage;
import
javafx.scene.layout.*;
import
javafx.scene.paint.*;
import
javafx.scene.text.*;
import
javafx.geometry.*;
import
javafx.scene.layout.*;
import
javafx.scene.shape.*;
import
javafx.scene.paint.*;
public
class
STOP_1
extends
Application {
public
void
start(Stage stage)
{
try
{
stage.setTitle(
"Stops"
);
Stop[] stop = {
new
Stop(
0
, Color.RED),
new
Stop(
0.33
, Color.GREEN),
new
Stop(
0.66
, Color.BLUE),
new
Stop(
1
, Color.YELLOW)};
LinearGradient linear_gradient =
new
LinearGradient(
0
,
0
,
1
,
0
,
true
, CycleMethod.NO_CYCLE, stop);
Circle circle =
new
Circle(
100
,
100
,
70
);
circle.setFill(linear_gradient);
VBox vbox =
new
VBox(circle);
vbox.setAlignment(Pos.CENTER);
Scene scene =
new
Scene(vbox,
400
,
300
);
stage.setScene(scene);
stage.show();
}
catch
(Exception e) {
System.out.println(e.getMessage());
}
}
public
static
void
main(String args[])
{
launch(args);
}
}