Jogo da MEMÓRIA

1 resposta
G
Boa Noite!! Estou precisando fazer um jogo da memória por enquanto sem randomizar as peças por enquanto como faço pra aparecer no botão mesmo a peça escondida... de uma olhada no meu código
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;

public class memo extends JFrame implements ActionListener, MouseListener, KeyListener, 
    TextListener, FocusListener, MouseMotionListener

{
JLabel L1;
JButton B1,B2,B3,B4,B5,B6,B7,B8;

public static void main(String args[])
		{
		 JFrame Janela =  new exemplo0908();
		 Janela.show();
		 WindowListener x = new WindowAdapter()
		 {
		   public void windowClosing(WindowEvent e)
			{
				System.exit(0);
			}
		  };
		 Janela.addWindowListener(x);
		}
		
	memo()
	
	{
				setTitle("Jogo da Mamória");
	        setSize(400,170);
		getContentPane().setBackground(new Color(190,190,190));
		L1 = new JLabel("Pontuação:");
		L1.setForeground(Color.blue);
		B1= new JButton("???");	    B1.addActionListener(this);
		B2= new JButton("???");	    B2.addActionListener(this);
		B3= new JButton("???");	    B3.addActionListener(this);
		B4= new JButton("???");	    B4.addActionListener(this);
		B5= new JButton("???");	    B5.addActionListener(this);
		B6= new JButton("???");	    B6.addActionListener(this);
		B7= new JButton("???");	    B7.addActionListener(this);
		B8= new JButton("???");	    B8.addActionListener(this);
		
		getContentPane().setLayout(new GridLayout(5,2));
		getContentPane().add(L1);
		getContentPane().add(B1);
		getContentPane().add(B2);
		getContentPane().add(B3);
		getContentPane().add(B4);
		getContentPane().add(B5);
		getContentPane().add(B6);
		getContentPane().add(B7);
		getContentPane().add(B8);

			public void actionPerformed(ActionEvent e)
			{
			L1.
			}

1 Resposta

Eder_Peixoto

public void setIcon( Icon defaultIcon )

Criado 10 de junho de 2010
Ultima resposta 11 de jun. de 2010
Respostas 1
Participantes 2