Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Matilda Hughes   on Jul 02 In Java Category.

  
Question Answered By: Muriel Dunn   on Jul 02

I pulled this directly from the "How to Use
Icons" portion of the Swing tutorial:<br><br>ImageIcon
icon = null;<br>URL iconURL =
ClassLoader.getSystemResource("images/middle.gif");<br>if (iconURL != null)
{<br> icon = new
ImageIcon(iconURL, "an icon");<br>}<br><br>This should work because
any JARs loaded through Java Web Start should be part
of the classpath (as far as I understand
it).

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on image out of a jar file Or get search suggestion and latest updates.


Tagged: