Java - imgFromJar


/ Published in: Java
Save to your folder(s)



Copy this code and paste it in your HTML
  1. try
  2. {
  3. icon = ImageIO.read(getClass().getResourceAsStream("imgs/icon.png")); // La preleva dal file jar
  4. setIconImage(icon);
  5. }
  6. catch(IOException e)
  7. {
  8. e.printStackTrace();
  9. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.