/** * Gets an Image. * * @return the image */ public Image getImage() { ImageIcon icon = getIcon(); if (icon != null) { return icon.getImage(); } return null; }
/** * 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; }