Getting Image object from ImageIcon object : Image ImageIcon « Swing « Java Tutorial






import java.awt.Image;

import javax.swing.ImageIcon;

public class MainClass {

  public static void main(String[] a) {
    ImageIcon imageIcon = new ImageIcon("yourFile.gif");
    Image image = imageIcon.getImage();

  }

}








14.117.Image ImageIcon
14.117.1.Getting Image object from ImageIcon object
14.117.2.GrayFilter: Create a disabled version of an ImageGrayFilter: Create a disabled version of an Image
14.117.3.use the image proxy. Images are only loaded when you press on a tab