import
javafx.application.Application;
import
javafx.scene.Scene;
import
javafx.scene.control.Button;
import
javafx.scene.layout.*;
import
javafx.scene.paint.Color;
import
javafx.scene.shape.Polygon;
import
javafx.scene.control.*;
import
javafx.stage.Stage;
import
javafx.scene.Group;
public
class
polygon_1
extends
Application {
public
void
start(Stage stage)
{
stage.setTitle(
"creating polygon"
);
double
points[] = {
10
.0d,
140
.0d,
30
.0d,
110
.0d,
40
.0d,
50
.0d,
50
.0d,
40
.0d,
110
.0d,
30
.0d,
140
.0d,
10
.0d };
Polygon polygon =
new
Polygon(points);
polygon.setFill(Color.BLUE);
Group group =
new
Group(polygon);
Scene scene =
new
Scene(group,
500
,
300
);
stage.setScene(scene);
stage.show();
}
public
static
void
main(String args[])
{
launch(args);
}
}