File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Spring in Action this week in the Spring 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