title: Java - Maven - Setting Icon Images in a Form
body: <p>I've a maven project where there is a <code>JFrame</code> and I want to set up Frame's icon image so as buttons' icon images.</p>
  
  <p>My icon images lives into a package <code>com.foo.bar.frame.images</code>. I have set up correctly buttons' icon images but when I run the maven project it will hesitate with this:</p>
  
  <pre><code>SEVERE: null
  java.lang.NullPointerException
          at javax.swing.ImageIcon.&lt;init&gt;(ImageIcon.java:167)
          at com.intel.jiratool.jiraexcelclient.view.ExcelView.initComponents(ExcelView.java:119)
          at com.intel.jiratool.jiraexcelclient.view.ExcelView.&lt;init&gt;(ExcelView.java:40)
          at com.intel.jiratool.jiraexcelclient.Main.main(Main.java:54)
  </code></pre>
  
  <p>Line 167:         </p>
  
  <pre><code>btnClose.setIcon(newjavax.swing.ImageIcon(getClass().getResource("/com/intel/jiratool/jiraexcelclient/view/images/32px-Crystal_Clear_action_exit.png"))); // NOI18N
  </code></pre>
  
  <p>Moreover, when I go to the target folder where resides the jar file, if I inspect it, there aren't any images.</p>
  
  <p>How can I get working this situation? Maybe including something in the maven's POM file?</p>
  
  <p>Best Regards,</p>
  
  <p>Santiago.-</p>