Here you can find the source of createImage(URL url, String description, boolean checkPresence)
public static Image createImage(URL url, String description, boolean checkPresence)
//package com.java2s; //License from project: Open Source License import java.awt.Image; import java.net.URL; import javax.swing.ImageIcon; public class Main { public static Image createImage(URL url, String description, boolean checkPresence) { return createImageIcon(url, description, null, null).getImage(); }/*ww w.jav a 2 s .c o m*/ public static ImageIcon createImageIcon(URL url, Integer w, Integer h) { return createImageIcon(url, null, w, h); } public static ImageIcon createImageIcon(URL url, String description, Integer w, Integer h) { ImageIcon imageIcon = new ImageIcon(url, description); if (w != null && h != null) { imageIcon = new ImageIcon(imageIcon.getImage().getScaledInstance(w, h, java.awt.Image.SCALE_SMOOTH)); } return imageIcon; } }