How do you insert image thorugh JLabel? Thanks.

Recommended Answers

All 3 Replies

can you please explain the requirement clearly?
so that we are here to help you

you don't. a JLabel can not be used as an input field.
I assume what you mean is: how do I show/display an image in a JLabel?

This might be able to shed some light on that.

ImageIcon imgThisImg = new ImageIcon(PicURL));

jLabel2.setIcon(imgThisImg);

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.