how to fill javafx polygon code example Example: javafx polygon Polygon polygon = new Polygon(doubleArray);