I'm trying to draw an open rectangle using a Polygon:
int[] xPoints = {1,1,3,3}; int[] xPoints = {0,5,5,0}; polygone = new Polygon(xPoints, yPoints, 4); g2d.draw(polygone);
Is there any way to have an open Polygon?
You might look at java.awt.geom.Path2D, used here, or java.awt.geom.GeneralPath, illustrated here.
java.awt.geom.Path2D
java.awt.geom.GeneralPath