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");