Exception in thread "main" java.lang.NullPointerException

estou tentando por minhas imagens dentro do próprio arquivo ao invés da pasta.
de fato consegui isto em outro programa com a mesma estrutura, mas aqui não funciona e não entendo o porque.

alguém sabe a explicacao exata para este erro, tenho buscado na net, mas nao ficou claro…

se alguém se interessar posso mandar as imagens do jogo, para poder conhecer o jogo. como disse se botar as imagens no c, que aparece lá embaixo o código ele funciona. valeu. aguardo.

segue o joguinho de memoria, com problema de erro…


package pacotememoria;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.FlowLayout;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JButton;
//import javax.swing.JOptionPane;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;

public class Main_1_1 extends JFrame implements MouseListener, ActionListener {
    //implements ActionListener {
    boolean estrela, rosto, seta, conector, forma = false;
    boolean rosca, espiral, leme, quadrado, poligono = false;
    int acertos = 0;
    boolean imagem1b = false;
    boolean imagem2b = false;
    boolean imagem3b = false;
    boolean imagem4b = false;
    boolean imagem5b = false;
    boolean imagem6b = false;
    boolean imagem7b = false;
    boolean imagem8b = false;
    boolean imagem9b = false;
    boolean imagem10b = false;
    boolean imagem1_1b = false;
    boolean imagem2_2b = false;
    boolean imagem3_3b = false;
    boolean imagem4_4b = false;
    boolean imagem5_5b = false;
    boolean imagem6_6b = false;
    boolean imagem7_7b = false;
    boolean imagem8_8b = false;
    boolean imagem9_9b = false;
    boolean imagem10_10b = false;
    int contagem = 0;
    int contagemGeral = 0;
    JPanel jPanel1 = new JPanel();
    JPanel jPanel2 = new JPanel();
    JPanel jPanel3 = new JPanel();
    JButton botao = new JButton();
    private JButton JButton1;
    private JButton JButton10;
    private JButton JButton11;
    private JButton JButton12;
    private JButton JButton13;
    private JButton JButton14;
    private JButton JButton15;
    private JButton JButton16;
    private JButton JButton17;
    private JButton JButton18;
    private JButton JButton19;
    private JButton JButton2;
    private JButton JButton20;
    private JButton JButton3;
    private JButton JButton4;
    private JButton JButton5;
    private JButton JButton6;
    private JButton JButton7;
    private JButton JButton8;
    private JButton JButton9;
    

    ImageIcon imagem1 = new ImageIcon(getClass().getResource("/pacotememoria/estrela1.gif"));
    ImageIcon imagem1_1 = new ImageIcon(getClass().getResource("/pacotememoria/estrela2.gif"));
    ImageIcon imagem2 = new ImageIcon(getClass().getResource("/pacotememoria/rosto1.gif"));
    ImageIcon imagem2_2 = new ImageIcon(getClass().getResource("/pacotememoria/rosto2.gif"));
    ImageIcon imagem3 = new ImageIcon(getClass().getResource("/pacotememoria/seta1.gif"));
    ImageIcon imagem3_3 = new ImageIcon(getClass().getResource("/pacotememoria/seta2.gif"));
    ImageIcon imagem4 = new ImageIcon(getClass().getResource("/pacotememoria/conector1.gif"));
    ImageIcon imagem4_4 = new ImageIcon(getClass().getResource("/pacotememoria/conector2.gif"));
    ImageIcon imagem5 = new ImageIcon(getClass().getResource("/pacotememoria/forma1.gif"));
    ImageIcon imagem5_5 = new ImageIcon(getClass().getResource("/pacotememoria/forma2.gif"));
    ImageIcon imagem6 = new ImageIcon(getClass().getResource("/pacotememoria/rosca1.gif"));
    ImageIcon imagem6_6 = new ImageIcon(getClass().getResource("/pacotememoria/rosca2.gif"));
    ImageIcon imagem7 = new ImageIcon(getClass().getResource("/pacotememoria/espiral1.gif"));
    ImageIcon imagem7_7 = new ImageIcon(getClass().getResource("/pacotememoria/espiral2.gif"));
    ImageIcon imagem8 = new ImageIcon(getClass().getResource("/pacotememoria/leme1.gif"));
    ImageIcon imagem8_8 = new ImageIcon(getClass().getResource("/pacotememoria/leme2.gif"));
    ImageIcon imagem9 = new ImageIcon(getClass().getResource("/pacotememoria/quadrado1.gif"));
    ImageIcon imagem9_9 = new ImageIcon(getClass().getResource("/pacotememoria/quadrado2.gif"));
    ImageIcon imagem10 = new ImageIcon(getClass().getResource("/pacotememoria/poligono1.gif"));
    ImageIcon imagem10_10 = new ImageIcon(getClass().getResource("/pacotememoria/poligono2.gif"));
    ImageIcon jogodememoria = new ImageIcon(getClass().getResource("/pacotememoria/jogodememoria.gif"));
    JLabel cliquesTotais = new JLabel("total de cliques totais: ");
    JLabel jogoMemoriaLabel = new JLabel("");
    JLabel paresCertos = new JLabel("");
        JLabel resposta = new JLabel("");
    String contagemGeralX = "";
    JLabel contagemG = new JLabel(contagemGeralX);
    JLabel dica = new JLabel("selecione duas pecas e confira\n boa sorte\n");
 JButton ok = new JButton();
    public Main_1_1() {
        setTitle("jogo de memoria");
        setResizable(true);
        setSize(650, 650);
        setLocation(180, 10);
        setBackground(Color.yellow);
           setDefaultCloseOperation(EXIT_ON_CLOSE);
        jPanel1.setLayout(new GridLayout(5, 5));
        jPanel2.setLayout(new FlowLayout(0));
          jPanel2.setBackground(Color.lightGray);
        jPanel3.setLayout(new GridLayout(2, 2));
         jPanel3.setBackground(Color.red);
        jPanel1.setSize(600, 600);
        resposta = new JLabel("");
         ok = new JButton("OK");
        JButton10 = new JButton();
        JButton11 = new JButton();
        JButton12 = new JButton();
        JButton13 = new JButton();
        JButton14 = new JButton();
        JButton15 = new JButton();
        JButton16 = new JButton();
        JButton17 = new JButton();
        JButton1 = new JButton();
        JButton2 = new JButton();
        JButton3 = new JButton();
        JButton4 = new JButton();
        JButton5 = new JButton();
        JButton6 = new JButton();
        JButton7 = new JButton();
        JButton8 = new JButton();
        JButton9 = new JButton();
        JButton18 = new JButton();
        JButton19 = new JButton();
        JButton20 = new JButton();
        JButton1.addMouseListener(this);
        JButton2.addMouseListener(this);
        JButton3.addMouseListener(this);
        JButton4.addMouseListener(this);
        JButton5.addMouseListener(this);
        JButton6.addMouseListener(this);
        JButton7.addMouseListener(this);
        JButton8.addMouseListener(this);
        JButton9.addMouseListener(this);
        JButton10.addMouseListener(this);
        JButton11.addMouseListener(this);
        JButton12.addMouseListener(this);
        JButton13.addMouseListener(this);
        JButton14.addMouseListener(this);
        JButton15.addMouseListener(this);
        JButton16.addMouseListener(this);
        JButton17.addMouseListener(this);
        JButton18.addMouseListener(this);
        JButton19.addMouseListener(this);
        JButton20.addMouseListener(this);

        JButton1.addActionListener(this);
        JButton2.addActionListener(this);
        JButton3.addActionListener(this);
        JButton4.addActionListener(this);
        JButton5.addActionListener(this);
        JButton6.addActionListener(this);
        JButton7.addActionListener(this);
        JButton8.addActionListener(this);
        JButton9.addActionListener(this);
        JButton10.addActionListener(this);
        JButton11.addActionListener(this);
        JButton12.addActionListener(this);
        JButton13.addActionListener(this);
        JButton14.addActionListener(this);
        JButton15.addActionListener(this);
        JButton16.addActionListener(this);
        JButton17.addActionListener(this);
        JButton18.addActionListener(this);
        JButton19.addActionListener(this);
        JButton20.addActionListener(this);

        JButton20.setBackground(Color.black);
        JButton19.setBackground(Color.black);
        JButton18.setBackground(Color.black);
        JButton17.setBackground(Color.black);
        JButton16.setBackground(Color.black);
        JButton15.setBackground(Color.black);
        JButton14.setBackground(Color.black);
        JButton13.setBackground(Color.black);
        JButton12.setBackground(Color.black);
        JButton11.setBackground(Color.black);
        JButton10.setBackground(Color.black);
        JButton9.setBackground(Color.black);
        JButton8.setBackground(Color.black);
        JButton7.setBackground(Color.black);
        JButton6.setBackground(Color.black);
        JButton5.setBackground(Color.black);
        JButton4.setBackground(Color.black);

        JButton3.setBackground(Color.black);
        JButton2.setBackground(Color.black);
        JButton1.setBackground(Color.black);

        jPanel1.add(JButton1);
        jPanel1.add(JButton2);
        jPanel1.add(JButton3);
        jPanel1.add(JButton4);
        jPanel1.add(JButton5);
        jPanel1.add(JButton6);
        jPanel1.add(JButton7);
        jPanel1.add(JButton8);
        jPanel1.add(JButton9);
        jPanel1.add(JButton10);
        jPanel1.add(JButton11);
        jPanel1.add(JButton12);
        jPanel1.add(JButton13);
        jPanel1.add(JButton14);
        jPanel1.add(JButton15);
        jPanel1.add(JButton16);
        jPanel1.add(JButton17);
        jPanel1.add(JButton18);
        jPanel1.add(JButton19);
        jPanel1.add(JButton20);
        contagemGeralX = String.valueOf(contagemGeral);
        contagemG = new JLabel(contagemGeralX);


        contagemG.setText("" + contagemGeral);
        paresCertos.setText("total de acertos :" + acertos);





dica = new JLabel("selecione duas pecas e confira - boa sorte - versao 1.0 - raghy30@hotmail.com - Fpolis-SC- Brasil");

        jogoMemoriaLabel.setIcon(jogodememoria);
        jPanel2.add(jogoMemoriaLabel);
        jPanel3.add(cliquesTotais);
        jPanel3.add(contagemG);
        jPanel3.add(paresCertos);
         jPanel2.add(dica);

        //adicionar coisas no 2 e no 3...

        //getContentPane().add(jPanel1);
        add(jPanel1, BorderLayout.CENTER);
        add(jPanel2, BorderLayout.SOUTH);
        add(jPanel3, BorderLayout.EAST);
    }

