polygon through javafx code example Example: javafx polygon Polygon polygon = new Polygon(doubleArray);