As it is a first time I'm using ArrayList in Processing I'm experiencing some issues.
I have created an Arraylist that stores a PVector (x,y position) of an Ellipsee.
What I'm trying to do is very simple I think but I can't find much info on ArrayLists.
Code: ArrayList position;
void setup()
{
position= new ArrayList<Vectors>();
}
void draw()
{
position.get(i).display(); //display ellipse
}
void mousePressed()
{
position.add(new Vectors(new PVector(mouseX, mouseY)));
}
So every time mouse is Pressed a new ellipse is created at mouseX mouseY position. What I would like to do is when my I created an amount ellipses, I need to control each one separately to change it's size or color either by clicking on them or with KeyPressed().