here img is the object created , will be used in step 2 below .
"/images/sirte_ico.JPG" here images is the folder name under "src" folder and sirte_ico.JPG is picture name i had chosen to set as icon for frame at title bar.
In navigator window , right click on the "JFrame" you want to set icon for and then choose properties.
in "Other properties section" you will find an option "iconImage" and a small button , click on the small button , you can an option "Set Form's iconImage property using : " choose "custom code" from the scroll down menu .
Now you will see "Form.setIconImage( [EMPTY BOX] );
Type img in the box as the object made in step 1 .