Class Polygon

java.lang.Object
javafx.scene.Node
javafx.scene.shape.Shape
javafx.scene.shape.Polygon
All Implemented Interfaces:
Styleable, EventTarget

public class Polygon extends Shape
Creates a polygon, defined by an array of x,y coordinates. The Polygon class is similar to the Polyline class, except that the Polyline class is not automatically closed.
import javafx.scene.shape.*;

Polygon polygon = new Polygon();
polygon.getPoints().addAll(new Double[]{
    0.0, 0.0,
    20.0, 10.0,
    10.0, 20.0 });
Since:
JavaFX 2.0