Java Swing Tutorial - Java ImageIcon .getImageLoadStatus ()








Syntax

ImageIcon.getImageLoadStatus() has the following syntax.

public int getImageLoadStatus()

Example

In the following code shows how to use ImageIcon.getImageLoadStatus() method.

//from   w  w  w  .j  a  v  a 2s .co m
import javax.swing.ImageIcon;

public class Main {
  public static void main(String[] argv) throws Exception {

    ImageIcon icon = new ImageIcon("image.gif");
    icon.setDescription("Description of Image");
    
    System.out.println(icon.getImageLoadStatus());
  }
}