Is this even possible? I would like to make it so I can drag drop an image into a textbox . . .
does anyone know of any tutorials or example code for this? Thanks in advance.
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
Is this even possible? I would like to make it so I can drag drop an image into a textbox . . .
does anyone know of any tutorials or example code for this? Thanks in advance.
If a textbox is supposed to hold text, what will it do with an image? Show the image's filename?
If you don't understand my answer, don't ignore it, ask a question.
Microsoft word is an example of what you can do - drag-drop an image into it, and the image itself
shows up within the text. That is what I would like to be able to do. I have been able to do that
with a rich text box, (Microsoft Visual Basic), but I am wondering if Java has that capability.
I was thinking of the JTextArea class.
I think the JTextPane class will display images and text. Have you tried that?
If you don't understand my answer, don't ignore it, ask a question.
Skywola (March 4th, 2014)
It looks like you are correct on that Norm . . .
How to Use Editor Panes and Text Panes (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Swing Components)
Thanks, that really appears to be what I am looking for!