简体   繁体   中英

How to get coordinates of Images, in Java Applets

I have moving images in my code, and I need the program to get the coordinates of the images moving. Like how it gets the coordinates of the mouse when you use getX ();.

I need this so I can make a reaction happen when the user clicks on the images. Any help?

Code snippets would help.

But if you move images in your program you need coordinates otherwise you couldn't move them. So just use them for the interaction.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM