My panel's paintcomponent method draws a line based on the initial click and the current position as the mouse is dragged. Releasing the mouse leaves one line from the mouse press location to the mouse released location. The problem is. on the next click/drag, the old line disappears when the paint method is called again. Is there a way to save the old lines other than keeping them in a list and constantly redrawing them in the paintcomponent paint?