Example #1
0
 /**
  * Gets an Image.
  *
  * @return the image
  */
 public Image getImage() {
   ImageIcon icon = getIcon();
   if (icon != null) {
     return icon.getImage();
   }
   return null;
 }
Example #2
0
 /**
  * Gets an ImageIcon.
  *
  * @return the icon
  */
 public ImageIcon getIcon() {
   if (icon == null && isAnImage) {
     icon = new ImageIcon(getURL());
     if (icon.getIconWidth() < 1) {
       icon = null;
       isAnImage = false;
     }
   }
   return icon;
 }