    public void actionPerformed(ActionEvent e) {
        contagemGeral = contagemGeral + 1;
        contagemGeralX = String.valueOf(contagemGeral);
        contagemG.setText("" + contagemGeral);
        paresCertos.setText("total de acertos :" + acertos);

        contagem = contagem + 1;
        if (contagem <= 2) {
            if (estrela == false) {
                if (e.getSource() == JButton1) {
                    if (imagem1b == true) {
                        imagem1b = false;
                        JButton1.setIcon(null);
                    } else {
                        imagem1b = true;
                        JButton1.setIcon(imagem1);
                    }
                }
            }//fecha o estrela false.... ou seja nao permiti apos acertar
            if (estrela == false) {
                if (e.getSource() == JButton10) {
                    if (imagem1_1b == true) {
                        imagem1_1b = false;
                        JButton10.setIcon(null);
                    } else {
                        imagem1_1b = true;
                        JButton10.setIcon(imagem1_1);
                    }
                }
            }

            if ((imagem1_1b == true) && (imagem1b == true)) {
                estrela = true;
                imagem1b = true;
                imagem1_1b = true;
                acertos = acertos + 1;
                paresCertos.setText("total de acertos :" + acertos);
                JOptionPane.showMessageDialog(jPanel3, "acertou estrela", "certos", 1);
                falseiaTudo();


            }






            if (rosto == false) {
                if (e.getSource() == JButton9) {
                    if (imagem2b == true) {
                        imagem2b = false;
                        JButton9.setIcon(null);
                    } else {
                        imagem2b = true;
                        JButton9.setIcon(imagem2);
                    }
                }
            }
            if (rosto == false) {
                if (e.getSource() == JButton7) {
                    if (imagem2_2b == true) {
                        imagem2_2b = false;
                        JButton7.setIcon(null);
                    } else {
                        imagem2_2b = true;
                        JButton7.setIcon(imagem2);
                    }
                }
            }


            if ((imagem2_2b == true) && (imagem2b == true)) {
                rosto = true;
                imagem2b = true;
                imagem2_2b = true;
                acertos = acertos + 1;
                paresCertos.setText("total de acertos :" + acertos);
                JOptionPane.showMessageDialog(jPanel3, "acertou rosto", "certos", 1);
                falseiaTudo();

            }

            if (seta == false) {
                if (e.getSource() == JButton5) {
                    if (imagem3b == true) {
                        imagem3b = false;
                        JButton5.setIcon(null);
                    } else {
                        imagem3b = true;
                        JButton5.setIcon(imagem3);
                    }
                }
            }
            if (seta == false) {
                if (e.getSource() == JButton15) {
                    if (imagem3_3b == true) {
                        imagem3_3b = false;
                        JButton15.setIcon(null);
                    } else {
                        imagem3_3b = true;
                        JButton15.setIcon(imagem3_3);
                    }
                }
            }

            if ((imagem3_3b == true) && (imagem3b == true)) {
                seta = true;
                imagem3b = true;
                imagem3_3b = true;

                acertos = acertos + 1;
                paresCertos.setText("total de acertos :" + acertos);
                JOptionPane.showMessageDialog(jPanel3, "acertou seta", "certos", 1);
                falseiaTudo();


            }





            if (conector == false) {
                if (e.getSource() == JButton11) {
                    if (imagem4b == true) {
                        imagem4b = false;
                        JButton11.setIcon(null);
                    } else {
                        imagem4b = true;
                        JButton11.setIcon(imagem4);
                    }

                }
            }
            if (conector == false) {
                if (e.getSource() == JButton13) {
                    if (imagem4_4b == true) {
                        imagem4_4b = false;
                        JButton13.setIcon(null);
                    } else {
                        imagem4_4b = true;
                        JButton13.setIcon(imagem4_4);
                    }
                }
            }

            if ((imagem4_4b == true) && (imagem4b == true)) {
                conector = true;
                imagem4b = true;
                imagem4_4b = true;

                acertos = acertos + 1;
                paresCertos.setText("total de acertos :" + acertos);
                JOptionPane.showMessageDialog(jPanel3, "acertou conector", "certos", 1);
                falseiaTudo();


            }





            if (forma == false) {
                if (e.getSource() == JButton3) {
                    if (imagem5b == true) {
                        imagem5b = false;
                        JButton3.setIcon(null);
                    } else {
                        imagem5b = true;
                        JButton3.setIcon(imagem5);
                    }
                }
            }
            if (forma == false) {
                if (e.getSource() == JButton14) {
                    if (imagem5_5b == true) {
                        imagem5_5b = false;
                        JButton14.setIcon(null);
                    } else {
                        imagem5_5b = true;
                        JButton14.setIcon(imagem5_5);
                    }
                }
            }
            if ((imagem5_5b == true) && (imagem5b == true)) {
                forma = true;
                imagem5b = true;
                imagem5_5b = true;

                acertos = acertos + 1;
                paresCertos.setText("total de acertos :" + acertos);
                JOptionPane.showMessageDialog(jPanel3, "acertou forma", "certos", 1);
                falseiaTudo();

            }



            if (rosca == false) {
                if (e.getSource() == JButton6) {
                    if (imagem6b == true) {
                        imagem6b = false;
                        JButton6.setIcon(null);
                    } else {
                        imagem6b = true;
                        JButton6.setIcon(imagem6);
                    }
                }
            }
            if (rosca == false) {
                if (e.getSource() == JButton8) {
                    if (imagem6_6b == true) {
                        imagem6_6b = false;
                        JButton8.setIcon(null);
                    } else {
                        imagem6_6b = true;
                        JButton8.setIcon(imagem6_6);
                    }
                }
            }

            if ((imagem6_6b == true) && (imagem6b == true)) {
                rosca = true;
                imagem6b = true;
                imagem6_6b = true;
                acertos = acertos + 1;
                paresCertos.setText("total de acertos :" + acertos);

                JOptionPane.showMessageDialog(jPanel3, "acertou rosca", "certos", 1);
                falseiaTudo();

            }


            if (espiral == false) {
                if (e.getSource() == JButton4) {
                    if (imagem7b == true) {
                        imagem7b = false;
                        JButton4.setIcon(null);
                    } else {
                        imagem7b = true;
                        JButton4.setIcon(imagem7);
                    }
                }
            }

            if (espiral == false) {
                if (e.getSource() == JButton12) {
                    if (imagem7_7b == true) {
                        imagem7_7b = false;
                        JButton12.setIcon(null);
                    } else {
                        imagem7_7b = true;
                        JButton12.setIcon(imagem7_7);
                    }
                }
            }
            if ((imagem7_7b == true) && (imagem7b == true)) {
                espiral = true;
                imagem7b = true;
                imagem7_7b = true;

                acertos = acertos + 1;
                paresCertos.setText("total de acertos :" + acertos);
                JOptionPane.showMessageDialog(jPanel3, "acertou espiral", "certos", 1);
                falseiaTudo();

            }



            if (leme == false) {
                if (e.getSource() == JButton16) {
                    if (imagem8b == true) {
                        imagem8b = false;
                        JButton16.setIcon(null);
                    } else {
                        imagem8b = true;
                        JButton16.setIcon(imagem8);
                    }
                }

            }

            if (leme == false) {
                if (e.getSource() == JButton19) {
                    if (imagem8_8b == true) {
                        imagem8_8b = false;
                        JButton19.setIcon(null);
                    } else {
                        imagem8_8b = true;
                        JButton19.setIcon(imagem8_8);
                    }
                }
            }
            if ((imagem8_8b == true) && (imagem8b == true)) {
                leme = true;
                imagem8b = true;
                imagem8_8b = true;
                acertos = acertos + 1;
                paresCertos.setText("total de acertos :" + acertos);
                JOptionPane.showMessageDialog(jPanel3, "acertou leme", "certos", 1);
                falseiaTudo();

            }






            if (quadrado == false) {
                if (e.getSource() == JButton17) {
                    if (imagem9b == true) {
                        imagem9b = false;
                        JButton17.setIcon(null);
                    } else {
                        imagem9b = true;
                        JButton17.setIcon(imagem9);
                    }
                }
            }
            if (quadrado == false) {
                if (e.getSource() == JButton20) {
                    if (imagem9_9b == true) {
                        imagem9_9b = false;
                        JButton20.setIcon(null);
                    } else {
                        imagem9_9b = true;
                        JButton20.setIcon(imagem9_9);
                    }
                }
            }

            if ((imagem9_9b == true) && (imagem9b == true)) {
                quadrado = true;
                imagem9b = true;
                imagem9_9b = true;
                acertos = acertos + 1;
                paresCertos.setText("total de acertos :" + acertos);
                JOptionPane.showMessageDialog(jPanel3, "acertou quadrado", "certos", 1);
                falseiaTudo();

            }



            if (poligono == false) {
                if (e.getSource() == JButton2) {
                    if (imagem10b == true) {
                        imagem10b = false;
                        JButton2.setIcon(null);
                    } else {
                        imagem10b = true;
                        JButton2.setIcon(imagem10);
                    }
                }
            }
            if (poligono == false) {
                if (e.getSource() == JButton18) {
                    if (imagem10_10b == true) {
                        imagem10_10b = false;
                        JButton18.setIcon(null);
                    } else {
                        imagem10_10b = true;
                        JButton18.setIcon(imagem10_10);
                    }
                }
            }
            if ((imagem10_10b == true) && (imagem10b == true)) {
                poligono = true;
                imagem10b = true;
                imagem10_10b = true;
                acertos = acertos + 1;
                paresCertos.setText("total de acertos :" + acertos);
                JOptionPane.showMessageDialog(jPanel3, "acertou poligono", "certos", 1);
                falseiaTudo();

            }




            if (contagem == 2) {
                JOptionPane.showMessageDialog(jPanel3, "nao deu ainda", "tente de novo", 1);


                resetaErrados();
                falseiaTudo();
                contagem = 0;

            }
        }

        /*else {
        resetaErrados();
        contagem = 0;
        falseiaTudo();
        }*/


        if (acertos == 10) {
            JOptionPane.showMessageDialog(null, "parabens, vc usou " + contagemGeral + " cliques\n ao clicar ok\n o jogo se reinicia\n", "voce acertou todos", 1);
            contagemGeral = 0;
            acertos = 0;
            contagem = 0;
            estrela = false;
            rosto = false;
            seta = false;
            conector = false;
            forma = false;
            rosca = false;
            espiral = false;
            leme = false;
            quadrado = false;
            poligono = false;
            resetaErrados();
            falseiaTudo();
              contagemG.setText("" + contagemGeral);
                paresCertos.setText("total de acertos :" + acertos);
            
            
            
        }


    }

