The lines that I draw get removed when another line is drawn
问题 The lines that I draw get removed when another line is drawn. I am using mouse event to draw lines but when ever i draw the second line the first one get removed. I believe it has something to do with my points which keep changing the location of the coordinates where i want to draw the line as my click keep changing the points but i am not sure that's the reason; please help thanks in advance public class DrawOnComponent { public static void main(String args[]) throws Exception { JFrame f =