Java – how do I display jtextfield when I click an image?
•
Java
So I'm trying to make this program that allows users to tag photos in Java (a bit like Facebook tags) I've finished loading the image and created mouselistener when the user clicks on the image area
How to display jtextfield when a user clicks an area of a photo?
I think jtextfield can be used in some way. The user can enter his / her name as the label of the photo
Also, where do you think I should put jtextfield code? In the Lord?
Solution
You can get the X and Y coordinates (as daggeto said) Then you can use setvisible (true) to display your text field
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码