    public void mousePressed(MouseEvent e) {


    }

    public void mouseExited(MouseEvent e) {

        if (e.getSource() == JButton20) {
            JButton20.setBackground(Color.black);
        }
        if (e.getSource() == JButton19) {
            JButton19.setBackground(Color.black);
        }
        if (e.getSource() == JButton18) {
            JButton18.setBackground(Color.black);
        }

        if (e.getSource() == JButton17) {
            JButton17.setBackground(Color.black);
        }
        if (e.getSource() == JButton16) {
            JButton16.setBackground(Color.black);
        }
        if (e.getSource() == JButton15) {
            JButton15.setBackground(Color.black);
        }
        if (e.getSource() == JButton14) {
            JButton14.setBackground(Color.black);
        }
        if (e.getSource() == JButton13) {

            JButton13.setBackground(Color.black);
        }
        if (e.getSource() == JButton12) {
            JButton12.setBackground(Color.black);
        }
        if (e.getSource() == JButton11) {
            JButton11.setBackground(Color.black);
        }
        if (e.getSource() == JButton10) {
            JButton10.setBackground(Color.black);
        }
        if (e.getSource() == JButton9) {
            JButton9.setBackground(Color.black);
        }
        if (e.getSource() == JButton8) {
            JButton8.setBackground(Color.black);
        }
        if (e.getSource() == JButton7) {
            JButton7.setBackground(Color.black);
        }
        if (e.getSource() == JButton6) {
            JButton6.setBackground(Color.black);
        }

        if (e.getSource() == JButton5) {
            JButton5.setBackground(Color.black);
        }
        if (e.getSource() == JButton4) {
            JButton4.setBackground(Color.black);
        }
        if (e.getSource() == JButton3) {

            JButton3.setBackground(Color.black);
        }
        if (e.getSource() == JButton2) {
            JButton2.setBackground(Color.black);
        }
        if (e.getSource() == JButton1) {
            JButton1.setBackground(Color.black);
        }




    }

    public void mouseEntered(MouseEvent e) {


        if (e.getSource() == JButton20) {
            JButton20.setBackground(Color.yellow);
        }
        if (e.getSource() == JButton19) {
            JButton19.setBackground(Color.yellow);
        }
        if (e.getSource() == JButton18) {
            JButton18.setBackground(Color.yellow);
        }

        if (e.getSource() == JButton17) {
            JButton17.setBackground(Color.yellow);
        }
        if (e.getSource() == JButton16) {
            JButton16.setBackground(Color.yellow);
        }
        if (e.getSource() == JButton15) {
            JButton15.setBackground(Color.yellow);
        }
        if (e.getSource() == JButton14) {
            JButton14.setBackground(Color.yellow);
        }
        if (e.getSource() == JButton13) {

            JButton13.setBackground(Color.yellow);
        }
        if (e.getSource() == JButton12) {
            JButton12.setBackground(Color.yellow);
        }
        if (e.getSource() == JButton11) {
            JButton11.setBackground(Color.yellow);
        }
        if (e.getSource() == JButton10) {
            JButton10.setBackground(Color.yellow);
        }
        if (e.getSource() == JButton9) {
            JButton9.setBackground(Color.yellow);
        }
        if (e.getSource() == JButton8) {
            JButton8.setBackground(Color.yellow);
        }
        if (e.getSource() == JButton7) {
            JButton7.setBackground(Color.yellow);
        }
        if (e.getSource() == JButton6) {
            JButton6.setBackground(Color.yellow);
        }

        if (e.getSource() == JButton5) {
            JButton5.setBackground(Color.yellow);
        }
        if (e.getSource() == JButton4) {
            JButton4.setBackground(Color.yellow);
        }
        if (e.getSource() == JButton3) {

            JButton3.setBackground(Color.yellow);
        }
        if (e.getSource() == JButton2) {
            JButton2.setBackground(Color.yellow);
        }
        if (e.getSource() == JButton1) {
            JButton1.setBackground(Color.yellow);
        }


    }

