Here you can find the source of createIcon(URL resource)
Parameter | Description |
---|---|
resource | The location of the icon. |
public static ImageIcon createIcon(URL resource)
//package com.java2s; //License from project: Apache License import java.net.URL; import javax.swing.ImageIcon; public class Main { /**/* ww w.jav a 2 s.co m*/ * This method creates and returns an icon. * * @param resource The location of the icon. * * @return An icon. */ public static ImageIcon createIcon(URL resource) { return new ImageIcon(resource); } }