Gente, quando eu faço isso aqui :
ImageIcon ii = new ImageIcon(this.getClass().getResource(“yellowBall.jpg”));
Em que pasta o netbeans ta buscando o arquivo ?
Detalhe:
Projeto chamado X :
Pacote chamado x :
dentro de x esta minha classe que contem o código : ImageIcon ii = new ImageIcon(this.getClass().getResource(“yellowBall.jpg”));
Resposta do netbeans:
<blockquote>Exception in thread “main” java.lang.NullPointerException
at javax.swing.ImageIcon.(ImageIcon.java:205)
at game.screen.setBall(screen.java:117)
at game.GAME.main(GAME.java:24)
</blockquote>
valeu