can anybody help m in displaying an image file into GUI ?basic please bcoz i m newbie TQ

Recommended Answers

All 3 Replies

If you want to use JLable then it is better to show image in you GUI.
If you need help in how to set image to JLable than please check the link

Yes use JLable is best and easy way for displaying image in your GUI
If you dont know how to set image to jLable then see this code will help you:

JLabel label = new JLabel();
label.setIcon(new javax.swing.ImageIcon(getClass().getResource("your img file path")));

Be a part of the DaniWeb community

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