ImageIcon : Java Glossary

ImageIcon
A Swing class for encapsulating an Image and provides built-in MediaTracker for it. It is not a JComponent, so it cannot on its own display the Image. There are constructors that will let you fetch the Image from an Image object, or from a file or from an URL (Uniform Resource Locator). There is no constructor to fetch the image directly from a resource. You must use getResource to get you the URL of the resource in the jar given its name, and feed that to the ImageIcon constructor.

You most commonly use an ImageIcon with JLabel. setIcon, JButton.setIcon or JCheckBox.setIcon.

Learning More

Oracle’s Javadoc on ImageIcon class : available:

available on the web at:

http://mindprod.com/jgloss/imageicon.html
ClustrMaps is down

optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\jgloss\imageicon.html
logo
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy.
Blog
IP:[65.110.21.43]
Your face IP:[54.80.12.147]
You are visitor number 11.