    public void mouseClicked(MouseEvent e) {


    // contagemGeral=contagemGeral+1;
    //contagem=contagem+1;

    }

    public void mouseReleased(MouseEvent e) {

    }

    public void resetaErrados() {
        if (estrela == false) {
            JButton1.setIcon(null);
            JButton10.setIcon(null);
        }
        if (seta == false) {
            JButton5.setIcon(null);
            JButton15.setIcon(null);
        }
        if (rosto == false) {
            JButton7.setIcon(null);
            JButton9.setIcon(null);
        }
        if (conector == false) {
            JButton11.setIcon(null);
            JButton13.setIcon(null);
        }
        if (forma == false) {
            JButton14.setIcon(null);
            JButton3.setIcon(null);
        }
        if (rosca == false) {
            JButton8.setIcon(null);
            JButton6.setIcon(null);
        }
        if (espiral == false) {
            JButton4.setIcon(null);
            JButton12.setIcon(null);
        }
        if (leme == false) {
            JButton16.setIcon(null);
            JButton19.setIcon(null);
        }
        if (quadrado == false) {
            JButton17.setIcon(null);
            JButton20.setIcon(null);
        }
        if (poligono == false) {
            JButton18.setIcon(null);
            JButton2.setIcon(null);
        }
    }

    public void falseiaTudo() {
        //    estrela, rosto,seta,conector,forma=false;
        // rosca,espiral,leme,quadrado,poligono=false;
        imagem1b = false;
        imagem2b = false;
        imagem3b = false;
        imagem4b = false;
        imagem5b = false;
        imagem6b = false;
        imagem7b = false;
        imagem8b = false;
        imagem9b = false;
        imagem10b = false;



        imagem1_1b = false;
        imagem2_2b = false;
        imagem3_3b = false;
        imagem4_4b = false;
        imagem5_5b = false;
        imagem6_6b = false;
        imagem7_7b = false;
        imagem8_8b = false;
        imagem9_9b = false;
        imagem10_10b = false;
        contagem = 0;
    }

    public static void main(String[] args) {
        new Main_1_1().setVisible(true);
    }
}

seu posto o mesmo código com as imagens em c , ele funciona normalmente, por isso não sei o que pode ser.

nesta parte do texto deve estar o problema, mas nao sei resolver. alguma ajuda?

ImageIcon imagem1 = new ImageIcon("C://imagensmemoria/estrela1.gif"); ImageIcon imagem1_1 = new ImageIcon("C://imagensmemoria/estrela2.gif"); ImageIcon imagem2 = new ImageIcon("C://imagensmemoria/rosto1.gif"); ImageIcon imagem2_2 = new ImageIcon("C://imagensmemoria/rosto2.gif"); ImageIcon imagem3 = new ImageIcon("C://imagensmemoria/seta1.gif"); ImageIcon imagem3_3 = new ImageIcon("C://imagensmemoria/seta2.gif"); ImageIcon imagem4 = new ImageIcon("C://imagensmemoria/conector1.gif"); ImageIcon imagem4_4 = new ImageIcon("C://imagensmemoria/conector2.gif"); ImageIcon imagem5 = new ImageIcon("C://imagensmemoria/forma1.gif"); ImageIcon imagem5_5 = new ImageIcon("C://imagensmemoria/forma2.gif"); ImageIcon imagem6 = new ImageIcon("C://imagensmemoria/rosca1.gif"); ImageIcon imagem6_6 = new ImageIcon("C://imagensmemoria/rosca2.gif"); ImageIcon imagem7 = new ImageIcon("C://imagensmemoria/espiral1.gif"); ImageIcon imagem7_7 = new ImageIcon("C://imagensmemoria/espiral2.gif"); ImageIcon imagem8 = new ImageIcon("C://imagensmemoria/leme1.gif"); ImageIcon imagem8_8 = new ImageIcon("C://imagensmemoria/leme2.gif"); ImageIcon imagem9 = new ImageIcon("C://imagensmemoria/quadrado1.gif"); ImageIcon imagem9_9 = new ImageIcon("C://imagensmemoria/quadrado2.gif"); ImageIcon imagem10 = new ImageIcon("C://imagensmemoria/poligono1.gif"); ImageIcon imagem10_10 = new ImageIcon("C://imagensmemoria/poligono2.gif"); ImageIcon jogodememoria = new ImageIcon("C://imagensmemoria/jogodememoria.gif"); JLabel cliquesTotais = new JLabel("total de cliques totais: "); JLabel jogoMemoriaLabel = new JLabel(""); JLabel paresCertos = new JLabel(""); String contagemGeralX = ""; JLabel contagemG = new JLabel(contagemGeralX); JLabel dica = new JLabel("selecione duas pecas e confira\n boa sorte\n");

segue meu jogo de forca, que tem a mesma estrutura e funciona. por isso não entendo.
se alguém quiser as imagens da forca me peca que eu mando.


package forca_por_raghy;

/*
* Forca.java
*
* Created on 6 de Agosto de 2009, 09:07
*/


import java.awt.event.KeyEvent;
//import javax.swing.DefaultListModel;
//import javax.swing.JList;
//import javax.swing.JOptionPane;

import javax.swing.*;

/**
*
* @author  raghyjose
*/
public class Forca_1 extends javax.swing.JFrame {

    public double x = 0;
    //palavras
    String palavras[] = new String[0];
    //para saber se na primeira vez, usou o botão...
    boolean inicia = false;
    //linha 540 esta palavra ja foi dita... quando houver...
  //  String valores[] = new String[10];
    int c = -1;
    //letras
    DefaultListModel model = new DefaultListModel();
    JList list = new JList(model);
    //palavras ja usadas
    DefaultListModel model2 = new DefaultListModel();
    JList list2 = new JList(model2);
    int letraDita = 0;
    //hh é variavel do array palavras 2
    int h = 0;
    int erros = 0;
    //int totalErros=20;
    int realTotalErros = 20;
    int tamanho = 0;
    String palavraEscolhida = "";
    //vitorias
    int vitorias = 0;
    //derrotas
    int derrotas = 0;
    //t e para aumentar o numero do array de palavras ditas
    int t = 0;
    int pos = 0;
    int z = 0;
    int i = 0;
    boolean letraJaDita = false;
    int pec3 = 0;
    int pec4 = 0;
    int pec2 = 0;
    int pec = 0;
    int lastX = 0;
    int b = 1;
    boolean palavraJaDita = false;
    boolean espaco = false;
    boolean animais = false;
    boolean aleatorias = true;
    boolean musica = false;
    boolean objetos = false;
    int d = -1;
    //ImageIcon f0 = new ImageIcon("C:/IMAGENS/forcadesenho0.gif");


     ImageIcon f0 = new ImageIcon(getClass().getResource("/forca_por_raghy/forcadesenho0.gif"));

