I am making a paint application for a project and running into an issue.
My model stores two ArrayLists of circle and square objects. (Every time one is drawn, it is stored)
I also have a JSlider on my GUI to change the thickness of the stroke using g2d.setStroke(new BasicStroke(sliderValue));
Now, the problem is that, when the thickness is changed, and a new shape is drawn, the thickness of any existing shapes on the canvas gets changed as well.
How can I personalize a stroke thickness to a shape and make sure that it doesn't change after it's drawn?
Sorry, if it's kind of vague. I would like to refrain from posting code online since it's an assignment.
Thank you!