swing - Java - Maven - Setting Icon Images in a Form -


i've maven project there jframe , want set frame's icon image buttons' icon images.

my icon images lives package com.foo.bar.frame.images. have set correctly buttons' icon images when run maven project hesitate this:

severe: null java.lang.nullpointerexception         @ javax.swing.imageicon.<init>(imageicon.java:167)         @ com.intel.jiratool.jiraexcelclient.view.excelview.initcomponents(excelview.java:119)         @ com.intel.jiratool.jiraexcelclient.view.excelview.<init>(excelview.java:40)         @ com.intel.jiratool.jiraexcelclient.main.main(main.java:54) 

line 167:

btnclose.seticon(newjavax.swing.imageicon(getclass().getresource("/com/intel/jiratool/jiraexcelclient/view/images/32px-crystal_clear_action_exit.png"))); // noi18n 

moreover, when go target folder resides jar file, if inspect it, there aren't images.

how can working situation? maybe including in maven's pom file?

best regards,

santiago.-

where in maven source/resource paths images reside?

i suspect

/src/main/resources/com/foo/bar/frame/images 

if pom setup produce jar package, unzip -l target.jar show if images indeed in jar(thing) @ correct location. indicate if it's maven problem (by not including images in package) or runtime problem (by not loading images correct location).

indicate you're putting images, ensure images in package, , indicate how you're specifying image location @ runtime.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -