0

so this is how my code looks in NetBeans: enter image description here

and this is how it looks after I complied it

enter image description here

I think it has to do with this

ImageIcon background = new ImageIcon(getClass().getResource("/Graphics/BackgroundConcept.jpg"));

img = background.getImage(); 

I put all the picture in the src folder and it wont load BUT it load other picture for the title screen.

But I'm using this type of input

Image image=new ImageIcon(getClass().getResource("/Graphics/titleScreen.jpg")).getImage();  
               g.drawImage(image,0,0,this);

and

Image GameCredits=new ImageIcon(getClass().getResource("/Graphics/credits.gif")).getImage();

The problem is I'm not adding it to a JFrame.
It is long code so I'll post it in pastebucket, basically its moving the background images as I move.

It works in NetBeans but I needed a compiled version.

http://www.pastebucket.com/14192

Bernhard Barker
  • 54,589
  • 14
  • 104
  • 138
zepperoni
  • 67
  • 1
  • 2
  • 5
  • 3
    Hopefully this answer will be of some help on the topic, regarding how to [Add Images to your Project](http://stackoverflow.com/a/9866659/1057230) – nIcE cOw Jun 14 '13 at 03:19
  • 1
    For better help sooner, post an [SSCCE](http://www.sscce.com/) – joey rohan Jun 14 '13 at 06:09
  • 1
    This is a very common topic around here... Searching this site will get you the fastest help. – jahroy Jun 14 '13 at 06:35

0 Answers0