Put the image in the folder where you have the form's sourcecode which is using this image or in a subfolder. (Then it should be included in JAR automatically)
Then load the image using:
setIconImage(Toolkit.getDefaultToolkit().getImage(
MainJFrame.class.getResource("imgs/video.jpg")));
This is an example when I have file video.jpg in folder imgs and changing image in a window of class MainJFrame.
You can set this directly in NetBeans properties. You have to open window of iconImage property and then choose to "set property using "custom code"".
There's no difference, but it looks nicer, because then you have your code in the NetBeans generated code.
Hope this would work