Drawing a “star of david” shape [closed]


Looking to create the star of david: enter image description here

How would I go about this in java? Very confused on this.


Answers:


This is what you need:

int[] xPoints = {100, 150, 200};
int[] yPoints = {100, 200, 100};

int[] yPoints2 = {175, 75, 175};

g.drawPolygon (xPoints, yPoints, 3);
g.drawPolygon (xPoints, yPoints2, 3);