DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Java - ImgFromJar

10.17.2006
| 3770 views |
  • submit to reddit
        // Inserire un immagine presente nel file jar dell'applicazione

try
		{
			icon = ImageIO.read(getClass().getResourceAsStream("imgs/icon.png")); // La preleva dal file jar
			setIconImage(icon);
		}
		catch(IOException e)
		{
			e.printStackTrace();
		}