Package Problem

Hi,
is the first time that I use Netbeans… I 've finish my little and ugly first game , so i 've a problem… my directory src contains another directory called like the game’s name, in this there are the file.java and image .png, every file.java contains the command:

package nameofdirectorywhereisthefile 

now all work on my pc but when i passed my game in another pc and double-click on file .jar the game start but the game paint nothing like if it doesn’t found the image .png …

How are you loading the images/files? You should be using relative paths:

The images are in the same directory of files .java so my code is :

ImageIcon ii= new ImageIcon(nameoffile.png)

I know that image are in the same directory java try it here …

Solved! ;D
Yes … with this.getClass().getResource();
Thanks!