Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ArrayList -> Polygon?

843805May 1 2007 — edited May 4 2007
Hi,

in my game the user clicks with the mouse to position the player; each position is stored in an ArrayList:
private List <Ellipse2D>playerAllCoordinates = new ArrayList<Ellipse2D>();
Now I need these coordinates for collision detection; for this I am using the polygon class.

Is it possible to construct a polygon using the x and y coordinates stored in this ArrayList (or a similar ArrayList so that I can paint a polygon using the stored coordinates?)?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 30 2007
Added on May 1 2007
12 comments
420 views