Need help with looping mouse Events.
I'm trying to add several different points that the user clicks into an ArrayList, but I'm not sure how to get a new mouse event at a different location. It just adds the coordinate of the first point several times.
Trying to get the user to click three points and insert them in an array list, but it seems it adds the same co-orinate(the first point) 3 times, how do I generate a new mouse event within this method?
ArrayList points = new ArrayList<Point2D.Double>(); (declared outside of mousePressListener class)
class MousePressListener implements MouseListener
public void mousePressed(MouseEvent event)
if (event.getButton() == event.BUTTON1)
for (int a = 0; a < 3; a++)