I was trying to store circles in a vector when the mouse is clicked. However, I did not understand how to use the MouseEvent method to detect that this was happening. Can anyone help me?
Move .addMouseListener(new CircleListener()) into the constructor
public CircleDrawer3 () { Container content = getContentPane(); // Set size, location, color and close behavior setSize(450,350); setLocation(300,300);
drawingPanel panel1 = new drawingPanel(); panel1.addMouseListener(new CircleListener());