    ImageIcon f1 = new ImageIcon(getClass().getResource("/forca_por_raghy/forcadesenho1.gif"));
    ImageIcon f2 = new ImageIcon(getClass().getResource("/forca_por_raghy/forcadesenho2.gif"));
    ImageIcon f3 = new ImageIcon(getClass().getResource("/forca_por_raghy/forcadesenho3.gif"));
    ImageIcon f4 = new ImageIcon(getClass().getResource("/forca_por_raghy/forcadesenho4.gif"));
    ImageIcon f5 = new ImageIcon(getClass().getResource("/forca_por_raghy/forcadesenho5.gif"));
    ImageIcon f6 = new ImageIcon(getClass().getResource("/forca_por_raghy/forcadesenho6.gif"));
    ImageIcon f7 = new ImageIcon(getClass().getResource("/forca_por_raghy/forcadesenho7.gif"));
    ImageIcon f8 = new ImageIcon(getClass().getResource("/forca_por_raghy/forcadesenho8.gif"));
    ImageIcon f9 = new ImageIcon(getClass().getResource("/forca_por_raghy/forcadesenho9.gif"));
    ImageIcon f10 = new ImageIcon(getClass().getResource("/forca_por_raghy/forcadesenho10.gif"));
    ImageIcon f11 = new ImageIcon(getClass().getResource("/forca_por_raghy/forcadesenho11.gif"));
    ImageIcon f12 = new ImageIcon(getClass().getResource("/forca_por_raghy/forcadesenho12.gif"));
    ImageIcon f13 = new ImageIcon(getClass().getResource("/forca_por_raghy/forcadesenho13.gif"));
    ImageIcon f14 = new ImageIcon(getClass().getResource("/forca_por_raghy/forcadesenho14.gif"));
    ImageIcon f15 = new ImageIcon(getClass().getResource("/forca_por_raghy/forcadesenho15.gif"));
    ImageIcon f16 = new ImageIcon(getClass().getResource("/forca_por_raghy/forcadesenho16.gif"));
    ImageIcon f17 = new ImageIcon(getClass().getResource("/forca_por_raghy/forcadesenho17a.gif"));
    ImageIcon f18 = new ImageIcon(getClass().getResource("/forca_por_raghy/forcadesenho18a.gif"));
    ImageIcon f19 = new ImageIcon(getClass().getResource("/forca_por_raghy/forcadesenho19a.gif"));
    ImageIcon f20 = new ImageIcon(getClass().getResource("/forca_por_raghy/forcadesenho20a.gif"));

    public Forca_1() {
        initComponents();
        setLocationRelativeTo(null);
        inicia();
    }
    String letra = "";
    String palavraCerta2 = "";

