Java tutorial
//package com.java2s; import java.awt.image.BufferedImage; import java.net.URL; import javax.imageio.ImageIO; import javax.swing.ImageIcon; public class Main { public static ImageIcon GetIconFromURL(String url) { BufferedImage image; try { image = ImageIO.read(new URL(url)); } catch (Exception e) { return new ImageIcon(); } return new ImageIcon(image); } }