I am working with events in Java Swing and it happens that in a JFrame I have uploads of three images. What I need is to know how I do so that when I press an image when I run the program it moves vertically and I can stop it with another click or by clicking on the second image. If I click on the second image, the first image must be stopped and the other image must be moved. How can I get this result in Netbeans?