    public void derrotaVitorias() {
        //determina a derrota
        if (realTotalErros == 0) {
            jLabel3.setText("A palavra era : " + palavraEscolhida);
            JOptionPane.showMessageDialog(null, "VOCE PERDEU 20 VEZES! ", "PERDEU !!!", JOptionPane.INFORMATION_MESSAGE);

            erros = 0;
            realTotalErros = 20;
            letra = "";
            //conta derrotas
            derrotas = derrotas + 1;
            jLderrotas.setText("Derrotas: " + derrotas);
            //rotina para começar sozinho
            recomeco();
        }// fechar o derrota...
        acertaPalavra();
//aqui determina a vitoria
        if (palavraCerta2.equals(palavraEscolhida)) {
            jLabel3.setText("Voce acertou a palavra  : " + palavraEscolhida);
            JOptionPane.showMessageDialog(null, "A palavra esta certa: " + palavraEscolhida + "", "Vc ganhou !!!", JOptionPane.INFORMATION_MESSAGE);

            //vitorias e palavras ditas
            vitorias = vitorias + 1;
            jLvitorias.setText("Vitorias : " + vitorias);
            recomeco();
        }

    }
    public void inicia() {
        inicia = true;


        if (realTotalErros == 0) {
            jLErrou.setIcon(f20);
        }


        verificaCategoria();
        int laco3 = 0;
        while (laco3 == 0) {

            x = Math.random() * palavras.length;
            b = (int) x;
            palavraEscolhida = palavras[b];
            tamanho = palavras[b].length();
            jLTamanho.setText("a palavra escolhida tem " + tamanho + " letras");



            if (model2.contains(palavraEscolhida)) {
                palavraJaDita = true;
            } else {
                d = d + 1;
                model2.add(d, palavraEscolhida);
                laco3 = 1;
            }
        }

        tamanhos();




    }
    public void principal(){
        //continua tudo...
        if (inicia == true) {
            //colocar exceção para textfield nulo
            jTletra.requestFocus();
            //captura a letra digitada
            String letraQualquer = jTletra.getText();
            //poe letras para minusculo
            letra = letraQualquer.toLowerCase();
            //capturada nao precisa mais, vinha do getText()
            String palavraEscolhidaCapturada = palavraEscolhida;
            pec = palavraEscolhidaCapturada.indexOf(letra);
            //acerta o valor porque array começa com zero
            pec2 = pec + 1;
            //no caso de duas ocorrencias, captura o ultimo index...
            pec3 = palavraEscolhidaCapturada.lastIndexOf(letra);
            pec4 = pec3 + 1;


            if (letra.equals("")  &&  !model.isEmpty()  ) {
                JOptionPane.showMessageDialog(null, "Espaco em branco!!", "Digite uma Letra", JOptionPane.INFORMATION_MESSAGE);
                espaco = true;
                pec2 = 0;
                pec4 = 0;
                //aqui vale para nao contar erro
                letraJaDita = true;
            }
            //de novo  quando começa, pega o espaço, entao tem que prevenir, para nao entrar na lista,
            // e nao ...
             if (letra.equals("") && model.isEmpty()) {
                espaco = true;
                 JOptionPane.showMessageDialog(null, "Digite uma letra", "Digite uma Letra", JOptionPane.INFORMATION_MESSAGE);
                 jLlugarLetra.setText("");
               //aqui vale para nao contar erro
                letraJaDita = true;
            }
             if(letra.equals("")) {letra="_"; pec2=0; pec4=0; }

            //teste para duas letras, nao valer. ok funcionou... nao vale duas letras.
            if (letra.length() > 1) {
                JOptionPane.showMessageDialog(null, "Somente uma letra.", "Digite uma Letra", JOptionPane.INFORMATION_MESSAGE);
                espaco = true;
                pec2 = 0;
                pec4 = 0;
                 //aqui vale para nao contar erro
                letraJaDita = true;
            }



            if (pec2 == pec4) {
                jLlugarLetra.setText("A letra  " + letra + " esta na posicao" + pec2);
            } else {
                jLlugarLetra.setText("A letra  " + letra + " esta na posicao " + pec2 + " e " + pec4);
            }

            if (model.contains(letra) && (!letra.equals(""))) {
                //   && (!letra.equals(""))) {   -se tiver dois espaços nao mostra letra ja dita.
                JOptionPane.showMessageDialog(null, "Esta letra ja foi dita!", "Letra ja dita", JOptionPane.INFORMATION_MESSAGE);
                jTletra.setText("");
                letraJaDita = true;

            } else if (!espaco==true) {
                c = c + 1;
                model.add(c, letra);
                jLletrasDitas.setText("" + model + "");
                jTletra.setText("");
                letraJaDita = false;
            }


            //achar uma excecao caso a letra nao exista ou   _____ -ERROS  ____ ---
            if (pec2 <= 0) {
                jLlugarLetra.setText("A letra " + letra + " nao esta em posicao alguma");
                //calcula as vezes em que houveram erros
                //se a letra ja foi dita, nao conta como erro.
                //ou seja se nao foi dita, conta erro.
                if (letraJaDita == false) {
                    erros = erros + 1;
                    realTotalErros = realTotalErros - 1;
                }


                if (erros > 1) {
                    jLerros.setText("Voce ja errou " + erros + " vezes, pode errar mais " + realTotalErros);
                } else { //so para o plural de erros ,  e vez..
                    jLerros.setText("Voce ja errou " + erros + " vez, pode errar mais " + realTotalErros);
                }
            }//FECHA O IF de ERROS

            imagensErros();
            letrasLugar();
            derrotaVitorias();

            if (model2.size() == palavras.length) {
                JOptionPane.showMessageDialog(null, "Vc usou todas as palavras do jogo.", "Fim de Jogo", JOptionPane.INFORMATION_MESSAGE);
                System.exit(0);
            }
            espaco = false;

        }
    }
    public void aleatorias() {
        palavras = new String[26];
        palavras[0] = "casa";
        palavras[1] = "agua";
        palavras[2] = "carro";
        palavras[3] = "chuva";
        palavras[4] = "roupa";
        palavras[5] = "moda";
        palavras[6] = "rua";
        palavras[7] = "lua";
        palavras[8] = "fruto";
        palavras[9] = "bola";
        //palavras[10]="medida";
        palavras[10] = "curva";
        palavras[11] = "asa";
        palavras[12] = "crime";
        palavras[13] = "gol";
        palavras[14] = "arma";
        palavras[15] = "nadar";
        palavras[16] = "jogar";
        palavras[17] = "ativo";
        palavras[18] = "vida";
        palavras[19] = "ato";
        palavras[20] = "seta";
        palavras[21] = "meta";
        palavras[22] = "reta";
        palavras[23] = "cueca";
        palavras[24] = "mesa";
        palavras[25] = "quadro";

    }
    public void animais() {
        palavras = new String[10];
        palavras[0] = "cavalo";
        palavras[1] = "coelho";
        palavras[2] = "zebra";
        palavras[3] = "coruja";
        palavras[4] = "cobra";
        palavras[5] = "gato";
        palavras[6] = "macaco";
        palavras[7] = "onça";
        palavras[8] = "urso";
        palavras[9] = "veado";
    //nao fiz para 3 letras iguais na palavra...
    }
    public void objetos() {
        palavras = new String[5];
        palavras[0] = "vaso";
        palavras[1] = "jarro";
        palavras[2] = "cadeira";
        palavras[3] = "armario";
        palavras[4] = "relogio";
    }
    public void musica() {
        palavras = new String[5];
        palavras[0] = "guitarra";
        palavras[1] = "violao";
        palavras[2] = "bateria";
        palavras[3] = "flauta";
        palavras[4] = "piano";
    }
    public void tamanhos() {
        if (tamanho == 8) {
            jTl4.setVisible(true);
            jTl5.setVisible(true);
            jTl6.setVisible(true);
            jTl7.setVisible(true);
            jTl8.setVisible(true);

        }



        if (tamanho == 7) {
            jTl4.setVisible(true);
            jTl5.setVisible(true);
            jTl6.setVisible(true);
            jTl7.setVisible(true);
            jTl8.setVisible(false);
        }



        if (tamanho == 6) {
            jTl4.setVisible(true);
            jTl5.setVisible(true);
            jTl6.setVisible(true);
            jTl7.setVisible(false);
            jTl8.setVisible(false);
        }

        if (tamanho == 5) {
            jTl4.setVisible(true);
            jTl5.setVisible(true);
            jTl6.setVisible(false);
            jTl7.setVisible(false);
            jTl8.setVisible(false);
        }
        if (tamanho == 4) {
            jTl6.setVisible(false);
            jTl7.setVisible(false);
            jTl5.setVisible(false);
            jTl4.setVisible(true);
            jTl8.setVisible(false);
        }
        if (tamanho == 3) {
            jTl4.setVisible(false);
            jTl5.setVisible(false);
            jTl6.setVisible(false);
            jTl7.setVisible(false);
            jTl8.setVisible(false);

        }
    }
    public void verificaCategoria() {
        if (animais == true) {
            //esvaziar o model para nao acabar o jogo se acabarem as palavras,
            //ou nao acumular palavras de outras categorias no model...
            //-1 no d, para acertar o array.
            model2 = new DefaultListModel();
            list2 = new JList(model2);
            d=-1;
            animais();
            aleatorias = false;
            objetos = false;
            musica = false;


        }
        if (aleatorias == true) {
              model2 = new DefaultListModel();
            list2 = new JList(model2);
            d=-1;
            aleatorias();
            animais = false;
            objetos = false;
            musica = false;
        }
        if (objetos == true) {
              model2 = new DefaultListModel();
            list2 = new JList(model2);
            d=-1;
            objetos();
            animais = false;
            aleatorias = false;
            musica = false;
        }
        if (musica == true) {
              model2 = new DefaultListModel();
            list2 = new JList(model2);
            d=-1;
            musica();
            animais = false;
            aleatorias = false;
            objetos = false;
        }


    }
    public void imagensErros() {
        if (realTotalErros == 20) {
            jLErrou.setIcon(f0);
        }
        if (realTotalErros == 19) {
            jLErrou.setIcon(f1);
        }
        if (realTotalErros == 18) {
            jLErrou.setIcon(f2);
        }
        if (realTotalErros == 17) {
            jLErrou.setIcon(f3);
        }
        if (realTotalErros == 16) {
            jLErrou.setIcon(f4);
        }
        if (realTotalErros == 15) {
            jLErrou.setIcon(f5);
        }
        if (realTotalErros == 14) {
            jLErrou.setIcon(f6);
        }
        if (realTotalErros == 13) {
            jLErrou.setIcon(f7);
        }
        if (realTotalErros == 12) {
            jLErrou.setIcon(f8);
        }
        if (realTotalErros == 11) {
            jLErrou.setIcon(f9);
        }
        if (realTotalErros == 10) {
            jLErrou.setIcon(f10);
        }
        if (realTotalErros == 9) {
            jLErrou.setIcon(f11);
        }
        if (realTotalErros == 8) {
            jLErrou.setIcon(f12);
        }
        if (realTotalErros == 7) {
            jLErrou.setIcon(f13);
        }
        if (realTotalErros == 6) {
            jLErrou.setIcon(f14);
        }
        if (realTotalErros == 5) {
            jLErrou.setIcon(f15);
        }
        if (realTotalErros == 4) {
            jLErrou.setIcon(f16);
        }
        if (realTotalErros == 3) {
            jLErrou.setIcon(f17);
        }
        if (realTotalErros == 2) {
            jLErrou.setIcon(f18);
        }
        if (realTotalErros == 1) {
            jLErrou.setIcon(f19);
        }
         if (realTotalErros == 0) {
            jLErrou.setIcon(f20);
        }


    }
    public void letrasLugar() {
        //coloca letras certas no textfield
        if (pec2 == 1) {
            jTl1.setText(letra);
        }
        if (pec2 == 2) {
            jTl2.setText(letra);
        }
        if (pec2 == 3) {
            jTl3.setText(letra);
        }
        if (pec2 == 4) {
            jTl4.setText(letra);
        }
        if (pec2 == 5) {
            jTl5.setText(letra);
        }
        if (pec2 == 6) {
            jTl6.setText(letra);
        }
        if (pec2 == 7) {
            jTl7.setText(letra);
        }if (pec2 == 8) {
            jTl8.setText(letra);
        }


        // e no caso de duas ocorrencias da mesma letra...
        if (pec4 == 1) {
            jTl1.setText(letra);
        }
        if (pec4 == 2) {
            jTl2.setText(letra);
        }
        if (pec4 == 3) {
            jTl3.setText(letra);
        }
        if (pec4 == 4) {
            jTl4.setText(letra);
        }
        if (pec4 == 5) {
            jTl5.setText(letra);
        }
        if (pec4 == 6) {
            jTl6.setText(letra);
        }
        if (pec4 == 7) {
            jTl7.setText(letra);
        }
        if (pec4 ==8) {
            jTl8.setText(letra);
        }
        pec3 = 0;
        pec4 = 0;//para so mostrar se realmente houver o pac4, ou duas letras, ou seja o lastindexof...



    }
    public void recomeco() {
        Object[] options2 = {"Sim", "Não"};
        int confirmar2 = JOptionPane.showOptionDialog(null, "Deseja jogar novamente?", "Novo jogo", JOptionPane.DEFAULT_OPTION, JOptionPane.YES_OPTION, null, options2, options2[0]);
        if (confirmar2 == 0) {
            jTl1.setText("");
            jTl2.setText("");
            jTl3.setText("");
            jTl4.setText("");
            jTl5.setText("");
            jTl6.setText("");
            jTl7.setText("");
            jTl8.setText("");
            jLlugarLetra.setText("");
            //zera a lista de letras ditas...
            model = new DefaultListModel();
            list = new JList(model);


            model2 = new DefaultListModel();
            list2 = new JList(model2);
            c = -1;
            jLletrasDitas.setText("" + model);
            jLerros.setText("Voce ainda nao errou e pode errar 20 vezes.");
            erros = 0;
            realTotalErros = 20;

            //poe a imagem inicial...
             if (realTotalErros == 20) {
            jLErrou.setIcon(f0);
        }



         escolhePalavra();}
    }
    public void zeraModel() {
          jTl1.setText("");
            jTl2.setText("");
            jTl3.setText("");
            jTl4.setText("");
            jTl5.setText("");
            jTl6.setText("");
            jTl7.setText("");
            jTl8.setText("");
            jLlugarLetra.setText("");
            //zera a lista de letras ditas...
            model = new DefaultListModel();
            list = new JList(model);






            c = -1;
            jLletrasDitas.setText("" + model);
            jLerros.setText("Voce ainda nao errou e pode errar 20 vezes.");
            erros = 0;
            realTotalErros = 20;





    }
    public void escolhePalavra(){
        //escolhe palavra automaticamente...
            verificaCategoria();
            x = Math.random() * palavras.length;
            b = (int) x;
//                String b11 = String.valueOf(b);
            palavraEscolhida = palavras[b];
            tamanho = palavras[b].length();
            jLTamanho.setText("a palavra escolhida tem " + tamanho + " letras");
            int laco2 = 0;
            while (laco2 == 0) {
                if (model2.contains(palavraEscolhida)) {

                    x = Math.random() * palavras.length;
                    b = (int) x;
                    //                      b11 = String.valueOf(b);
                    palavraEscolhida = palavras[b];
                    tamanho = palavras[b].length();
                    jLTamanho.setText("a palavra escolhida tem " + tamanho + " letras");
                    //acho que posso tirar isto
                    palavraJaDita = false;

                } else {
                    laco2 = laco2 + 1;
                    d = d + 1;
                    model2.add(d, palavraEscolhida);
                }
               tamanhos();
            }//fecha o while com palavra escolhida


    }
    public void acertaPalavra() {
        //acertar a palavra
        String l1 = jTl1.getText();
        String l2 = jTl2.getText();
        String l3 = jTl3.getText();
        String l4 = jTl4.getText();
        String l5 = jTl5.getText();
        String l6 = jTl6.getText();
        String l7 = jTl7.getText();
        String l8 = jTl8.getText();
        palavraCerta2 = l1 + l2 + l3 + l4 + l5 + l6 + l7 + l8;


    }
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jTletra = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLletrasDitas = new javax.swing.JLabel();
        jBconfirmaPalavra = new javax.swing.JButton();
        jLerros = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        jLTamanho = new javax.swing.JLabel();
        jBescolhePalavra = new javax.swing.JButton();
        jLlugarLetra = new javax.swing.JLabel();
        jTl1 = new javax.swing.JTextField();
        jTl2 = new javax.swing.JTextField();
        jTl3 = new javax.swing.JTextField();
        jTl4 = new javax.swing.JTextField();
        jTl5 = new javax.swing.JTextField();
        jLpalavraCerta = new javax.swing.JLabel();
        jLpalavraCerta2 = new javax.swing.JLabel();
        jPanel4 = new javax.swing.JPanel();
        jLvitorias = new javax.swing.JLabel();
        jLderrotas = new javax.swing.JLabel();
        jComboBox1 = new javax.swing.JComboBox();
        jButton2 = new javax.swing.JButton();
        jTl6 = new javax.swing.JTextField();
        jTl7 = new javax.swing.JTextField();
        jTl8 = new javax.swing.JTextField();
        jPanel3 = new javax.swing.JPanel();
        jLErrou = new javax.swing.JLabel();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();
        jMenuItem2 = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Jogo Da Forca");

