javafx polygon

Java
Polygon polygon = new Polygon(doubleArray);
Source

Also in Java: