/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Frames;

import javax.swing.JOptionPane;

/**
 *
 * @author Leidy y Daniela
 */
public class Ventana extends javax.swing.JFrame {

    private boolean estado;
    private int turnos;
    private int contar;
    private String nombre;

    /**
     * Creates new form Ventana
     */
    public Ventana() {
        initComponents();

    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        candado = new javax.swing.JLabel();
        camisa = new javax.swing.JLabel();
        cama = new javax.swing.JLabel();
        burbuja = new javax.swing.JLabel();
        jButton6 = new javax.swing.JButton();
        jButton5 = new javax.swing.JButton();
        jButton4 = new javax.swing.JButton();
        jButton3 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        jButton1 = new javax.swing.JButton();
        pecera = new javax.swing.JLabel();
        monopoly = new javax.swing.JLabel();
        florero = new javax.swing.JLabel();
        mono = new javax.swing.JLabel();
        manzana = new javax.swing.JLabel();
        llaves = new javax.swing.JLabel();
        libro = new javax.swing.JLabel();
        lampara = new javax.swing.JLabel();
        hueso = new javax.swing.JLabel();
        encendedor = new javax.swing.JLabel();
        terraquio = new javax.swing.JLabel();
        globo = new javax.swing.JLabel();
        espejo = new javax.swing.JLabel();
        escalera = new javax.swing.JLabel();
        alfombra = new javax.swing.JLabel();
        fosforo = new javax.swing.JLabel();
        gato = new javax.swing.JLabel();
        cuadro = new javax.swing.JLabel();
        avion = new javax.swing.JLabel();
        estambre = new javax.swing.JLabel();
        cuchara = new javax.swing.JLabel();
        percheo = new javax.swing.JLabel();
        perro = new javax.swing.JLabel();
        plato = new javax.swing.JLabel();
        periodico = new javax.swing.JLabel();
        puerta = new javax.swing.JLabel();
        tijera = new javax.swing.JLabel();
        mesa = new javax.swing.JLabel();
        equipo = new javax.swing.JLabel();
        tabrete = new javax.swing.JLabel();
        estrella = new javax.swing.JLabel();
        zapato = new javax.swing.JLabel();
        pajaro = new javax.swing.JLabel();
        reloj = new javax.swing.JLabel();
        carro = new javax.swing.JLabel();
        carta = new javax.swing.JLabel();
        casa = new javax.swing.JLabel();
        celular = new javax.swing.JLabel();
        cereal = new javax.swing.JLabel();
        colgate = new javax.swing.JLabel();
        escoba = new javax.swing.JLabel();
        flores = new javax.swing.JLabel();
        gancho = new javax.swing.JLabel();
        jabon = new javax.swing.JLabel();
        lavadora = new javax.swing.JLabel();
        lavamanos = new javax.swing.JLabel();
        navidad = new javax.swing.JLabel();
        licuadora = new javax.swing.JLabel();
        oso = new javax.swing.JLabel();
        pantalon = new javax.swing.JLabel();
        pila = new javax.swing.JLabel();
        portatil = new javax.swing.JLabel();
        televisor = new javax.swing.JLabel();
        toalla = new javax.swing.JLabel();
        namepun = new javax.swing.JLabel();
        puntaje = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setAutoRequestFocus(false);
        setBackground(new java.awt.Color(51, 51, 255));
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowOpened(java.awt.event.WindowEvent evt) {
                formWindowOpened(evt);
            }
        });
        getContentPane().setLayout(null);

        candado.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/candado.png"))); // NOI18N
        candado.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                candadoMouseClicked(evt);
            }
        });
        getContentPane().add(candado);
        candado.setBounds(790, 150, 40, 40);

        camisa.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/camisa.png"))); // NOI18N
        getContentPane().add(camisa);
        camisa.setBounds(250, 120, 60, 60);

        cama.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/cama.png"))); // NOI18N
        getContentPane().add(cama);
        cama.setBounds(220, 530, 130, 80);

        burbuja.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/burbujas.png"))); // NOI18N
        getContentPane().add(burbuja);
        burbuja.setBounds(20, 210, 90, 90);

        jButton6.setBackground(new java.awt.Color(0, 204, 0));
        jButton6.setText("Iniciar Juego");
        jButton6.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton6MouseClicked(evt);
            }
        });
        getContentPane().add(jButton6);
        jButton6.setBounds(350, 330, 240, 60);

        jButton5.setBackground(new java.awt.Color(204, 204, 0));
        jButton5.setText("jButton5");
        jButton5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton5ActionPerformed(evt);
            }
        });
        getContentPane().add(jButton5);
        jButton5.setBounds(725, 613, 150, 40);

        jButton4.setBackground(new java.awt.Color(204, 204, 0));
        jButton4.setText("jButton4");
        jButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton4ActionPerformed(evt);
            }
        });
        getContentPane().add(jButton4);
        jButton4.setBounds(555, 613, 150, 40);

        jButton3.setBackground(new java.awt.Color(204, 204, 0));
        jButton3.setText("jButton3");
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });
        getContentPane().add(jButton3);
        jButton3.setBounds(375, 613, 160, 40);

        jButton2.setBackground(new java.awt.Color(204, 204, 0));
        jButton2.setText("jButton2");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });
        getContentPane().add(jButton2);
        jButton2.setBounds(195, 613, 160, 40);

        jButton1.setBackground(new java.awt.Color(204, 204, 0));
        jButton1.setText("jButton1");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });
        getContentPane().add(jButton1);
        jButton1.setBounds(10, 613, 160, 40);

        pecera.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/pecera.png"))); // NOI18N
        pecera.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                peceraMouseClicked(evt);
            }
        });
        getContentPane().add(pecera);
        pecera.setBounds(60, 310, 70, 70);

        monopoly.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/monopoli.png"))); // NOI18N
        getContentPane().add(monopoly);
        monopoly.setBounds(550, 220, 100, 90);

        florero.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/florero.png"))); // NOI18N
        getContentPane().add(florero);
        florero.setBounds(390, 320, 40, 80);

        mono.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/mono.png"))); // NOI18N
        getContentPane().add(mono);
        mono.setBounds(750, 220, 50, 60);

        manzana.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/manzana.png"))); // NOI18N
        getContentPane().add(manzana);
        manzana.setBounds(440, 360, 30, 40);

        llaves.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/llaves.png"))); // NOI18N
        getContentPane().add(llaves);
        llaves.setBounds(600, 480, 34, 40);

        libro.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/libros.png"))); // NOI18N
        getContentPane().add(libro);
        libro.setBounds(50, 390, 80, 80);

        lampara.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/lampara.png"))); // NOI18N
        getContentPane().add(lampara);
        lampara.setBounds(230, 390, 90, 100);

        hueso.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/hueso.png"))); // NOI18N
        getContentPane().add(hueso);
        hueso.setBounds(80, 530, 100, 40);

        encendedor.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/encendedor.png"))); // NOI18N
        getContentPane().add(encendedor);
        encendedor.setBounds(830, 380, 50, 50);

        terraquio.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/tierra.png"))); // NOI18N
        getContentPane().add(terraquio);
        terraquio.setBounds(780, 490, 80, 120);

        globo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/globo.png"))); // NOI18N
        getContentPane().add(globo);
        globo.setBounds(140, 40, 120, 162);

        espejo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/espejo.png"))); // NOI18N
        getContentPane().add(espejo);
        espejo.setBounds(180, 220, 50, 80);

        escalera.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/escalas.png"))); // NOI18N
        escalera.setVerticalTextPosition(javax.swing.SwingConstants.TOP);
        getContentPane().add(escalera);
        escalera.setBounds(730, 310, 90, 140);

        alfombra.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/tapete.png"))); // NOI18N
        getContentPane().add(alfombra);
        alfombra.setBounds(720, 420, 120, 60);

        fosforo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/cigarros.png"))); // NOI18N
        getContentPane().add(fosforo);
        fosforo.setBounds(390, 390, 50, 38);

        gato.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/gatico.png"))); // NOI18N
        gato.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                gatoMouseClicked(evt);
            }
        });
        getContentPane().add(gato);
        gato.setBounds(640, 470, 110, 90);

        cuadro.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/cuadro.png"))); // NOI18N
        getContentPane().add(cuadro);
        cuadro.setBounds(740, 60, 120, 80);

        avion.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/avion.png"))); // NOI18N
        getContentPane().add(avion);
        avion.setBounds(30, 110, 90, 70);

        estambre.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/bola.png"))); // NOI18N
        getContentPane().add(estambre);
        estambre.setBounds(630, 540, 90, 60);

        cuchara.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/cuchara.png"))); // NOI18N
        getContentPane().add(cuchara);
        cuchara.setBounds(450, 360, 50, 40);

        percheo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/perchero.png"))); // NOI18N
        getContentPane().add(percheo);
        percheo.setBounds(710, 320, 30, 130);

        perro.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/perro.png"))); // NOI18N
        getContentPane().add(perro);
        perro.setBounds(10, 510, 70, 60);

        plato.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/plato.png"))); // NOI18N
        getContentPane().add(plato);
        plato.setBounds(430, 380, 50, 30);

        periodico.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/periodico.png"))); // NOI18N
        getContentPane().add(periodico);
        periodico.setBounds(60, 360, 60, 50);

        puerta.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/puerta.png"))); // NOI18N
        getContentPane().add(puerta);
        puerta.setBounds(740, 210, 80, 130);

        tijera.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/tijeras.png"))); // NOI18N
        tijera.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tijeraMouseClicked(evt);
            }
        });
        getContentPane().add(tijera);
        tijera.setBounds(580, 560, 40, 40);

        mesa.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/mesita.png"))); // NOI18N
        getContentPane().add(mesa);
        mesa.setBounds(340, 370, 220, 160);

        equipo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/equipo.png"))); // NOI18N
        getContentPane().add(equipo);
        equipo.setBounds(570, 340, 80, 70);

        tabrete.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/mesanoche.png"))); // NOI18N
        tabrete.setText("jLabel18");
        getContentPane().add(tabrete);
        tabrete.setBounds(570, 390, 80, 110);

        estrella.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/estrellas.png"))); // NOI18N
        getContentPane().add(estrella);
        estrella.setBounds(280, 10, 120, 100);

        zapato.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/zapatos.png"))); // NOI18N
        getContentPane().add(zapato);
        zapato.setBounds(120, 480, 60, 40);

        pajaro.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/paisaje.jpg"))); // NOI18N
        getContentPane().add(pajaro);
        pajaro.setBounds(380, 80, 170, 230);

        reloj.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/reloj.png"))); // NOI18N
        getContentPane().add(reloj);
        reloj.setBounds(10, 10, 80, 70);

        carro.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/carro.png"))); // NOI18N
        getContentPane().add(carro);
        carro.setBounds(760, 10, 50, 40);

        carta.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/cartas.png"))); // NOI18N
        carta.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                cartaMouseClicked(evt);
            }
        });
        getContentPane().add(carta);
        carta.setBounds(640, 430, 80, 60);

        casa.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/casa.png"))); // NOI18N
        getContentPane().add(casa);
        casa.setBounds(460, 0, 60, 67);

        celular.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/celular.png"))); // NOI18N
        getContentPane().add(celular);
        celular.setBounds(280, 490, 51, 50);

        cereal.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/cereal.png"))); // NOI18N
        getContentPane().add(cereal);
        cereal.setBounds(190, 480, 67, 80);

        colgate.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/colgate.png"))); // NOI18N
        getContentPane().add(colgate);
        colgate.setBounds(20, 470, 40, 40);

        escoba.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/escoba.png"))); // NOI18N
        getContentPane().add(escoba);
        escoba.setBounds(730, 500, 49, 80);

        flores.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/flores.png"))); // NOI18N
        getContentPane().add(flores);
        flores.setBounds(280, 280, 57, 70);

        gancho.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/gancho.png"))); // NOI18N
        getContentPane().add(gancho);
        gancho.setBounds(270, 200, 79, 40);

        jabon.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/jabon.png"))); // NOI18N
        jabon.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jabonMouseClicked(evt);
            }
        });
        getContentPane().add(jabon);
        jabon.setBounds(830, 560, 50, 40);

        lavadora.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/lavadora.png"))); // NOI18N
        lavadora.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                lavadoraMouseClicked(evt);
            }
        });
        getContentPane().add(lavadora);
        lavadora.setBounds(140, 420, 85, 60);

        lavamanos.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/lavamanos.png"))); // NOI18N
        getContentPane().add(lavamanos);
        lavamanos.setBounds(170, 310, 78, 70);

        navidad.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/navidad.png"))); // NOI18N
        getContentPane().add(navidad);
        navidad.setBounds(620, 0, 50, 60);

        licuadora.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/licuadora.png"))); // NOI18N
        getContentPane().add(licuadora);
        licuadora.setBounds(380, 530, 60, 70);

        oso.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/oso.png"))); // NOI18N
        oso.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                osoMouseClicked(evt);
            }
        });
        getContentPane().add(oso);
        oso.setBounds(590, 120, 70, 80);

        pantalon.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/pantalon.png"))); // NOI18N
        pantalon.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                pantalonMouseClicked(evt);
            }
        });
        getContentPane().add(pantalon);
        pantalon.setBounds(820, 260, 50, 50);

        pila.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/pila.png"))); // NOI18N
        pila.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                pilaMouseClicked(evt);
            }
        });
        getContentPane().add(pila);
        pila.setBounds(320, 540, 50, 40);

        portatil.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/portatil.png"))); // NOI18N
        getContentPane().add(portatil);
        portatil.setBounds(460, 520, 99, 70);

        televisor.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/televisor.png"))); // NOI18N
        getContentPane().add(televisor);
        televisor.setBounds(830, 460, 49, 40);

        toalla.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/tohalla.png"))); // NOI18N
        getContentPane().add(toalla);
        toalla.setBounds(120, 270, 44, 40);

        namepun.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        namepun.setForeground(new java.awt.Color(0, 0, 204));
        namepun.setText("Puntaje:");
        getContentPane().add(namepun);
        namepun.setBounds(90, 20, 90, 22);
        getContentPane().add(puntaje);
        puntaje.setBounds(160, 3, 130, 40);

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Ventana/ventana.png"))); // NOI18N
        getContentPane().add(jLabel1);
        jLabel1.setBounds(0, 0, 890, 670);

        setBounds(0, 0, 896, 697);
    }// </editor-fold>//GEN-END:initComponents

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed

    }//GEN-LAST:event_jButton1ActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed


    }//GEN-LAST:event_jButton2ActionPerformed

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed


    }//GEN-LAST:event_jButton3ActionPerformed

    private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed

    }//GEN-LAST:event_jButton4ActionPerformed

    private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed

    }//GEN-LAST:event_jButton5ActionPerformed

    private void formWindowOpened(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowOpened
        estado = false;
        Inicio();
    }//GEN-LAST:event_formWindowOpened

    private void jButton6MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton6MouseClicked
        estado = true;
        Inicio();
        jButton6.setVisible(false);
        jButton1.setText("Pecera");
        jButton2.setText("Cartas");
        jButton3.setText("Tijeras");
        jButton4.setText("Oso");
        jButton5.setText("Candado");
        turnos=0;
    }//GEN-LAST:event_jButton6MouseClicked

    private void peceraMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_peceraMouseClicked
        if (jButton1.getText().equals("Pecera") || jButton2.getText().equals("Pecera") || jButton3.getText().equals("Pecera") || jButton4.getText().equals("Pecera") || jButton5.getText().equals("Pecera")) {
            this.pecera.setVisible(false);
            this.nombre = "Pecera";
            this.CleanBoton();
            contar += 10;
           puntaje.setText("puntos: "+contar);
        }
    }//GEN-LAST:event_peceraMouseClicked

    private void cartaMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_cartaMouseClicked
        if (jButton1.getText().equals("Cartas") || jButton2.getText().equals("Cartas") || jButton3.getText().equals("Cartas") || jButton4.getText().equals("Cartas") || jButton5.getText().equals("Cartas")) {
            carta.setVisible(false);
            nombre = "Cartas";
            CleanBoton();
            contar += 10;
            puntaje.setText("puntos: "+contar);
        }
    }//GEN-LAST:event_cartaMouseClicked

    private void tijeraMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tijeraMouseClicked
        if (jButton1.getText().equals("Tijeras") || jButton2.getText().equals("Tijeras") || jButton3.getText().equals("Tijeras") || jButton4.getText().equals("Tijeras") || jButton5.getText().equals("Tijeras")) {
            tijera.setVisible(false);
            nombre = "Tijeras";
            CleanBoton();
            contar += 10;
            puntaje.setText("puntos: "+contar);
        }
    }//GEN-LAST:event_tijeraMouseClicked

    private void candadoMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_candadoMouseClicked
        if (jButton1.getText().equals("Candado") || jButton2.getText().equals("Candado") || jButton3.getText().equals("Candado") || jButton4.getText().equals("Candado") || jButton5.getText().equals("Candado")) {
            candado.setVisible(false);
            nombre = "Candado";
            CleanBoton();
            contar += 10;
            puntaje.setText("puntos: "+contar);
        }
    }//GEN-LAST:event_candadoMouseClicked

    private void osoMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_osoMouseClicked
        if (jButton1.getText().equals("Oso") || jButton2.getText().equals("Oso") || jButton3.getText().equals("Oso") || jButton4.getText().equals("Oso") || jButton5.getText().equals("Oso")) {
            oso.setVisible(false);
            nombre = "Oso";
            CleanBoton();
            contar += 10;
            puntaje.setText("puntos: "+contar);
        }
    }//GEN-LAST:event_osoMouseClicked

    private void pilaMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_pilaMouseClicked
        if (jButton1.getText().equals("Pila") || jButton2.getText().equals("Pila") || jButton3.getText().equals("Pila") || jButton4.getText().equals("Pila") || jButton5.getText().equals("Pila")) {
            pila.setVisible(false);
            nombre = "Pila";
            CleanBoton();
            jButton1.setText(" ");
            
            contar += 10;
            puntaje.setText("puntos: "+contar);
             Mensaje();
        }
    }//GEN-LAST:event_pilaMouseClicked

    private void gatoMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_gatoMouseClicked
        if (jButton1.getText().equals("Gato") || jButton2.getText().equals("Gato") || jButton3.getText().equals("Gato") || jButton4.getText().equals("Gato") || jButton5.getText().equals("Gato")) {
            gato.setVisible(false);
            nombre = "Gato";
            CleanBoton();
            jButton2.setText(" ");
          
            contar += 10;
            puntaje.setText("puntos: "+contar);
             Mensaje();
        }
    }//GEN-LAST:event_gatoMouseClicked

    private void pantalonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_pantalonMouseClicked
        if (jButton1.getText().equals("Pantalon") || jButton2.getText().equals("Pantalon") || jButton3.getText().equals("Pantalon") || jButton4.getText().equals("Pantalon") || jButton5.getText().equals("Pantalon")) {
            pantalon.setVisible(false);
            nombre = "Pantalon";
            CleanBoton();
            jButton3.setText(" ");
      
            contar += 10;
            puntaje.setText("puntos: "+contar);
             Mensaje();
        }
    }//GEN-LAST:event_pantalonMouseClicked

    private void lavadoraMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lavadoraMouseClicked
        if (jButton1.getText().equals("Lavadora") || jButton2.getText().equals("Lavadora") || jButton3.getText().equals("Lavadora") || jButton4.getText().equals("Lavadora") || jButton5.getText().equals("Lavadora")) {
            lavadora.setVisible(false);
            nombre = "Lavadora";
            CleanBoton();
            jButton4.setText(" ");
        
            contar += 10;
            puntaje.setText("puntos: "+contar);
             Mensaje();
        }
    }//GEN-LAST:event_lavadoraMouseClicked

    private void jabonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jabonMouseClicked
        if (jButton1.getText().equals("Jabon") || jButton2.getText().equals("Jabon") || jButton3.getText().equals("Jabon") || jButton4.getText().equals("Jabon") || jButton5.getText().equals("Jabon")) {
            jabon.setVisible(false);
            nombre = "Jabon";
            CleanBoton();
            jButton5.setText(" ");
      
            contar += 10;
            puntaje.setText("puntos: "+contar);
             Mensaje();
        }
    }//GEN-LAST:event_jabonMouseClicked

    private void Inicio() {
        reloj.setVisible(estado);
        globo.setVisible(estado);
        pajaro.setVisible(estado);
        avion.setVisible(estado);
        estrella.setVisible(estado);
        cuadro.setVisible(estado);
        espejo.setVisible(estado);
        mono.setVisible(estado);
        puerta.setVisible(estado);
        encendedor.setVisible(estado);
        escalera.setVisible(estado);
        percheo.setVisible(estado);
        alfombra.setVisible(estado);
        terraquio.setVisible(estado);
        estambre.setVisible(estado);
        gato.setVisible(estado);
        perro.setVisible(estado);
        hueso.setVisible(estado);
        llaves.setVisible(estado);
        tijera.setVisible(estado);
        libro.setVisible(estado);
        periodico.setVisible(estado);
        pecera.setVisible(estado);
        cuchara.setVisible(estado);
        manzana.setVisible(estado);
        mesa.setVisible(estado);
        tabrete.setVisible(estado);
        plato.setVisible(estado);
        florero.setVisible(estado);
        lampara.setVisible(estado);
        fosforo.setVisible(estado);
        monopoly.setVisible(estado);
        equipo.setVisible(estado);
        burbuja.setVisible(estado);
        camisa.setVisible(estado);
        cama.setVisible(estado);
        candado.setVisible(estado);
        carro.setVisible(estado);
        carta.setVisible(estado);
        casa.setVisible(estado);
        celular.setVisible(estado);
        cereal.setVisible(estado);
        colgate.setVisible(estado);
        escoba.setVisible(estado);
        flores.setVisible(estado);
        jabon.setVisible(estado);
        gancho.setVisible(estado);
        lavamanos.setVisible(estado);
        lavadora.setVisible(estado);
        perro.setVisible(estado);
        licuadora.setVisible(estado);
        navidad.setVisible(estado);
        oso.setVisible(estado);
        pantalon.setVisible(estado);
        pila.setVisible(estado);
        portatil.setVisible(estado);
        televisor.setVisible(estado);
        toalla.setVisible(estado);
        zapato.setVisible(estado);
        namepun.setVisible(estado);
        puntaje.setVisible(estado);
        jButton1.setVisible(estado);
        jButton2.setVisible(estado);
        jButton3.setVisible(estado);
        jButton4.setVisible(estado);
        jButton5.setVisible(estado);
    }

    
   public void Mensaje(){
    if (jButton1.getText().equals(" ") && jButton2.getText().equals(" ") && jButton3.getText().equals(" ") && jButton4.getText().equals(" ") && jButton5.getText().equals(" ")) {
    JOptionPane.showMessageDialog(null, "Ganaste el Nivel 3", "Ganaste",  JOptionPane.INFORMATION_MESSAGE);
    JOptionPane.showMessageDialog(null, "Continua con el Nivel 4", "Continuar",  JOptionPane.INFORMATION_MESSAGE);
    Bosque bos= new Bosque();
       bos.setVisible(true);
       bos.setLocationRelativeTo(null);
       this.dispose();
    }
   }
    
    public void CleanBoton() {
        if (jButton1.getText().equals(nombre)) {
            jButton1.setText("Pila");
        } else if (jButton2.getText().equals(nombre)) {
            jButton2.setText("Gato");
        } else if (jButton3.getText().equals(nombre)) {
            jButton3.setText("Pantalon");
        } else if (jButton4.getText().equals(nombre)) {
            jButton4.setText("Lavadora");
        } else if (jButton5.getText().equals(nombre)) {
            jButton5.setText("Jabon");
        }
    }

    //eqipo,hueso, tijeras, tapete monopoly

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Ventana.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Ventana.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Ventana.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Ventana.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new Ventana().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel alfombra;
    private javax.swing.JLabel avion;
    private javax.swing.JLabel burbuja;
    private javax.swing.JLabel cama;
    private javax.swing.JLabel camisa;
    private javax.swing.JLabel candado;
    private javax.swing.JLabel carro;
    private javax.swing.JLabel carta;
    private javax.swing.JLabel casa;
    private javax.swing.JLabel celular;
    private javax.swing.JLabel cereal;
    private javax.swing.JLabel colgate;
    private javax.swing.JLabel cuadro;
    private javax.swing.JLabel cuchara;
    private javax.swing.JLabel encendedor;
    private javax.swing.JLabel equipo;
    private javax.swing.JLabel escalera;
    private javax.swing.JLabel escoba;
    private javax.swing.JLabel espejo;
    private javax.swing.JLabel estambre;
    private javax.swing.JLabel estrella;
    private javax.swing.JLabel florero;
    private javax.swing.JLabel flores;
    private javax.swing.JLabel fosforo;
    private javax.swing.JLabel gancho;
    private javax.swing.JLabel gato;
    private javax.swing.JLabel globo;
    private javax.swing.JLabel hueso;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JButton jButton5;
    private javax.swing.JButton jButton6;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jabon;
    private javax.swing.JLabel lampara;
    private javax.swing.JLabel lavadora;
    private javax.swing.JLabel lavamanos;
    private javax.swing.JLabel libro;
    private javax.swing.JLabel licuadora;
    private javax.swing.JLabel llaves;
    private javax.swing.JLabel manzana;
    private javax.swing.JLabel mesa;
    private javax.swing.JLabel mono;
    private javax.swing.JLabel monopoly;
    private javax.swing.JLabel namepun;
    private javax.swing.JLabel navidad;
    private javax.swing.JLabel oso;
    private javax.swing.JLabel pajaro;
    private javax.swing.JLabel pantalon;
    private javax.swing.JLabel pecera;
    private javax.swing.JLabel percheo;
    private javax.swing.JLabel periodico;
    private javax.swing.JLabel perro;
    private javax.swing.JLabel pila;
    private javax.swing.JLabel plato;
    private javax.swing.JLabel portatil;
    private javax.swing.JLabel puerta;
    private javax.swing.JButton puntaje;
    private javax.swing.JLabel reloj;
    private javax.swing.JLabel tabrete;
    private javax.swing.JLabel televisor;
    private javax.swing.JLabel terraquio;
    private javax.swing.JLabel tijera;
    private javax.swing.JLabel toalla;
    private javax.swing.JLabel zapato;
    // End of variables declaration//GEN-END:variables
}
