Draw a line in a JPanel with button click in Java
It may be easier to draw lines using the following approach: click to mark the first endpoint drag to show the line in progress release to mark the second endpoint This related example may offer some additional guidance. Addendum The example below implements the outline above. I’ve update the example to show how to use … Read more