i want to put this image on a map, so i want: - click a button and make a new image - move the image with the mouse and when click the image must be on the jpanel and not move anymore.
+1
A:
Use the jpanel as a canvas to draw the map and the image at a certain position.
Listen to the mouse move events, change the position of the image to the current position of the mouse. Redraw the canvas.
Add a mouse click listener and when you get a click, disable the mouse move listener.
Aaron Digulla
2010-02-23 16:13:50