public class ResourceIcon
extends javax.swing.ImageIcon
Constructor and Description |
---|
ResourceIcon(java.lang.Class cls,
java.lang.String image)
Creates a new ResourceIcon object.
|
ResourceIcon(java.lang.String imageName)
Deprecated.
Having this available is now bad practice since most of our
software is plugable; each class requesting a resource should do so from
the class loader that loaded the class, to keep track of images a class
should also not be requesting a resource that is outside its own package.
For resources outside of a package, we should think about creating static
helper class to store them.
Use the ResourceIcon(Class cls, String image) constructor instead providing
the class instance of the class using the image.
|
ResourceIcon(java.net.URL url)
Creates a new ResourceIcon object.
|
Modifier and Type | Method and Description |
---|---|
protected void |
loadImage(java.lang.String imageName) |
public ResourceIcon(java.lang.Class cls, java.lang.String image)
cls
- image
- public ResourceIcon(java.net.URL url)
url
- public ResourceIcon(java.lang.String imageName)
imageName
- Copyright © 2002-2003 Lee David Painter & Contributors. All Rights Reserved.