i am making a game and i put some images on my ide/images folder but program gives null pointer exception error.my code for loading imageicon is like this
ImageIcon ac=new ImageIcon(getClass().getResource("images/actor.jpg"));
ImageIcon ac1=new ImageIcon(getClass().getResource("images/actor_shoot.jpg"));
//some codes
Image n=ac.getImage();
//some codes
i tried but couldn't find,whats your suggestions?thanks.