        jPanel1.setBackground(new java.awt.Color(153, 153, 255));
        jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        jTletra.setBackground(new java.awt.Color(204, 0, 204));
        jTletra.setFont(new java.awt.Font("Tahoma", 0, 26));
        jTletra.setDisabledTextColor(new java.awt.Color(153, 153, 0));
        jTletra.setFocusCycleRoot(true);
        jTletra.setFocusTraversalPolicyProvider(true);
        jTletra.setSelectionColor(new java.awt.Color(153, 0, 255));
        jTletra.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                jTletraFocusGained(evt);
            }
        });
        jTletra.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jTletraKeyPressed(evt);
            }
        });

        jLabel1.setFont(new java.awt.Font("Tahoma", 0, 14));
        jLabel1.setText("Digite uma letra:");

        jLabel2.setFont(new java.awt.Font("Tahoma", 0, 14));
        jLabel2.setText("Voce disse as seguintes letras ate agora:");

        jLletrasDitas.setFont(new java.awt.Font("Tahoma", 0, 18));
        jLletrasDitas.setForeground(new java.awt.Color(255, 0, 0));
        jLletrasDitas.setText("_____nenhuma letra dita por enquanto_____");

        jBconfirmaPalavra.setFont(new java.awt.Font("Tahoma", 0, 14));
        jBconfirmaPalavra.setMnemonic(KeyEvent.VK_Z);
        jBconfirmaPalavra.setText("confirma");
        jBconfirmaPalavra.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBconfirmaPalavraActionPerformed(evt);
            }
        });
        jBconfirmaPalavra.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jBconfirmaPalavraKeyPressed(evt);
            }
        });

        jLerros.setFont(new java.awt.Font("Tahoma", 0, 14));
        jLerros.setText("Voce ainda nao errou e pode errar  20 vezes.");

        jLabel3.setText("A palavra era: ");

        org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel1Layout.createSequentialGroup()
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel1Layout.createSequentialGroup()
                        .add(29, 29, 29)
                        .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                            .add(jLerros)
                            .add(jPanel1Layout.createSequentialGroup()
                                .add(jLabel1)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                                .add(jTletra, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 46, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .add(18, 18, 18)
                                .add(jBconfirmaPalavra, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 106, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                        .add(50, 50, 50)
                        .add(jLletrasDitas))
                    .add(jPanel1Layout.createSequentialGroup()
                        .addContainerGap()
                        .add(jLabel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 272, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(127, 127, 127)
                        .add(jLabel2)))
                .addContainerGap(129, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(jLabel3)
                    .add(jLabel2))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel1Layout.createSequentialGroup()
                        .add(7, 7, 7)
                        .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(jLabel1)
                            .add(jTletra, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 37, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                    .add(jPanel1Layout.createSequentialGroup()
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(jBconfirmaPalavra, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 42, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(jLletrasDitas))))
                .add(30, 30, 30)
                .add(jLerros)
                .addContainerGap(45, Short.MAX_VALUE))
        );

        jPanel2.setBackground(new java.awt.Color(153, 153, 255));
        jPanel2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel2.setEnabled(false);

        jLTamanho.setFont(new java.awt.Font("Tahoma", 0, 14));
        jLTamanho.setText("Mostra quantidade de letras da palavra");

        jBescolhePalavra.setFont(new java.awt.Font("Tahoma", 0, 14));
        jBescolhePalavra.setText("FORCA");
        jBescolhePalavra.setEnabled(false);
        jBescolhePalavra.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBescolhePalavraActionPerformed(evt);
            }
        });

        jLlugarLetra.setFont(new java.awt.Font("Tahoma", 0, 14));
        jLlugarLetra.setText("Esta letra esta em _-_  lugar na palavra");

        jTl1.setBackground(new java.awt.Color(204, 0, 204));
        jTl1.setEditable(false);
        jTl1.setFont(new java.awt.Font("Tahoma", 0, 26));

        jTl2.setBackground(new java.awt.Color(204, 0, 204));
        jTl2.setEditable(false);
        jTl2.setFont(new java.awt.Font("Tahoma", 0, 26));

        jTl3.setBackground(new java.awt.Color(204, 0, 204));
        jTl3.setEditable(false);
        jTl3.setFont(new java.awt.Font("Tahoma", 0, 26));

        jTl4.setBackground(new java.awt.Color(204, 0, 204));
        jTl4.setEditable(false);
        jTl4.setFont(new java.awt.Font("Tahoma", 0, 26));

        jTl5.setBackground(new java.awt.Color(204, 0, 204));
        jTl5.setEditable(false);
        jTl5.setFont(new java.awt.Font("Tahoma", 0, 26));

        jLpalavraCerta2.setFont(new java.awt.Font("Tahoma", 0, 14));
        jLpalavraCerta2.setText("Sera que vc acerta a palavra?");

        jLvitorias.setFont(new java.awt.Font("Tahoma", 1, 13));
        jLvitorias.setText("Vitorias: 0   ");

        jLderrotas.setFont(new java.awt.Font("Tahoma", 1, 13));
        jLderrotas.setText("Derrotas: 0");

        org.jdesktop.layout.GroupLayout jPanel4Layout = new org.jdesktop.layout.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(jLvitorias)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jLderrotas))
                .addContainerGap(15, Short.MAX_VALUE))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .add(jLvitorias, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jLderrotas)
                .add(51, 51, 51))
        );

        jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "animais", "objetos", "musica", "aleatorias" }));
        jComboBox1.setSelectedIndex(3);
        jComboBox1.setSelectedItem(aleatorias);

        jButton2.setText("Seleciona Categoria");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        jTl6.setBackground(new java.awt.Color(204, 0, 204));
        jTl6.setEditable(false);
        jTl6.setFont(new java.awt.Font("Tahoma", 0, 26));

        jTl7.setBackground(new java.awt.Color(204, 0, 204));
        jTl7.setEditable(false);
        jTl7.setFont(new java.awt.Font("Tahoma", 0, 26));

        jTl8.setBackground(new java.awt.Color(204, 0, 204));
        jTl8.setEditable(false);
        jTl8.setFont(new java.awt.Font("Tahoma", 0, 26));

        org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel2Layout.createSequentialGroup()
                        .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(jLpalavraCerta2)
                            .add(jPanel2Layout.createSequentialGroup()
                                .add(jTl1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 54, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                .add(jTl2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 27, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                .add(jTl3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 28, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                .add(jTl4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 27, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                .add(jTl5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                .add(jTl6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                .add(jTl7, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                .add(jTl8, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 212, Short.MAX_VALUE)
                        .add(jPanel4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(48, 48, 48)
                        .add(jLpalavraCerta))
                    .add(jPanel2Layout.createSequentialGroup()
                        .add(jBescolhePalavra)
                        .add(18, 18, 18)
                        .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(jPanel2Layout.createSequentialGroup()
                                .add(jLTamanho)
                                .add(126, 126, 126)
                                .add(jComboBox1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 98, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                .add(18, 18, 18)
                                .add(jButton2))
                            .add(jLlugarLetra))
                        .add(125, 125, 125))))
        );

        jPanel2Layout.linkSize(new java.awt.Component[] {jTl1, jTl2, jTl3, jTl4, jTl5, jTl6, jTl7, jTl8}, org.jdesktop.layout.GroupLayout.HORIZONTAL);

        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel2Layout.createSequentialGroup()
                .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel2Layout.createSequentialGroup()
                        .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(jPanel2Layout.createSequentialGroup()
                                .add(54, 54, 54)
                                .add(jLpalavraCerta))
                            .add(jPanel2Layout.createSequentialGroup()
                                .add(37, 37, 37)
                                .add(jLpalavraCerta2)
                                .add(84, 84, 84)
                                .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                                    .add(jBescolhePalavra)
                                    .add(jLlugarLetra)))
                            .add(jPanel2Layout.createSequentialGroup()
                                .add(72, 72, 72)
                                .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE, false)
                                    .add(jTl2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                    .add(jTl3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                    .add(jTl4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                    .add(jTl5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                    .add(jTl1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 39, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                    .add(jTl6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                    .add(jTl7, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                    .add(jTl8, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                        .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(jLTamanho)
                            .add(jComboBox1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .add(jButton2)))
                    .add(jPanel2Layout.createSequentialGroup()
                        .addContainerGap()
                        .add(jPanel4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(34, Short.MAX_VALUE))
        );

        jPanel2Layout.linkSize(new java.awt.Component[] {jTl1, jTl2, jTl3, jTl4, jTl5, jTl6, jTl7, jTl8}, org.jdesktop.layout.GroupLayout.VERTICAL);

        jLErrou.setText("-");

        org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .add(jLErrou)
                .addContainerGap(206, Short.MAX_VALUE))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel3Layout.createSequentialGroup()
                .add(jLErrou)
                .addContainerGap(376, Short.MAX_VALUE))
        );

        jMenu1.setText("Ajuda");
        jMenu1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenu1ActionPerformed(evt);
            }
        });

        jMenuItem1.setText("Instrucoes basicas");
        jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem1ActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItem1);

        jMenuItem2.setText("Sair do Jogo");
        jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem2ActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItem2);

        jMenuBar1.add(jMenu1);

        setJMenuBar(jMenuBar1);

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(jPanel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jPanel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(layout.createSequentialGroup()
                        .add(7, 7, 7)
                        .add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                        .add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>
    private void jBconfirmaPalavraActionPerformed(java.awt.event.ActionEvent evt) {

        if (inicia == true) {
       principal();
        }

    }

    private void jBconfirmaPalavraKeyPressed(java.awt.event.KeyEvent evt) {
    //jBconfirmaPalavra=KeyStroke.getKeyStroke(KeyEvent.VK_S,InputEvent.CTRL_MASK,false);
    }

    private void jTletraKeyPressed(java.awt.event.KeyEvent evt) {
        // TODO add your handling code here:


        if (evt.getKeyCode() == 10) {

            //JOptionPane.showMessageDialog(null, "ENTER!", "Letra ja dita", JOptionPane.INFORMATION_MESSAGE);
            if (inicia == true) {
       principal();
        }

        }
    }

    public void keyReleased(KeyEvent e) {
    }

    public void keyTyped(KeyEvent e) {


    }

    private void jTletraFocusGained(java.awt.event.FocusEvent evt) {
    // TODO add your handling code here:
    }

    private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {
        Ajuda adCli = new Ajuda();
        adCli.setVisible(true);
        adCli.setLocationRelativeTo(null);

    }

    private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {
        System.exit(0);

    }

    private void jMenu1ActionPerformed(java.awt.event.ActionEvent evt) {
    // TODO add your handling code here:
    }

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {



        int item = jComboBox1.getSelectedIndex();
        System.out.println("combo:" + item);

        if (item == 0) {
            System.out.println("item1=animais");
            animais = true;

             aleatorias = false;
            objetos = false;
            musica = false;

        }
        if (item == 1) {
            objetos = true;
             aleatorias = false;

            musica = false;
             animais = false;
        }
        if (item == 2) {
            musica = true;
             aleatorias = false;
            objetos = false;
            animais = false;
        }
        if (item == 3) {
            aleatorias = true;
           objetos = false;
            musica = false;
             animais = false;
        }

  Object[] options3 = {"Sim", "Não"};
        int confirmar3 = JOptionPane.showOptionDialog(null, "Escolher nova palavra desta categoria", "Nova categoria", JOptionPane.DEFAULT_OPTION, JOptionPane.YES_OPTION, null, options3, options3[0]);
        if (confirmar3 == 0) {
            zeraModel();
     escolhePalavra(); //so difere do recomeco, porque nao pergunta se quer jogar de novo...
            //e  recomeço agora envolve o escolhe palavra separadamente por isto.
        principal();
        }

    }

    private void jBescolhePalavraActionPerformed(java.awt.event.ActionEvent evt) {
        //para a primeira vez
        //ve se botao 4 e 5 estao funcionando
    }

    public static void main(String args[]) {

        //esolher palavra automatico
        //escolhe palavra automaticamente...





        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new Forca_1().setVisible(true);

            }
        });
    }
    // Variables declaration - do not modify
    private javax.swing.JButton jBconfirmaPalavra;
    private javax.swing.JButton jBescolhePalavra;
    private javax.swing.JButton jButton2;
    private javax.swing.JComboBox jComboBox1;
    private javax.swing.JLabel jLErrou;
    private javax.swing.JLabel jLTamanho;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLderrotas;
    private javax.swing.JLabel jLerros;
    private javax.swing.JLabel jLletrasDitas;
    private javax.swing.JLabel jLlugarLetra;
    private javax.swing.JLabel jLpalavraCerta;
    private javax.swing.JLabel jLpalavraCerta2;
    private javax.swing.JLabel jLvitorias;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem2;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JTextField jTl1;
    private javax.swing.JTextField jTl2;
    private javax.swing.JTextField jTl3;
    private javax.swing.JTextField jTl4;
    private javax.swing.JTextField jTl5;
    private javax.swing.JTextField jTl6;
    private javax.swing.JTextField jTl7;
    private javax.swing.JTextField jTl8;
    private javax.swing.JTextField jTletra;
    // End of variables declaration
}
//palavra que ja foi, esta repetindo...
//mais palavras...

o memória eu consigo fazer funcionar se ponho a imagem, no diretório C:

mas no forca consegui por diretamente no programa e eles tem a mesma estrutura.

por isso não entendo porque um programa enxerga o caminho e o outro não… os nomes estão certos e os arquivos estão lá…

alguém é craque neste erro?

não duplique tópicos.
continue a discussão aqui: http://www.guj.com.br/java/260073-exception-in-thread-main-javalangnullpointerexception
tópico trancado