Here you can find the source of getIcono()
public static Image getIcono()
//package com.java2s; //License from project: Open Source License import java.awt.Image; import java.net.URL; import javax.swing.ImageIcon; public class Main { /**/*from w w w. j a v a2 s . com*/ * Imagen de icono para la ventana principal * * @return */ public static Image getIcono() { URL urlDeLaImagen = Main.class.getClassLoader().getResource("images/icon.png"); ImageIcon img = new ImageIcon(urlDeLaImagen); return img.getImage(); } }