Meaningless Drivel is fun!*
The moose likes Swing / AWT / SWT and the fly likes How to add images Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to add images" Watch "How to add images" New topic
Author

How to add images

Garry Kalra
Ranch Hand

Joined: May 25, 2001
Posts: 111
Pls suggest me what we can use to add images to panels and display them in an application.
It would be helpful if somebody could provide the names of the widgets.
Gaurav
anandh
Greenhorn

Joined: Sep 06, 2001
Posts: 22
Try this:
Icon imageIcon = new ImageIcon("MyImage.jpg");
JPanel myPanel = new JPanel();
myPanel.add(new JLabel(imageIcon));
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to add images
 
Similar Threads
Problem displaying images
How can I find my images??
can we.....
Bodgitt n Scarper - Assigning image to system tray icon
applets