mastermind.main.java Source code

Java tutorial

Introduction

Here is the source code for mastermind.main.java

Source

/*
 * 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 mastermind;

import java.util.Calendar;
import java.util.Random;
import javax.swing.ImageIcon;
import javax.swing.JOptionPane;
import static javax.swing.JOptionPane.INFORMATION_MESSAGE;
import org.apache.commons.lang3.time.StopWatch;

/**
 *
 * @author Manuel
 */
public class main extends javax.swing.JFrame {

    final ImageIcon ROJO = new ImageIcon("src/Imagenes/rojo.png");
    final ImageIcon AZUL = new ImageIcon("src/Imagenes/azul.png");
    final ImageIcon VERDE = new ImageIcon("src/Imagenes/verde.png");
    final ImageIcon AMARILLO = new ImageIcon("src/Imagenes/amarillo.png");
    final ImageIcon GRIS = new ImageIcon("src/Imagenes/gris.png");
    final ImageIcon NARANJA = new ImageIcon("src/Imagenes/naranja.png");
    final ImageIcon DEFAULT = new ImageIcon("src/Imagenes/default.png");
    final int NIVELMUYFACIL = 1000;
    final int NIVELFACIL = 5000;
    final int NIVELMEDIO = 10000;
    final int NIVELDIFICIL = 50000;
    final int NIVELMUYDIFICIL = 100000;
    int simbolo = 2;
    int posicion = 0;
    int intento = 0;
    char caracteraux;
    String combinacion = "";
    StopWatch tiempo = new StopWatch();
    String combinacionsecreta = "";
    int aciertopos = 0;
    int acierto = 0;
    boolean hasacertado = false;

    /**
     * Creates new form main
     */
    public main() {
        initComponents();
        setIconImage(new ImageIcon(getClass().getResource("../Imagenes/icono.png")).getImage());
        this.setResizable(false);
        this.setEnabled(false);
        jDialog1.setVisible(true);
        jDialog1.setFocusableWindowState(false);
        jButtonrojo.setEnabled(false);
        jButtonazul.setEnabled(false);
        jButtonverde.setEnabled(false);
        jButtonamarillo.setEnabled(false);
        jButtonnaranja.setEnabled(false);
        jButtongris.setEnabled(false);
        jToggleButtoncomenzarparar.setEnabled(false);
        jCheckBoxrepeticion.setEnabled(false);
        jButtoncomprobar.setEnabled(false);
        jButtonretroceder.setEnabled(false);
        jButtonpausa.setEnabled(false);

    }

    /**
     * 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() {

        jDialog1 = new javax.swing.JDialog();
        jComboBoxnivel = new javax.swing.JComboBox();
        jCheckBoxrepeticion = new javax.swing.JCheckBox();
        jButtonaceptarnivel = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();
        jInternalFrameacercade = new javax.swing.JInternalFrame();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTextArea1 = new javax.swing.JTextArea();
        jDialog2 = new javax.swing.JDialog();
        jPanel9 = new javax.swing.JPanel();
        jLabel11clavesecreta = new javax.swing.JLabel();
        jLabel12clavesecreta = new javax.swing.JLabel();
        jLabel14clavesecreta = new javax.swing.JLabel();
        jLabel13clavesecreta = new javax.swing.JLabel();
        jButton1 = new javax.swing.JButton();
        jPanel3 = new javax.swing.JPanel();
        jButtonrojo = new javax.swing.JButton();
        jButtonazul = new javax.swing.JButton();
        jButtonverde = new javax.swing.JButton();
        jButtonamarillo = new javax.swing.JButton();
        jButtongris = new javax.swing.JButton();
        jButtonnaranja = new javax.swing.JButton();
        jPanel8 = new javax.swing.JPanel();
        jFormattedTextFieldtiempo = new javax.swing.JFormattedTextField();
        jButtonpausa = new javax.swing.JButton();
        jFormattedTextFieldpuntuacion = new javax.swing.JFormattedTextField();
        jToggleButtoncomenzarparar = new javax.swing.JToggleButton();
        jLabel38 = new javax.swing.JLabel();
        jLabel39 = new javax.swing.JLabel();
        jPanel10 = new javax.swing.JPanel();
        jButtoncomprobar = new javax.swing.JButton();
        jButtonretroceder = new javax.swing.JButton();
        jScrollPaneintentos = new javax.swing.JScrollPane();
        jPanel1 = new javax.swing.JPanel();
        jPanel2 = new javax.swing.JPanel();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jPanel4 = new javax.swing.JPanel();
        jLabel21 = new javax.swing.JLabel();
        jLabel22 = new javax.swing.JLabel();
        jLabel24 = new javax.swing.JLabel();
        jLabel23 = new javax.swing.JLabel();
        jPanel5 = new javax.swing.JPanel();
        jLabel31 = new javax.swing.JLabel();
        jLabel32 = new javax.swing.JLabel();
        jLabel34 = new javax.swing.JLabel();
        jLabel33 = new javax.swing.JLabel();
        jPanel6 = new javax.swing.JPanel();
        jLabel41 = new javax.swing.JLabel();
        jLabel42 = new javax.swing.JLabel();
        jLabel44 = new javax.swing.JLabel();
        jLabel43 = new javax.swing.JLabel();
        jPanel7 = new javax.swing.JPanel();
        jLabel51 = new javax.swing.JLabel();
        jLabel52 = new javax.swing.JLabel();
        jLabel54 = new javax.swing.JLabel();
        jLabel53 = new javax.swing.JLabel();
        jPanel11 = new javax.swing.JPanel();
        jLabel61 = new javax.swing.JLabel();
        jLabel62 = new javax.swing.JLabel();
        jLabel64 = new javax.swing.JLabel();
        jLabel63 = new javax.swing.JLabel();
        jPanel12 = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        jTextFieldresultadoAP1 = new javax.swing.JTextField();
        jTextFieldresultadoA1 = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jPanel13 = new javax.swing.JPanel();
        jLabel5 = new javax.swing.JLabel();
        jTextFieldresultadoAP2 = new javax.swing.JTextField();
        jTextFieldresultadoA2 = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jPanel16 = new javax.swing.JPanel();
        jLabel18 = new javax.swing.JLabel();
        jTextFieldresultadoAP3 = new javax.swing.JTextField();
        jTextFieldresultadoA3 = new javax.swing.JTextField();
        jLabel19 = new javax.swing.JLabel();
        jLabel20 = new javax.swing.JLabel();
        jPanel17 = new javax.swing.JPanel();
        jLabel25 = new javax.swing.JLabel();
        jTextFieldresultadoAP4 = new javax.swing.JTextField();
        jTextFieldresultadoA4 = new javax.swing.JTextField();
        jLabel26 = new javax.swing.JLabel();
        jLabel27 = new javax.swing.JLabel();
        jPanel18 = new javax.swing.JPanel();
        jLabel28 = new javax.swing.JLabel();
        jTextFieldresultadoAP5 = new javax.swing.JTextField();
        jTextFieldresultadoA5 = new javax.swing.JTextField();
        jLabel29 = new javax.swing.JLabel();
        jLabel30 = new javax.swing.JLabel();
        jPanel19 = new javax.swing.JPanel();
        jLabel35 = new javax.swing.JLabel();
        jTextFieldresultadoAP6 = new javax.swing.JTextField();
        jTextFieldresultadoA6 = new javax.swing.JTextField();
        jLabel36 = new javax.swing.JLabel();
        jLabel37 = new javax.swing.JLabel();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenujugar = new javax.swing.JMenu();
        jMenuItemjugar = new javax.swing.JMenuItem();
        jMenuItemsalir = new javax.swing.JMenuItem();
        jMenu2 = new javax.swing.JMenu();
        jMenuItempreferencias = new javax.swing.JMenuItem();
        jMenuacercade = new javax.swing.JMenu();
        jMenuItemclavesecreta = new javax.swing.JMenuItem();
        jMenu1 = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();

        jDialog1.setTitle("Nivel");
        jDialog1.setAlwaysOnTop(true);
        jDialog1.setMinimumSize(new java.awt.Dimension(214, 214));
        jDialog1.setResizable(false);

        jComboBoxnivel.setModel(new javax.swing.DefaultComboBoxModel(
                new String[] { "Muy Fcil", "Facil", "Medio", "Difcil", "Muy Difcil" }));
        jComboBoxnivel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jComboBoxnivelActionPerformed(evt);
            }
        });

        jCheckBoxrepeticion.setText("Sin repeticion");

        jButtonaceptarnivel.setText("Aceptar");
        jButtonaceptarnivel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonaceptarnivelActionPerformed(evt);
            }
        });

        jLabel1.setText("Seleciona Nivel:");

        javax.swing.GroupLayout jDialog1Layout = new javax.swing.GroupLayout(jDialog1.getContentPane());
        jDialog1.getContentPane().setLayout(jDialog1Layout);
        jDialog1Layout.setHorizontalGroup(jDialog1Layout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jDialog1Layout.createSequentialGroup().addContainerGap()
                        .addGroup(jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel1).addComponent(jCheckBoxrepeticion)
                                .addComponent(jComboBoxnivel, javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                        jDialog1Layout.createSequentialGroup().addContainerGap(73, Short.MAX_VALUE)
                                .addComponent(jButtonaceptarnivel).addGap(70, 70, 70)));
        jDialog1Layout.setVerticalGroup(jDialog1Layout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jDialog1Layout.createSequentialGroup().addContainerGap().addComponent(jLabel1)
                        .addGap(12, 12, 12)
                        .addComponent(jComboBoxnivel, javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(13, 13, 13).addComponent(jCheckBoxrepeticion)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 12, Short.MAX_VALUE)
                        .addComponent(jButtonaceptarnivel).addContainerGap()));

        jInternalFrameacercade.setVisible(true);

        jTextArea1.setColumns(20);
        jTextArea1.setRows(5);
        jScrollPane1.setViewportView(jTextArea1);

        javax.swing.GroupLayout jInternalFrameacercadeLayout = new javax.swing.GroupLayout(
                jInternalFrameacercade.getContentPane());
        jInternalFrameacercade.getContentPane().setLayout(jInternalFrameacercadeLayout);
        jInternalFrameacercadeLayout.setHorizontalGroup(jInternalFrameacercadeLayout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jInternalFrameacercadeLayout.createSequentialGroup().addContainerGap()
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 294, Short.MAX_VALUE)
                        .addContainerGap()));
        jInternalFrameacercadeLayout.setVerticalGroup(jInternalFrameacercadeLayout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jInternalFrameacercadeLayout.createSequentialGroup().addContainerGap()
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 275, Short.MAX_VALUE)
                        .addGap(46, 46, 46)));

        jDialog2.setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        jDialog2.setTitle("Clave Secreta");
        jDialog2.setAlwaysOnTop(true);
        jDialog2.setMinimumSize(new java.awt.Dimension(450, 250));
        jDialog2.setPreferredSize(new java.awt.Dimension(450, 250));
        jDialog2.setResizable(false);

        jPanel9.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout
                .setHorizontalGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel9Layout.createSequentialGroup().addContainerGap()
                                .addComponent(jLabel11clavesecreta, javax.swing.GroupLayout.PREFERRED_SIZE, 73,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jLabel12clavesecreta, javax.swing.GroupLayout.PREFERRED_SIZE, 71,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jLabel13clavesecreta, javax.swing.GroupLayout.PREFERRED_SIZE, 71,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jLabel14clavesecreta, javax.swing.GroupLayout.DEFAULT_SIZE, 75,
                                        Short.MAX_VALUE)
                                .addContainerGap()));
        jPanel9Layout.setVerticalGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel9Layout.createSequentialGroup().addContainerGap()
                        .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel12clavesecreta, javax.swing.GroupLayout.DEFAULT_SIZE, 75,
                                        Short.MAX_VALUE)
                                .addComponent(jLabel11clavesecreta, javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel14clavesecreta, javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel13clavesecreta, javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addContainerGap()));

        jButton1.setText("Aceptar");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jDialog2Layout = new javax.swing.GroupLayout(jDialog2.getContentPane());
        jDialog2.getContentPane().setLayout(jDialog2Layout);
        jDialog2Layout.setHorizontalGroup(jDialog2Layout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jDialog2Layout.createSequentialGroup().addGroup(jDialog2Layout
                        .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jDialog2Layout.createSequentialGroup().addContainerGap().addComponent(jPanel9,
                                javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(jDialog2Layout.createSequentialGroup().addGap(156, 156, 156)
                                .addComponent(jButton1)))
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
        jDialog2Layout.setVerticalGroup(jDialog2Layout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jDialog2Layout.createSequentialGroup().addGap(37, 37, 37)
                        .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18).addComponent(jButton1)
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Mastermind");
        setMinimumSize(null);
        setResizable(false);
        addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            public void mouseMoved(java.awt.event.MouseEvent evt) {
                formMouseMoved(evt);
            }
        });

        jPanel3.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        jButtonrojo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/rojo.png"))); // NOI18N
        jButtonrojo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonrojoActionPerformed(evt);
            }
        });

        jButtonazul.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/azul.png"))); // NOI18N
        jButtonazul.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonazulActionPerformed(evt);
            }
        });

        jButtonverde.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/verde.png"))); // NOI18N
        jButtonverde.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonverdeActionPerformed(evt);
            }
        });

        jButtonamarillo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/amarillo.png"))); // NOI18N
        jButtonamarillo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonamarilloActionPerformed(evt);
            }
        });

        jButtongris.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/gris.png"))); // NOI18N
        jButtongris.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtongrisActionPerformed(evt);
            }
        });

        jButtonnaranja.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/naranja.png"))); // NOI18N
        jButtonnaranja.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonnaranjaActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(jPanel3Layout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel3Layout.createSequentialGroup().addContainerGap()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel3Layout.createSequentialGroup()
                                        .addComponent(jButtonrojo, javax.swing.GroupLayout.PREFERRED_SIZE, 54,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jButtonazul, javax.swing.GroupLayout.PREFERRED_SIZE, 54,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jButtonverde, javax.swing.GroupLayout.PREFERRED_SIZE, 54,
                                                javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGroup(jPanel3Layout.createSequentialGroup()
                                        .addComponent(jButtonamarillo, javax.swing.GroupLayout.PREFERRED_SIZE, 54,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jButtonnaranja, javax.swing.GroupLayout.PREFERRED_SIZE, 54,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jButtongris, javax.swing.GroupLayout.PREFERRED_SIZE, 54,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
        jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel3Layout.createSequentialGroup().addContainerGap()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jButtonrojo, javax.swing.GroupLayout.PREFERRED_SIZE, 53,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jButtonazul, javax.swing.GroupLayout.PREFERRED_SIZE, 53,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jButtonverde, javax.swing.GroupLayout.PREFERRED_SIZE, 53,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(jButtonamarillo, javax.swing.GroupLayout.PREFERRED_SIZE, 53,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jButtongris, javax.swing.GroupLayout.PREFERRED_SIZE, 53,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jButtonnaranja, javax.swing.GroupLayout.PREFERRED_SIZE, 53,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

        jPanel8.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        jFormattedTextFieldtiempo.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(
                new javax.swing.text.DateFormatter(new java.text.SimpleDateFormat("mm:ss"))));
        jFormattedTextFieldtiempo.setHorizontalAlignment(javax.swing.JTextField.RIGHT);

        jButtonpausa.setText("Pausa");
        jButtonpausa.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonpausaActionPerformed(evt);
            }
        });

        jFormattedTextFieldpuntuacion.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(
                new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#0"))));
        jFormattedTextFieldpuntuacion.setHorizontalAlignment(javax.swing.JTextField.RIGHT);

        jToggleButtoncomenzarparar.setText("Comenzar");
        jToggleButtoncomenzarparar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jToggleButtoncomenzarpararActionPerformed(evt);
            }
        });

        jLabel38.setText("Tiempo:");

        jLabel39.setText("Puntuacin:");

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(jPanel8Layout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel8Layout.createSequentialGroup().addGroup(jPanel8Layout
                        .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(jPanel8Layout.createSequentialGroup()
                                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addGroup(jPanel8Layout
                                        .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout
                                                .createSequentialGroup().addComponent(jLabel38)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                                .addComponent(jFormattedTextFieldtiempo,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE, 85,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout
                                                .createSequentialGroup().addComponent(jLabel39)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                                .addComponent(jFormattedTextFieldpuntuacion,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE, 85,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE))))
                        .addGroup(jPanel8Layout.createSequentialGroup().addGap(0, 10, Short.MAX_VALUE)
                                .addComponent(jToggleButtoncomenzarparar, javax.swing.GroupLayout.PREFERRED_SIZE,
                                        81, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18).addComponent(jButtonpausa,
                                        javax.swing.GroupLayout.PREFERRED_SIZE, 85,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addContainerGap()));
        jPanel8Layout
                .setVerticalGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel8Layout.createSequentialGroup().addContainerGap()
                                .addGroup(jPanel8Layout
                                        .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                        .addComponent(jButtonpausa, javax.swing.GroupLayout.DEFAULT_SIZE, 52,
                                                Short.MAX_VALUE)
                                        .addComponent(
                                                jToggleButtoncomenzarparar, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                .addGap(11, 11, 11)
                                .addGroup(jPanel8Layout
                                        .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                        .addComponent(jFormattedTextFieldtiempo,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(jLabel38))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanel8Layout
                                        .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                        .addComponent(jFormattedTextFieldpuntuacion,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(jLabel39))
                                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

        jPanel10.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        jButtoncomprobar.setText("Comprobar");
        jButtoncomprobar.setToolTipText("Comprobar");
        jButtoncomprobar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtoncomprobarActionPerformed(evt);
            }
        });

        jButtonretroceder.setText("Retroceder");
        jButtonretroceder.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonretrocederActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(jPanel10Layout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel10Layout.createSequentialGroup().addContainerGap()
                        .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jButtoncomprobar, javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jButtonretroceder, javax.swing.GroupLayout.DEFAULT_SIZE, 104,
                                        Short.MAX_VALUE))
                        .addContainerGap()));
        jPanel10Layout
                .setVerticalGroup(
                        jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel10Layout.createSequentialGroup().addContainerGap()
                                        .addComponent(jButtoncomprobar, javax.swing.GroupLayout.PREFERRED_SIZE, 54,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jButtonretroceder, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addContainerGap()));

        jScrollPaneintentos
                .setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
        jScrollPaneintentos.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
        jScrollPaneintentos.setAutoscrolls(true);

        jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jPanel1.setCursor(new java.awt.Cursor(java.awt.Cursor.S_RESIZE_CURSOR));
        jPanel1.setOpaque(false);

        jPanel2.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(jPanel2Layout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel2Layout.createSequentialGroup().addContainerGap()
                        .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 50,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 50,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 59, Short.MAX_VALUE)
                        .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 50,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, 50,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap()));
        jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel2Layout.createSequentialGroup().addContainerGap()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel12, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)
                                .addComponent(jLabel11, javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel14, javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel13, javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addContainerGap()));

        jPanel4.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout
                .setHorizontalGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel4Layout.createSequentialGroup().addContainerGap()
                                .addComponent(jLabel21, javax.swing.GroupLayout.PREFERRED_SIZE, 50,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jLabel22, javax.swing.GroupLayout.PREFERRED_SIZE, 50,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel23, javax.swing.GroupLayout.PREFERRED_SIZE, 50,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jLabel24, javax.swing.GroupLayout.PREFERRED_SIZE, 50,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addContainerGap()));
        jPanel4Layout.setVerticalGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel4Layout.createSequentialGroup().addContainerGap()
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel22, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)
                                .addComponent(jLabel21, javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel24, javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel23, javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addContainerGap()));

        jPanel5.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout
                .setHorizontalGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel5Layout.createSequentialGroup().addContainerGap()
                                .addComponent(jLabel31, javax.swing.GroupLayout.PREFERRED_SIZE, 50,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jLabel32, javax.swing.GroupLayout.PREFERRED_SIZE, 50,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel33, javax.swing.GroupLayout.PREFERRED_SIZE, 50,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jLabel34, javax.swing.GroupLayout.PREFERRED_SIZE, 50,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addContainerGap()));
        jPanel5Layout.setVerticalGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel5Layout.createSequentialGroup().addContainerGap()
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel32, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)
                                .addComponent(jLabel31, javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel34, javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel33, javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addContainerGap()));

        jPanel6.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout
                .setHorizontalGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel6Layout.createSequentialGroup().addContainerGap()
                                .addComponent(jLabel41, javax.swing.GroupLayout.PREFERRED_SIZE, 50,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jLabel42, javax.swing.GroupLayout.PREFERRED_SIZE, 50,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel43, javax.swing.GroupLayout.PREFERRED_SIZE, 50,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jLabel44, javax.swing.GroupLayout.PREFERRED_SIZE, 50,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addContainerGap()));
        jPanel6Layout.setVerticalGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel6Layout.createSequentialGroup().addContainerGap()
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel42, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)
                                .addComponent(jLabel41, javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel44, javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel43, javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addContainerGap()));

        jPanel7.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout
                .setHorizontalGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel7Layout.createSequentialGroup().addContainerGap()
                                .addComponent(jLabel51, javax.swing.GroupLayout.PREFERRED_SIZE, 50,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jLabel52, javax.swing.GroupLayout.PREFERRED_SIZE, 50,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel53, javax.swing.GroupLayout.PREFERRED_SIZE, 50,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jLabel54, javax.swing.GroupLayout.PREFERRED_SIZE, 50,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addContainerGap()));
        jPanel7Layout.setVerticalGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel7Layout.createSequentialGroup().addContainerGap()
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel52, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)
                                .addComponent(jLabel51, javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel54, javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel53, javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addContainerGap()));

        jPanel11.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
        jPanel11.setLayout(jPanel11Layout);
        jPanel11Layout
                .setHorizontalGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel11Layout.createSequentialGroup().addContainerGap()
                                .addComponent(jLabel61, javax.swing.GroupLayout.PREFERRED_SIZE, 50,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jLabel62, javax.swing.GroupLayout.PREFERRED_SIZE, 50,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel63, javax.swing.GroupLayout.PREFERRED_SIZE, 50,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jLabel64, javax.swing.GroupLayout.PREFERRED_SIZE, 50,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addContainerGap()));
        jPanel11Layout.setVerticalGroup(jPanel11Layout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel11Layout.createSequentialGroup().addContainerGap()
                        .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel62, javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel61, javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel64, javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel63, javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addContainerGap()));

        jPanel12.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jLabel2.setText("Intento 1:");

        jTextFieldresultadoAP1.setEditable(false);

        jTextFieldresultadoA1.setEditable(false);

        jLabel3.setText("Acierto/Posicin");

        jLabel4.setText("Aciertos");

        javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);
        jPanel12.setLayout(jPanel12Layout);
        jPanel12Layout.setHorizontalGroup(jPanel12Layout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel12Layout.createSequentialGroup().addGap(21, 21, 21).addComponent(jLabel2)
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel12Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel3).addComponent(jLabel4))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(
                                jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                        .addComponent(jTextFieldresultadoAP1, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                22, Short.MAX_VALUE)
                                        .addComponent(jTextFieldresultadoA1))
                        .addContainerGap()));
        jPanel12Layout.setVerticalGroup(jPanel12Layout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel12Layout.createSequentialGroup().addComponent(jLabel2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jTextFieldresultadoAP1, javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel3))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jTextFieldresultadoA1, javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel4))
                        .addGap(0, 0, Short.MAX_VALUE)));

        jPanel13.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jLabel5.setText("Intento 2:");

        jTextFieldresultadoAP2.setEditable(false);

        jTextFieldresultadoA2.setEditable(false);

        jLabel6.setText("Acierto/Posicin");

        jLabel7.setText("Acierto");

        javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13);
        jPanel13.setLayout(jPanel13Layout);
        jPanel13Layout.setHorizontalGroup(jPanel13Layout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel13Layout.createSequentialGroup().addGap(21, 21, 21).addComponent(jLabel5)
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel13Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel6).addComponent(jLabel7))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(
                                jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                        .addComponent(jTextFieldresultadoAP2, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                22, Short.MAX_VALUE)
                                        .addComponent(jTextFieldresultadoA2))
                        .addContainerGap()));
        jPanel13Layout.setVerticalGroup(jPanel13Layout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel13Layout.createSequentialGroup().addComponent(jLabel5)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jTextFieldresultadoAP2, javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel6))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jTextFieldresultadoA2, javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel7))
                        .addGap(0, 0, Short.MAX_VALUE)));

        jPanel16.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jLabel18.setText("Intento 3:");

        jTextFieldresultadoAP3.setEditable(false);

        jTextFieldresultadoA3.setEditable(false);

        jLabel19.setText("Acierto/Posicin");

        jLabel20.setText("Acierto");

        javax.swing.GroupLayout jPanel16Layout = new javax.swing.GroupLayout(jPanel16);
        jPanel16.setLayout(jPanel16Layout);
        jPanel16Layout.setHorizontalGroup(jPanel16Layout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel16Layout.createSequentialGroup().addGap(21, 21, 21).addComponent(jLabel18)
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel16Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel19).addComponent(jLabel20))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(
                                jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                        .addComponent(jTextFieldresultadoAP3, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                22, Short.MAX_VALUE)
                                        .addComponent(jTextFieldresultadoA3))
                        .addContainerGap()));
        jPanel16Layout.setVerticalGroup(jPanel16Layout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel16Layout.createSequentialGroup().addComponent(jLabel18)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jTextFieldresultadoAP3, javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel19))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jTextFieldresultadoA3, javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel20))
                        .addGap(0, 0, Short.MAX_VALUE)));

        jPanel17.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jLabel25.setText("Intento 4:");

        jTextFieldresultadoAP4.setEditable(false);

        jTextFieldresultadoA4.setEditable(false);

        jLabel26.setText("Acierto/Posicin");

        jLabel27.setText("Acierto");

        javax.swing.GroupLayout jPanel17Layout = new javax.swing.GroupLayout(jPanel17);
        jPanel17.setLayout(jPanel17Layout);
        jPanel17Layout.setHorizontalGroup(jPanel17Layout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel17Layout.createSequentialGroup().addGap(21, 21, 21).addComponent(jLabel25)
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel17Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel26).addComponent(jLabel27))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(
                                jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                        .addComponent(jTextFieldresultadoAP4, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                22, Short.MAX_VALUE)
                                        .addComponent(jTextFieldresultadoA4))
                        .addContainerGap()));
        jPanel17Layout.setVerticalGroup(jPanel17Layout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel17Layout.createSequentialGroup().addComponent(jLabel25)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jTextFieldresultadoAP4, javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel26))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jTextFieldresultadoA4, javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel27))
                        .addGap(0, 0, Short.MAX_VALUE)));

        jPanel18.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jLabel28.setText("Intento 5:");

        jTextFieldresultadoAP5.setEditable(false);

        jTextFieldresultadoA5.setEditable(false);

        jLabel29.setText("Acierto/Posicin");

        jLabel30.setText("Acierto");

        javax.swing.GroupLayout jPanel18Layout = new javax.swing.GroupLayout(jPanel18);
        jPanel18.setLayout(jPanel18Layout);
        jPanel18Layout.setHorizontalGroup(jPanel18Layout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel18Layout.createSequentialGroup().addGap(21, 21, 21).addComponent(jLabel28)
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel18Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel29).addComponent(jLabel30))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 63, Short.MAX_VALUE)
                        .addGroup(
                                jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                        .addComponent(jTextFieldresultadoAP5, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                22, Short.MAX_VALUE)
                                        .addComponent(jTextFieldresultadoA5))
                        .addContainerGap()));
        jPanel18Layout.setVerticalGroup(jPanel18Layout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel18Layout.createSequentialGroup().addComponent(jLabel28)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jTextFieldresultadoAP5, javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel29))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jTextFieldresultadoA5, javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel30))
                        .addGap(0, 0, Short.MAX_VALUE)));

        jPanel19.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jLabel35.setText("Intento 6:");

        jTextFieldresultadoAP6.setEditable(false);

        jTextFieldresultadoA6.setEditable(false);

        jLabel36.setText("Acierto/Posicin");

        jLabel37.setText("Acierto");

        javax.swing.GroupLayout jPanel19Layout = new javax.swing.GroupLayout(jPanel19);
        jPanel19.setLayout(jPanel19Layout);
        jPanel19Layout.setHorizontalGroup(jPanel19Layout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel19Layout.createSequentialGroup().addGap(21, 21, 21).addComponent(jLabel35)
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel19Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel36).addComponent(jLabel37))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(
                                jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                        .addComponent(jTextFieldresultadoAP6, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                22, Short.MAX_VALUE)
                                        .addComponent(jTextFieldresultadoA6))
                        .addContainerGap()));
        jPanel19Layout.setVerticalGroup(jPanel19Layout
                .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel19Layout.createSequentialGroup().addComponent(jLabel35)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jTextFieldresultadoAP6, javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel36))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jTextFieldresultadoA6, javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel37))
                        .addGap(0, 16, Short.MAX_VALUE)));

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout
                .setHorizontalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap()
                                .addGroup(jPanel1Layout
                                        .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                        .addComponent(jPanel18, javax.swing.GroupLayout.Alignment.LEADING,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(jPanel17, javax.swing.GroupLayout.Alignment.LEADING,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(jPanel16, javax.swing.GroupLayout.Alignment.LEADING,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(jPanel13, javax.swing.GroupLayout.Alignment.LEADING,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(jPanel19, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(jPanel12, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 91,
                                        Short.MAX_VALUE)
                                .addGroup(jPanel1Layout
                                        .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                        .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(jPanel11, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                .addContainerGap()));
        jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addGap(26, 26, 26)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jPanel19, javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jPanel11, javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(
                                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                        .addComponent(jPanel18, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(
                                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                        .addComponent(jPanel17, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(
                                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                        .addComponent(jPanel16, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(
                                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                        .addComponent(jPanel13, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(
                                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                        .addComponent(jPanel12, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addContainerGap()));

        jScrollPaneintentos.setViewportView(jPanel1);

        jMenujugar.setText("Juego");

        jMenuItemjugar.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_P,
                java.awt.event.InputEvent.CTRL_MASK));
        jMenuItemjugar.setText("Reiniciar");
        jMenuItemjugar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemjugarActionPerformed(evt);
            }
        });
        jMenujugar.add(jMenuItemjugar);

        jMenuItemsalir.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F4,
                java.awt.event.InputEvent.ALT_MASK));
        jMenuItemsalir.setText("Salir");
        jMenuItemsalir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemsalirActionPerformed(evt);
            }
        });
        jMenujugar.add(jMenuItemsalir);

        jMenuBar1.add(jMenujugar);

        jMenu2.setText("Herramientas");
        jMenu2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenu2ActionPerformed(evt);
            }
        });

        jMenuItempreferencias.setText("Preferencias");
        jMenuItempreferencias.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItempreferenciasActionPerformed(evt);
            }
        });
        jMenu2.add(jMenuItempreferencias);

        jMenuBar1.add(jMenu2);

        jMenuacercade.setText("Acerca de");

        jMenuItemclavesecreta.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C,
                java.awt.event.InputEvent.CTRL_MASK));
        jMenuItemclavesecreta.setText("Clave Secreta");
        jMenuItemclavesecreta.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemclavesecretaActionPerformed(evt);
            }
        });
        jMenuacercade.add(jMenuItemclavesecreta);

        jMenuBar1.add(jMenuacercade);

        jMenu1.setText("  ?  ");

        jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F1, 0));
        jMenuItem1.setText("Ayuda");
        jMenu1.add(jMenuItem1);

        jMenuBar1.add(jMenu1);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup().addContainerGap()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(jScrollPaneintentos)
                                .addGroup(layout.createSequentialGroup()
                                        .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                                javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(16, 16, 16)));
        layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup().addContainerGap()
                        .addComponent(
                                jScrollPaneintentos, javax.swing.GroupLayout.DEFAULT_SIZE, 527, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addComponent(jPanel10, javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jPanel3, javax.swing.GroupLayout.Alignment.LEADING,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                                        Short.MAX_VALUE)
                                .addComponent(jPanel8, javax.swing.GroupLayout.Alignment.LEADING,
                                        javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                                        Short.MAX_VALUE))
                        .addGap(13, 13, 13)));

        pack();
    }// </editor-fold>//GEN-END:initComponents

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

        if (tiempo.isStarted() && combinacion.length() < 4) {
            combinacion += 'r';
            posicion++;
            jButtonretroceder.setEnabled(true);
            if (intento == 1 && !combinacion.isEmpty()) {
                for (int i = 0; i < combinacion.length(); i++) {
                    if (posicion == 1) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel11.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel11.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel11.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel11.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel11.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel11.setIcon(GRIS);
                        }
                    }
                    if (posicion == 2) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel12.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel12.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel12.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel12.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel12.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel12.setIcon(GRIS);
                        }
                    }
                    if (posicion == 3) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel13.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel13.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel13.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel13.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel13.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel13.setIcon(GRIS);
                        }
                    }
                    if ((char) posicion == 4) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel14.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel14.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel14.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel14.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel14.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel14.setIcon(GRIS);
                        }
                        jButtoncomprobar.setEnabled(true);
                    }
                }
            }
            if (intento == 2) {
                for (int i = 0; i < combinacion.length(); i++) {
                    if (posicion == 1) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel21.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel21.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel21.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel21.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel21.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel21.setIcon(GRIS);
                        }
                    }
                    if (posicion == 2) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel22.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel22.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel22.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel22.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel22.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel22.setIcon(GRIS);
                        }
                    }
                    if (posicion == 3) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel23.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel23.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel23.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel23.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel23.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel23.setIcon(GRIS);
                        }
                    }
                    if (posicion == 4) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel24.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel24.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel24.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel24.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel24.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel24.setIcon(GRIS);
                        }
                        jButtoncomprobar.setEnabled(true);
                    }
                }
            }
            if (intento == 3) {
                for (int i = 0; i < combinacion.length(); i++) {
                    if (posicion == 1) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel31.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel31.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel31.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel31.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel31.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel31.setIcon(GRIS);
                        }
                    }
                    if (posicion == 2) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel32.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel32.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel32.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel32.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel32.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel32.setIcon(GRIS);
                        }
                    }
                    if (posicion == 3) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel33.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel33.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel33.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel33.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel33.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel33.setIcon(GRIS);
                        }
                    }
                    if (posicion == 4) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel34.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel34.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel34.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel34.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel34.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel34.setIcon(GRIS);
                        }
                        jButtoncomprobar.setEnabled(true);
                    }
                }
            }
            if (intento == 4) {
                for (int i = 0; i < combinacion.length(); i++) {
                    if (posicion == 1) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel41.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel41.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel41.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel41.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel41.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel41.setIcon(GRIS);
                        }
                    }
                    if (posicion == 2) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel42.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel42.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel42.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel42.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel42.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel42.setIcon(GRIS);
                        }
                    }
                    if (posicion == 3) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel43.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel43.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel43.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel43.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel43.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel43.setIcon(GRIS);
                        }
                    }
                    if (posicion == 4) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel44.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel44.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel44.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel44.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel44.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel44.setIcon(GRIS);
                        }
                        jButtoncomprobar.setEnabled(true);
                    }
                }
            }
            if (intento == 5) {
                for (int i = 0; i < combinacion.length(); i++) {
                    if (posicion == 1) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel51.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel51.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel51.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel51.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel51.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel51.setIcon(GRIS);
                        }
                    }
                    if (posicion == 2) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel52.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel52.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel52.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel52.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel52.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel52.setIcon(GRIS);
                        }
                    }
                    if (posicion == 3) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel53.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel53.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel53.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel53.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel53.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel53.setIcon(GRIS);
                        }
                    }
                    if (posicion == 4) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel54.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel54.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel54.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel54.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel54.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel54.setIcon(GRIS);
                        }
                        jButtoncomprobar.setEnabled(true);
                    }
                }
            }
            if (intento == 6) {
                for (int i = 0; i < combinacion.length(); i++) {
                    if (posicion == 1) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel61.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel61.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel61.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel61.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel61.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel61.setIcon(GRIS);
                        }
                    }
                    if (posicion == 2) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel62.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel62.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel62.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel62.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel62.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel62.setIcon(GRIS);
                        }
                    }
                    if (posicion == 3) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel63.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel63.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel63.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel63.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel63.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel63.setIcon(GRIS);
                        }
                    }
                    if (posicion == 4) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel64.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel64.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel64.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel64.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel64.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel64.setIcon(GRIS);
                        }
                        jButtoncomprobar.setEnabled(true);
                    }
                }
            }
        }

    }//GEN-LAST:event_jButtonrojoActionPerformed

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

        if (combinacion.length() == 4 && tiempo.isStarted()) {
            if (combinacion.equals(combinacionsecreta)) {
                JOptionPane.showMessageDialog(this, "Has acertado", "Enhorabuena", INFORMATION_MESSAGE);
                int puntuacion = 0;
                int nivelrepeticion;
                if (!jCheckBoxrepeticion.isSelected()) {
                    nivelrepeticion = jComboBoxnivel.getSelectedIndex();
                } else {
                    nivelrepeticion = jComboBoxnivel.getSelectedIndex() + 3;
                }
                switch (nivelrepeticion) {

                case 0:
                    puntuacion = ((NIVELMUYFACIL - ((int) tiempo.getTime()) / 100) / intento);
                    break;
                case 1:
                    puntuacion = (NIVELMUYFACIL - (int) (tiempo.getTime() / 500) / intento);
                    break;
                case 2:
                    puntuacion = (NIVELMEDIO - (int) (tiempo.getTime() / 1000) / intento);
                    break;
                case 3:
                    puntuacion = (NIVELDIFICIL / -(int) (tiempo.getTime()) / 1500) / intento;
                    break;
                case 4:
                    puntuacion = (NIVELMUYDIFICIL - (int) (tiempo.getTime()) / 3000) / intento;
                    break;
                case 5:
                    puntuacion = (NIVELMEDIO - (int) (tiempo.getTime() / 500) / intento);
                    break;
                case 6:
                    puntuacion = (NIVELDIFICIL / -(int) (tiempo.getTime()) / 1000) / intento;
                    break;
                case 7:
                    puntuacion = (NIVELMUYDIFICIL - (int) (tiempo.getTime()) / 1500) / intento;
                    break;

                default:

                }
                jFormattedTextFieldpuntuacion.setValue(puntuacion);
                tiempo.stop();
                jToggleButtoncomenzarparar.setSelected(false);
                jToggleButtoncomenzarparar.setText("Comenzar");
                jButtoncomprobar.setEnabled(false);
                jButtonretroceder.setEnabled(true);
                intento++;
                jButtonretroceder.setText("Reiniciar");
                hasacertado = true;

            } else {

                posicion = 0;
                intento++;
            }
            if (jCheckBoxrepeticion.isSelected()) {
                acierto = 0;
                aciertopos = 0;
                for (int i = 0; i < combinacion.length(); i++) {
                    System.out.println(combinacion.charAt(i));
                    boolean esacierto = false;
                    int j = 0;
                    do {
                        System.out.println(combinacion.charAt(i) + " " + combinacionsecreta.charAt(j));
                        if (!(combinacion.charAt(i) == combinacionsecreta.charAt(j))) {
                            j++;
                        } else {
                            esacierto = true;
                            if (i == j) {
                                aciertopos++;
                            } else {
                                acierto++;
                            }
                        }
                    } while (!esacierto && j < combinacionsecreta.length());
                }
            } else {
                aciertopos = 0;
                acierto = 0;
                String aux = combinacionsecreta;
                System.out.println(combinacion);
                for (int i = 0; i < combinacion.length(); i++) {
                    if (combinacion.charAt(i) == combinacionsecreta.charAt(i)) {
                        aciertopos++;
                        String combinacionaux = "";
                        for (int j = 0; j < combinacion.length(); j++) {
                            if (!(j == i)) {
                                combinacionaux += combinacion.charAt(j);

                            } else {

                            }
                        }
                        combinacion = combinacionaux;
                        combinacionaux = "";
                        for (int k = 0; (k < combinacionsecreta.length()); k++) {
                            if (!(k == i)) {
                                combinacionaux += combinacionsecreta.charAt(k);

                            } else {
                                i--;
                            }
                        }
                        combinacionsecreta = combinacionaux;
                    }
                }
                int posR = 0, posA = 0, posV = 0, posY = 0, posN = 0, posG = 0;
                for (int i = 0; i < combinacion.length(); i++) {
                    int j = 0;
                    while (j < combinacionsecreta.length() && i < combinacion.length()) {
                        if (combinacion.charAt(i) == combinacionsecreta.charAt(j)) {
                            System.out.println(combinacion.charAt(i) + " " + combinacionsecreta.charAt(j));

                            switch ((char) combinacionsecreta.charAt(j)) {
                            case 'r':
                                if (j >= posR) {
                                    acierto++;
                                    posR = j;
                                    i++;
                                    j = 0;
                                } else {
                                    j++;
                                }
                                break;
                            case 'a':
                                if (j >= posA) {
                                    acierto++;
                                    posA = j;
                                    i++;
                                    j = 0;
                                } else {
                                    j++;
                                }
                                break;
                            case 'v':
                                if (j >= posV) {
                                    acierto++;
                                    posV = j;
                                    i++;
                                    j = 0;
                                } else {
                                    j++;
                                }
                                break;
                            case 'y':
                                if (j >= posY) {
                                    acierto++;
                                    posY = j;
                                    i++;
                                    j = 0;
                                } else {
                                    j++;
                                }
                                break;
                            case 'n':
                                if (j >= posN) {
                                    acierto++;
                                    posN = j;
                                    i++;
                                    j = 0;
                                } else {
                                    j++;
                                }
                                break;
                            case 'g':
                                if (j >= posG) {
                                    acierto++;
                                    posG = j;
                                    i++;
                                    j = 0;
                                } else {
                                    j++;
                                }
                                break;
                            default:
                            }
                        } else {
                            System.out.println(combinacion.charAt(i) + " " + combinacionsecreta.charAt(j));
                            j++;
                        }
                    }
                }
                System.out.println(aciertopos);
                System.out.println(acierto);
                combinacionsecreta = aux;
                combinacion = "";
                System.out.println(combinacionsecreta);
            }
            if (intento >= 0) {
                switch (intento) {
                case 2:
                    jTextFieldresultadoAP1.setText(Integer.toString(aciertopos));
                    jTextFieldresultadoA1.setText(Integer.toString(acierto));
                    break;
                case 3:
                    jTextFieldresultadoAP2.setText(Integer.toString(aciertopos));
                    jTextFieldresultadoA2.setText(Integer.toString(acierto));
                    break;
                case 4:
                    jTextFieldresultadoAP3.setText(Integer.toString(aciertopos));
                    jTextFieldresultadoA3.setText(Integer.toString(acierto));
                    break;
                case 5:
                    jTextFieldresultadoAP4.setText(Integer.toString(aciertopos));
                    jTextFieldresultadoA4.setText(Integer.toString(acierto));
                    break;
                case 6:
                    jTextFieldresultadoAP5.setText(Integer.toString(aciertopos));
                    jTextFieldresultadoA5.setText(Integer.toString(acierto));
                    break;
                case 7:
                    jTextFieldresultadoAP6.setText(Integer.toString(aciertopos));
                    jTextFieldresultadoA6.setText(Integer.toString(acierto));
                    if (!(combinacion.equals(combinacionsecreta)) && !(hasacertado)) {
                        JOptionPane.showMessageDialog(this, "Sin Intentos", "Has Perdido",
                                JOptionPane.WARNING_MESSAGE);
                        tiempo.stop();
                        jToggleButtoncomenzarparar.setSelected(false);
                        jToggleButtoncomenzarparar.setText("Nueva partida");
                        posicion = 0;
                        for (int i = 1; i <= 4; i++) {
                            posicion++;
                            intento = 0;
                            for (int j = 1; j <= 4; j++) {
                                intento++;
                                if (intento == 1) {
                                    switch (posicion) {
                                    case 1:
                                        jLabel11.setIcon(DEFAULT);
                                        break;
                                    case 2:
                                        jLabel12.setIcon(DEFAULT);
                                        break;
                                    case 3:
                                        jLabel13.setIcon(DEFAULT);
                                        break;
                                    case 4:
                                        jLabel14.setIcon(DEFAULT);
                                        break;
                                    }
                                }
                                if (intento == 2) {
                                    switch (posicion) {
                                    case 1:
                                        jLabel21.setIcon(DEFAULT);
                                        break;
                                    case 2:
                                        jLabel22.setIcon(DEFAULT);
                                        break;
                                    case 3:
                                        jLabel23.setIcon(DEFAULT);
                                        break;
                                    case 4:
                                        jLabel24.setIcon(DEFAULT);
                                        break;
                                    }
                                }
                                if (intento == 3) {
                                    switch (posicion) {
                                    case 1:
                                        jLabel31.setIcon(DEFAULT);
                                        break;
                                    case 2:
                                        jLabel32.setIcon(DEFAULT);
                                        break;
                                    case 3:
                                        jLabel33.setIcon(DEFAULT);
                                        break;
                                    case 4:
                                        jLabel34.setIcon(DEFAULT);
                                        break;
                                    }
                                }
                                if (intento == 4) {
                                    switch (posicion) {
                                    case 1:
                                        jLabel41.setIcon(DEFAULT);
                                        break;
                                    case 2:
                                        jLabel42.setIcon(DEFAULT);
                                        break;
                                    case 3:
                                        jLabel43.setIcon(DEFAULT);
                                        break;
                                    case 4:
                                        jLabel44.setIcon(DEFAULT);
                                        break;
                                    }
                                }
                                if (intento == 5) {
                                    switch (posicion) {
                                    case 1:
                                        jLabel51.setIcon(DEFAULT);
                                        break;
                                    case 2:
                                        jLabel52.setIcon(DEFAULT);
                                        break;
                                    case 3:
                                        jLabel53.setIcon(DEFAULT);
                                        break;
                                    case 4:
                                        jLabel54.setIcon(DEFAULT);
                                        break;
                                    }
                                }
                                if (intento == 6) {
                                    switch (posicion) {
                                    case 1:
                                        jLabel61.setIcon(DEFAULT);
                                        break;
                                    case 2:
                                        jLabel62.setIcon(DEFAULT);
                                        break;
                                    case 3:
                                        jLabel63.setIcon(DEFAULT);
                                        break;
                                    case 4:
                                        jLabel64.setIcon(DEFAULT);
                                        break;
                                    }
                                }
                            }
                            intento = 0;
                            posicion = 0;
                        }

                        break;

                    }
                }

            }
        }
    }//GEN-LAST:event_jButtoncomprobarActionPerformed

    private void jButtonazulActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonazulActionPerformed
        if (tiempo.isStarted() && combinacion.length() < 4) {
            combinacion += 'a';
            posicion++;
            jButtonretroceder.setEnabled(true);
            if (intento == 1 && !combinacion.isEmpty()) {
                for (int i = 0; i < combinacion.length(); i++) {
                    if (posicion == 1) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel11.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel11.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel11.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel11.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel11.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel11.setIcon(GRIS);
                        }
                    }
                    if (posicion == 2) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel12.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel12.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel12.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel12.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel12.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel12.setIcon(GRIS);
                        }
                    }
                    if (posicion == 3) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel13.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel13.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel13.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel13.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel13.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel13.setIcon(GRIS);
                        }
                    }
                    if ((char) posicion == 4) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel14.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel14.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel14.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel14.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel14.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel14.setIcon(GRIS);
                        }
                        jButtoncomprobar.setEnabled(true);
                    }
                }
            }
            if (intento == 2) {
                for (int i = 0; i < combinacion.length(); i++) {
                    if (posicion == 1) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel21.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel21.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel21.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel21.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel21.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel21.setIcon(GRIS);
                        }
                    }
                    if (posicion == 2) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel22.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel22.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel22.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel22.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel22.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel22.setIcon(GRIS);
                        }
                    }
                    if (posicion == 3) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel23.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel23.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel23.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel23.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel23.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel23.setIcon(GRIS);
                        }
                    }
                    if (posicion == 4) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel24.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel24.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel24.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel24.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel24.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel24.setIcon(GRIS);
                        }
                        jButtoncomprobar.setEnabled(true);
                    }
                }
            }
            if (intento == 3) {
                for (int i = 0; i < combinacion.length(); i++) {
                    if (posicion == 1) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel31.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel31.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel31.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel31.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel31.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel31.setIcon(GRIS);
                        }
                    }
                    if (posicion == 2) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel32.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel32.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel32.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel32.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel32.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel32.setIcon(GRIS);
                        }
                    }
                    if (posicion == 3) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel33.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel33.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel33.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel33.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel33.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel33.setIcon(GRIS);
                        }
                    }
                    if (posicion == 4) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel34.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel34.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel34.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel34.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel34.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel34.setIcon(GRIS);
                        }
                        jButtoncomprobar.setEnabled(true);
                    }
                }
            }
            if (intento == 4) {
                for (int i = 0; i < combinacion.length(); i++) {
                    if (posicion == 1) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel41.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel41.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel41.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel41.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel41.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel41.setIcon(GRIS);
                        }
                    }
                    if (posicion == 2) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel42.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel42.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel42.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel42.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel42.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel42.setIcon(GRIS);
                        }
                    }
                    if (posicion == 3) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel43.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel43.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel43.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel43.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel43.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel43.setIcon(GRIS);
                        }
                    }
                    if (posicion == 4) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel44.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel44.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel44.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel44.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel44.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel44.setIcon(GRIS);
                        }
                        jButtoncomprobar.setEnabled(true);
                    }
                }
            }
            if (intento == 5) {
                for (int i = 0; i < combinacion.length(); i++) {
                    if (posicion == 1) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel51.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel51.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel51.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel51.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel51.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel51.setIcon(GRIS);
                        }
                    }
                    if (posicion == 2) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel52.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel52.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel52.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel52.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel52.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel52.setIcon(GRIS);
                        }
                    }
                    if (posicion == 3) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel53.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel53.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel53.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel53.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel53.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel53.setIcon(GRIS);
                        }
                    }
                    if (posicion == 4) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel54.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel54.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel54.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel54.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel54.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel54.setIcon(GRIS);
                        }
                        jButtoncomprobar.setEnabled(true);
                    }
                }
            }
            if (intento == 6) {
                for (int i = 0; i < combinacion.length(); i++) {
                    if (posicion == 1) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel61.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel61.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel61.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel61.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel61.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel61.setIcon(GRIS);
                        }
                    }
                    if (posicion == 2) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel62.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel62.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel62.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel62.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel62.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel62.setIcon(GRIS);
                        }
                    }
                    if (posicion == 3) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel63.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel63.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel63.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel63.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel63.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel63.setIcon(GRIS);
                        }
                    }
                    if (posicion == 4) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel64.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel64.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel64.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel64.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel64.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel64.setIcon(GRIS);
                        }
                        jButtoncomprobar.setEnabled(true);
                    }
                }
            }
        }
    }//GEN-LAST:event_jButtonazulActionPerformed

    private void jButtonverdeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonverdeActionPerformed
        if (tiempo.isStarted() && combinacion.length() < 4) {
            combinacion += 'v';
            posicion++;
            jButtonretroceder.setEnabled(true);
            if (intento == 1 && !combinacion.isEmpty()) {
                for (int i = 0; i < combinacion.length(); i++) {
                    if (posicion == 1) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel11.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel11.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel11.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel11.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel11.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel11.setIcon(GRIS);
                        }
                    }
                    if (posicion == 2) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel12.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel12.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel12.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel12.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel12.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel12.setIcon(GRIS);
                        }
                    }
                    if (posicion == 3) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel13.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel13.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel13.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel13.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel13.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel13.setIcon(GRIS);
                        }
                    }
                    if ((char) posicion == 4) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel14.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel14.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel14.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel14.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel14.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel14.setIcon(GRIS);
                        }
                        jButtoncomprobar.setEnabled(true);
                    }
                }
            }
            if (intento == 2) {
                for (int i = 0; i < combinacion.length(); i++) {
                    if (posicion == 1) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel21.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel21.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel21.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel21.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel21.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel21.setIcon(GRIS);
                        }
                    }
                    if (posicion == 2) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel22.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel22.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel22.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel22.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel22.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel22.setIcon(GRIS);
                        }
                    }
                    if (posicion == 3) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel23.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel23.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel23.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel23.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel23.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel23.setIcon(GRIS);
                        }
                    }
                    if (posicion == 4) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel24.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel24.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel24.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel24.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel24.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel24.setIcon(GRIS);
                        }
                        jButtoncomprobar.setEnabled(true);
                    }
                }
            }
            if (intento == 3) {
                for (int i = 0; i < combinacion.length(); i++) {
                    if (posicion == 1) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel31.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel31.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel31.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel31.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel31.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel31.setIcon(GRIS);
                        }
                    }
                    if (posicion == 2) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel32.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel32.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel32.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel32.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel32.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel32.setIcon(GRIS);
                        }
                    }
                    if (posicion == 3) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel33.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel33.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel33.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel33.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel33.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel33.setIcon(GRIS);
                        }
                    }
                    if (posicion == 4) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel34.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel34.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel34.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel34.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel34.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel34.setIcon(GRIS);
                        }
                        jButtoncomprobar.setEnabled(true);
                    }
                }
            }
            if (intento == 4) {
                for (int i = 0; i < combinacion.length(); i++) {
                    if (posicion == 1) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel41.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel41.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel41.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel41.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel41.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel41.setIcon(GRIS);
                        }
                    }
                    if (posicion == 2) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel42.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel42.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel42.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel42.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel42.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel42.setIcon(GRIS);
                        }
                    }
                    if (posicion == 3) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel43.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel43.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel43.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel43.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel43.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel43.setIcon(GRIS);
                        }
                    }
                    if (posicion == 4) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel44.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel44.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel44.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel44.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel44.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel44.setIcon(GRIS);
                        }
                        jButtoncomprobar.setEnabled(true);
                    }
                }
            }
            if (intento == 5) {
                for (int i = 0; i < combinacion.length(); i++) {
                    if (posicion == 1) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel51.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel51.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel51.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel51.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel51.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel51.setIcon(GRIS);
                        }
                    }
                    if (posicion == 2) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel52.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel52.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel52.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel52.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel52.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel52.setIcon(GRIS);
                        }
                    }
                    if (posicion == 3) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel53.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel53.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel53.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel53.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel53.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel53.setIcon(GRIS);
                        }
                    }
                    if (posicion == 4) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel54.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel54.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel54.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel54.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel54.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel54.setIcon(GRIS);
                        }
                        jButtoncomprobar.setEnabled(true);
                    }
                }
            }
            if (intento == 6) {
                for (int i = 0; i < combinacion.length(); i++) {
                    if (posicion == 1) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel61.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel61.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel61.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel61.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel61.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel61.setIcon(GRIS);
                        }
                    }
                    if (posicion == 2) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel62.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel62.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel62.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel62.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel62.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel62.setIcon(GRIS);
                        }
                    }
                    if (posicion == 3) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel63.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel63.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel63.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel63.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel63.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel63.setIcon(GRIS);
                        }
                    }
                    if (posicion == 4) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel64.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel64.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel64.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel64.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel64.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel64.setIcon(GRIS);
                        }
                        jButtoncomprobar.setEnabled(true);
                    }
                }
            }
        }
    }//GEN-LAST:event_jButtonverdeActionPerformed

    private void jButtonamarilloActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonamarilloActionPerformed
        if (tiempo.isStarted() && combinacion.length() < 4) {
            combinacion += 'y';
            posicion++;
            jButtonretroceder.setEnabled(true);
            if (intento == 1 && !combinacion.isEmpty()) {
                for (int i = 0; i < combinacion.length(); i++) {
                    if (posicion == 1) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel11.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel11.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel11.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel11.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel11.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel11.setIcon(GRIS);
                        }
                    }
                    if (posicion == 2) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel12.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel12.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel12.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel12.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel12.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel12.setIcon(GRIS);
                        }
                    }
                    if (posicion == 3) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel13.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel13.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel13.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel13.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel13.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel13.setIcon(GRIS);
                        }
                    }
                    if ((char) posicion == 4) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel14.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel14.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel14.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel14.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel14.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel14.setIcon(GRIS);
                        }
                        jButtoncomprobar.setEnabled(true);
                    }
                }
            }
            if (intento == 2) {
                for (int i = 0; i < combinacion.length(); i++) {
                    if (posicion == 1) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel21.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel21.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel21.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel21.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel21.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel21.setIcon(GRIS);
                        }
                    }
                    if (posicion == 2) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel22.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel22.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel22.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel22.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel22.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel22.setIcon(GRIS);
                        }
                    }
                    if (posicion == 3) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel23.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel23.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel23.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel23.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel23.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel23.setIcon(GRIS);
                        }
                    }
                    if (posicion == 4) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel24.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel24.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel24.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel24.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel24.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel24.setIcon(GRIS);
                        }
                        jButtoncomprobar.setEnabled(true);
                    }
                }
            }
            if (intento == 3) {
                for (int i = 0; i < combinacion.length(); i++) {
                    if (posicion == 1) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel31.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel31.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel31.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel31.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel31.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel31.setIcon(GRIS);
                        }
                    }
                    if (posicion == 2) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel32.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel32.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel32.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel32.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel32.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel32.setIcon(GRIS);
                        }
                    }
                    if (posicion == 3) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel33.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel33.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel33.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel33.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel33.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel33.setIcon(GRIS);
                        }
                    }
                    if (posicion == 4) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel34.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel34.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel34.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel34.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel34.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel34.setIcon(GRIS);
                        }
                        jButtoncomprobar.setEnabled(true);
                    }
                }
            }
            if (intento == 4) {
                for (int i = 0; i < combinacion.length(); i++) {
                    if (posicion == 1) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel41.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel41.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel41.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel41.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel41.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel41.setIcon(GRIS);
                        }
                    }
                    if (posicion == 2) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel42.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel42.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel42.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel42.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel42.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel42.setIcon(GRIS);
                        }
                    }
                    if (posicion == 3) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel43.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel43.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel43.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel43.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel43.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel43.setIcon(GRIS);
                        }
                    }
                    if (posicion == 4) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel44.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel44.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel44.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel44.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel44.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel44.setIcon(GRIS);
                        }
                        jButtoncomprobar.setEnabled(true);
                    }
                }
            }
            if (intento == 5) {
                for (int i = 0; i < combinacion.length(); i++) {
                    if (posicion == 1) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel51.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel51.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel51.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel51.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel51.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel51.setIcon(GRIS);
                        }
                    }
                    if (posicion == 2) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel52.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel52.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel52.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel52.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel52.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel52.setIcon(GRIS);
                        }
                    }
                    if (posicion == 3) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel53.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel53.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel53.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel53.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel53.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel53.setIcon(GRIS);
                        }
                    }
                    if (posicion == 4) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel54.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel54.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel54.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel54.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel54.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel54.setIcon(GRIS);
                        }
                        jButtoncomprobar.setEnabled(true);
                    }
                }
            }
            if (intento == 6) {
                for (int i = 0; i < combinacion.length(); i++) {
                    if (posicion == 1) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel61.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel61.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel61.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel61.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel61.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel61.setIcon(GRIS);
                        }
                    }
                    if (posicion == 2) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel62.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel62.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel62.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel62.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel62.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel62.setIcon(GRIS);
                        }
                    }
                    if (posicion == 3) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel63.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel63.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel63.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel63.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel63.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel63.setIcon(GRIS);
                        }
                    }
                    if (posicion == 4) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel64.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel64.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel64.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel64.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel64.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel64.setIcon(GRIS);
                        }
                        jButtoncomprobar.setEnabled(true);
                    }
                }
            }
        }
    }//GEN-LAST:event_jButtonamarilloActionPerformed

    private void jButtongrisActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtongrisActionPerformed
        if (tiempo.isStarted() && combinacion.length() < 4) {
            combinacion += 'g';
            posicion++;
            jButtonretroceder.setEnabled(true);
            if (intento == 1 && !combinacion.isEmpty()) {
                for (int i = 0; i < combinacion.length(); i++) {
                    if (posicion == 1) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel11.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel11.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel11.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel11.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel11.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel11.setIcon(GRIS);
                        }
                    }
                    if (posicion == 2) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel12.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel12.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel12.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel12.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel12.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel12.setIcon(GRIS);
                        }
                    }
                    if (posicion == 3) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel13.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel13.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel13.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel13.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel13.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel13.setIcon(GRIS);
                        }
                    }
                    if ((char) posicion == 4) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel14.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel14.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel14.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel14.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel14.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel14.setIcon(GRIS);
                        }
                        jButtoncomprobar.setEnabled(true);
                    }
                }
            }
            if (intento == 2) {
                for (int i = 0; i < combinacion.length(); i++) {
                    if (posicion == 1) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel21.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel21.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel21.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel21.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel21.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel21.setIcon(GRIS);
                        }
                    }
                    if (posicion == 2) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel22.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel22.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel22.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel22.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel22.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel22.setIcon(GRIS);
                        }
                    }
                    if (posicion == 3) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel23.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel23.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel23.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel23.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel23.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel23.setIcon(GRIS);
                        }
                    }
                    if (posicion == 4) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel24.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel24.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel24.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel24.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel24.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel24.setIcon(GRIS);
                        }
                        jButtoncomprobar.setEnabled(true);
                    }
                }
            }
            if (intento == 3) {
                for (int i = 0; i < combinacion.length(); i++) {
                    if (posicion == 1) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel31.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel31.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel31.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel31.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel31.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel31.setIcon(GRIS);
                        }
                    }
                    if (posicion == 2) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel32.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel32.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel32.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel32.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel32.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel32.setIcon(GRIS);
                        }
                    }
                    if (posicion == 3) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel33.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel33.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel33.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel33.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel33.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel33.setIcon(GRIS);
                        }
                    }
                    if (posicion == 4) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel34.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel34.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel34.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel34.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel34.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel34.setIcon(GRIS);
                        }
                        jButtoncomprobar.setEnabled(true);
                    }
                }
            }
            if (intento == 4) {
                for (int i = 0; i < combinacion.length(); i++) {
                    if (posicion == 1) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel41.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel41.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel41.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel41.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel41.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel41.setIcon(GRIS);
                        }
                    }
                    if (posicion == 2) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel42.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel42.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel42.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel42.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel42.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel42.setIcon(GRIS);
                        }
                    }
                    if (posicion == 3) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel43.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel43.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel43.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel43.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel43.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel43.setIcon(GRIS);
                        }
                    }
                    if (posicion == 4) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel44.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel44.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel44.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel44.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel44.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel44.setIcon(GRIS);
                        }
                        jButtoncomprobar.setEnabled(true);
                    }
                }
            }
            if (intento == 5) {
                for (int i = 0; i < combinacion.length(); i++) {
                    if (posicion == 1) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel51.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel51.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel51.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel51.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel51.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel51.setIcon(GRIS);
                        }
                    }
                    if (posicion == 2) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel52.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel52.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel52.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel52.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel52.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel52.setIcon(GRIS);
                        }
                    }
                    if (posicion == 3) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel53.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel53.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel53.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel53.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel53.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel53.setIcon(GRIS);
                        }
                    }
                    if (posicion == 4) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel54.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel54.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel54.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel54.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel54.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel54.setIcon(GRIS);
                        }
                        jButtoncomprobar.setEnabled(true);
                    }
                }
            }
            if (intento == 6) {
                for (int i = 0; i < combinacion.length(); i++) {
                    if (posicion == 1) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel61.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel61.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel61.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel61.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel61.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel61.setIcon(GRIS);
                        }
                    }
                    if (posicion == 2) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel62.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel62.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel62.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel62.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel62.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel62.setIcon(GRIS);
                        }
                    }
                    if (posicion == 3) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel63.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel63.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel63.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel63.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel63.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel63.setIcon(GRIS);
                        }
                    }
                    if (posicion == 4) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel64.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel64.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel64.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel64.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel64.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel64.setIcon(GRIS);
                        }
                        jButtoncomprobar.setEnabled(true);
                    }
                }
            }
        }
    }//GEN-LAST:event_jButtongrisActionPerformed

    private void jButtonnaranjaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonnaranjaActionPerformed
        if (tiempo.isStarted() && combinacion.length() < 4) {
            combinacion += 'n';
            posicion++;
            jButtonretroceder.setEnabled(true);
            if (intento == 1 && !combinacion.isEmpty()) {
                for (int i = 0; i < combinacion.length(); i++) {
                    if (posicion == 1) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel11.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel11.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel11.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel11.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel11.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel11.setIcon(GRIS);
                        }
                    }
                    if (posicion == 2) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel12.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel12.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel12.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel12.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel12.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel12.setIcon(GRIS);
                        }
                    }
                    if (posicion == 3) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel13.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel13.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel13.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel13.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel13.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel13.setIcon(GRIS);
                        }
                    }
                    if ((char) posicion == 4) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel14.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel14.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel14.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel14.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel14.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel14.setIcon(GRIS);
                        }
                        jButtoncomprobar.setEnabled(true);
                    }
                }
            }
            if (intento == 2) {
                for (int i = 0; i < combinacion.length(); i++) {
                    if (posicion == 1) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel21.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel21.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel21.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel21.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel21.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel21.setIcon(GRIS);
                        }
                    }
                    if (posicion == 2) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel22.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel22.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel22.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel22.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel22.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel22.setIcon(GRIS);
                        }
                    }
                    if (posicion == 3) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel23.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel23.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel23.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel23.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel23.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel23.setIcon(GRIS);
                        }
                    }
                    if (posicion == 4) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel24.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel24.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel24.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel24.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel24.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel24.setIcon(GRIS);
                        }
                        jButtoncomprobar.setEnabled(true);
                    }
                }
            }
            if (intento == 3) {
                for (int i = 0; i < combinacion.length(); i++) {
                    if (posicion == 1) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel31.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel31.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel31.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel31.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel31.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel31.setIcon(GRIS);
                        }
                    }
                    if (posicion == 2) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel32.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel32.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel32.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel32.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel32.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel32.setIcon(GRIS);
                        }
                    }
                    if (posicion == 3) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel33.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel33.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel33.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel33.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel33.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel33.setIcon(GRIS);
                        }
                    }
                    if (posicion == 4) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel34.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel34.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel34.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel34.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel34.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel34.setIcon(GRIS);
                        }
                        jButtoncomprobar.setEnabled(true);
                    }
                }
            }
            if (intento == 4) {
                for (int i = 0; i < combinacion.length(); i++) {
                    if (posicion == 1) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel41.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel41.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel41.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel41.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel41.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel41.setIcon(GRIS);
                        }
                    }
                    if (posicion == 2) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel42.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel42.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel42.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel42.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel42.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel42.setIcon(GRIS);
                        }
                    }
                    if (posicion == 3) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel43.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel43.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel43.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel43.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel43.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel43.setIcon(GRIS);
                        }
                    }
                    if (posicion == 4) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel44.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel44.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel44.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel44.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel44.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel44.setIcon(GRIS);
                        }
                        jButtoncomprobar.setEnabled(true);
                    }
                }
            }
            if (intento == 5) {
                for (int i = 0; i < combinacion.length(); i++) {
                    if (posicion == 1) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel51.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel51.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel51.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel51.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel51.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel51.setIcon(GRIS);
                        }
                    }
                    if (posicion == 2) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel52.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel52.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel52.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel52.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel52.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel52.setIcon(GRIS);
                        }
                    }
                    if (posicion == 3) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel53.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel53.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel53.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel53.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel53.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel53.setIcon(GRIS);
                        }
                    }
                    if (posicion == 4) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel54.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel54.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel54.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel54.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel54.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel54.setIcon(GRIS);
                        }
                        jButtoncomprobar.setEnabled(true);
                    }
                }
            }
            if (intento == 6) {
                for (int i = 0; i < combinacion.length(); i++) {
                    if (posicion == 1) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel61.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel61.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel61.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel61.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel61.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel61.setIcon(GRIS);
                        }
                    }
                    if (posicion == 2) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel62.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel62.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel62.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel62.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel62.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel62.setIcon(GRIS);
                        }
                    }
                    if (posicion == 3) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel63.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel63.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel63.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel63.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel63.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel63.setIcon(GRIS);
                        }
                    }
                    if (posicion == 4) {
                        switch ((char) combinacion.charAt(i)) {
                        case 'r':
                            jLabel64.setIcon(ROJO);
                            break;
                        case 'a':
                            jLabel64.setIcon(AZUL);
                            break;
                        case 'v':
                            jLabel64.setIcon(VERDE);
                            break;
                        case 'y':
                            jLabel64.setIcon(AMARILLO);
                            break;
                        case 'n':
                            jLabel64.setIcon(NARANJA);
                            break;
                        case 'g':
                            jLabel64.setIcon(GRIS);
                        }
                        jButtoncomprobar.setEnabled(true);
                    }
                }
            }
        }
    }//GEN-LAST:event_jButtonnaranjaActionPerformed

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

    }//GEN-LAST:event_jMenu2ActionPerformed

    private void jMenuItempreferenciasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItempreferenciasActionPerformed
        this.setEnabled(false);
        jDialog1.setVisible(true);
        jDialog1.setFocusableWindowState(false);
        jButtonrojo.setEnabled(false);
        jButtonazul.setEnabled(false);
        jButtonverde.setEnabled(false);
        jButtonamarillo.setEnabled(false);
        jButtonnaranja.setEnabled(false);
        jButtongris.setEnabled(false);
        jToggleButtoncomenzarparar.setEnabled(false);
        jCheckBoxrepeticion.setEnabled(false);
        jButtoncomprobar.setEnabled(false);
        jButtonretroceder.setEnabled(false);
    }//GEN-LAST:event_jMenuItempreferenciasActionPerformed

    private void jToggleButtoncomenzarpararActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jToggleButtoncomenzarpararActionPerformed
        if (jToggleButtoncomenzarparar.isSelected()) {
            jToggleButtoncomenzarparar.setText("Parar     ");
            jButtonpausa.setEnabled(true);
            intento = 1;
            combinacionsecreta = "";
            tiempo.reset();
            tiempo.start();
            hasacertado = false;
            jMenuItemclavesecreta.setEnabled(true);
            Random aleatorio = new Random();
            if (!jCheckBoxrepeticion.isSelected()) {
                for (int i = 1; i <= 4; i++) {
                    switch (aleatorio.nextInt(simbolo)) {
                    case 0:
                        combinacionsecreta += 'r';
                        break;
                    case 1:
                        combinacionsecreta += 'a';
                        break;
                    case 2:
                        combinacionsecreta += 'v';
                        break;
                    case 3:
                        combinacionsecreta += 'y';
                        break;
                    case 4:
                        combinacionsecreta += 'g';
                        break;
                    case 5:
                        combinacionsecreta += 'n';
                        break;
                    }
                }
                System.out.println(combinacionsecreta);
            } else {
                do {
                    for (int i = 1; i <= 4; i++) {
                        switch (aleatorio.nextInt(simbolo)) {
                        case 0:
                            caracteraux = 'r';
                            break;
                        case 1:
                            caracteraux = 'a';
                            break;
                        case 2:
                            caracteraux = 'v';
                            break;
                        case 3:
                            caracteraux = 'y';
                            break;
                        case 4:
                            caracteraux = 'g';
                            break;
                        case 5:
                            caracteraux = 'n';
                            break;
                        }
                        boolean serepite = false;
                        for (int j = 0; j < combinacionsecreta.length(); j++) {
                            if ((combinacionsecreta.charAt(j) == caracteraux)) {
                                serepite = true;
                            }
                        }
                        if (!serepite) {
                            combinacionsecreta += caracteraux;
                        } else {
                            i--;
                        }
                    }
                } while (combinacionsecreta.length() < 4);
                System.out.println(combinacionsecreta);
            }
        } else {
            jToggleButtoncomenzarparar.setText("Comenzar");
            jToggleButtoncomenzarparar.setSelected(false);
            jButtonpausa.setEnabled(false);
            tiempo.stop();
            tiempo.getTime();
        }
    }//GEN-LAST:event_jToggleButtoncomenzarpararActionPerformed

    private void jComboBoxnivelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxnivelActionPerformed
        switch (jComboBoxnivel.getSelectedIndex()) {
        case 0:
            jButtonrojo.setEnabled(true);
            jButtonazul.setEnabled(true);
            jButtonverde.setEnabled(false);
            jButtonamarillo.setEnabled(false);
            jButtonnaranja.setEnabled(false);
            jButtongris.setEnabled(false);
            jToggleButtoncomenzarparar.setEnabled(false);
            simbolo = 2;
            this.setName("Mastermind: " + "Nivel-Muy Fcil");
            break;
        case 1:
            jButtonrojo.setEnabled(true);
            jButtonazul.setEnabled(true);
            jButtonverde.setEnabled(true);
            jButtonamarillo.setEnabled(false);
            jButtonnaranja.setEnabled(false);
            jButtongris.setEnabled(false);
            jToggleButtoncomenzarparar.setEnabled(false);
            simbolo = 3;
            this.setName("Mastermind: " + "Nivel-Fcil");
            break;
        case 2:
            jButtonrojo.setEnabled(true);
            jButtonazul.setEnabled(true);
            jButtonverde.setEnabled(true);
            jButtonamarillo.setEnabled(true);
            jButtonnaranja.setEnabled(false);
            jButtongris.setEnabled(false);
            jToggleButtoncomenzarparar.setEnabled(false);
            simbolo = 4;
            jCheckBoxrepeticion.setEnabled(true);
            this.setName("Mastermind: " + "Nivel-Medio");
            break;
        case 3:
            jButtonrojo.setEnabled(true);
            jButtonazul.setEnabled(true);
            jButtonverde.setEnabled(true);
            jButtonamarillo.setEnabled(true);
            jButtonnaranja.setEnabled(true);
            jButtongris.setEnabled(false);
            jToggleButtoncomenzarparar.setEnabled(true);
            simbolo = 5;
            jCheckBoxrepeticion.setEnabled(true);
            this.setName("Mastermind: " + "Nivel-Dficil");
            break;
        case 4:
            jButtonrojo.setEnabled(true);
            jButtonazul.setEnabled(true);
            jButtonverde.setEnabled(true);
            jButtonamarillo.setEnabled(true);
            jButtonnaranja.setEnabled(true);
            jButtongris.setEnabled(true);
            jToggleButtoncomenzarparar.setEnabled(true);
            simbolo = 6;
            jCheckBoxrepeticion.setEnabled(true);
            this.setName("Mastermind: " + "Nivel-Muy Dficil");
            break;
        default:
            System.out.println("No has selecionado un Nivel");
        }
    }//GEN-LAST:event_jComboBoxnivelActionPerformed

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

        if (!(hasacertado)) {
            if (tiempo.isStarted() && combinacion.length() >= 1) {
                if (intento == 1 && !combinacion.isEmpty()) {
                    switch (posicion) {
                    case 1:
                        jLabel11.setIcon(DEFAULT);
                        break;
                    case 2:
                        jLabel12.setIcon(DEFAULT);
                        break;
                    case 3:
                        jLabel13.setIcon(DEFAULT);
                        break;
                    case 4:
                        jLabel14.setIcon(DEFAULT);
                        break;
                    }
                }
                if (intento == 2 && !combinacion.isEmpty()) {
                    switch (posicion) {
                    case 1:
                        jLabel21.setIcon(DEFAULT);
                        break;
                    case 2:
                        jLabel22.setIcon(DEFAULT);
                        break;
                    case 3:
                        jLabel23.setIcon(DEFAULT);
                        break;
                    case 4:
                        jLabel24.setIcon(DEFAULT);
                        break;
                    }
                }
                if (intento == 3 && !combinacion.isEmpty()) {
                    switch (posicion) {
                    case 1:
                        jLabel31.setIcon(DEFAULT);
                        break;
                    case 2:
                        jLabel32.setIcon(DEFAULT);
                        break;
                    case 3:
                        jLabel33.setIcon(DEFAULT);
                        break;
                    case 4:
                        jLabel34.setIcon(DEFAULT);
                        break;
                    }
                }
                if (intento == 4 && !combinacion.isEmpty()) {
                    switch (posicion) {
                    case 1:
                        jLabel41.setIcon(DEFAULT);
                        break;
                    case 2:
                        jLabel42.setIcon(DEFAULT);
                        break;
                    case 3:
                        jLabel43.setIcon(DEFAULT);
                        break;
                    case 4:
                        jLabel44.setIcon(DEFAULT);
                        break;
                    }
                }
                if (intento == 5 && !combinacion.isEmpty()) {
                    switch (posicion) {
                    case 1:
                        jLabel51.setIcon(DEFAULT);
                        break;
                    case 2:
                        jLabel52.setIcon(DEFAULT);
                        break;
                    case 3:
                        jLabel53.setIcon(DEFAULT);
                        break;
                    case 4:
                        jLabel54.setIcon(DEFAULT);
                        break;
                    }
                }
                if (intento == 6 && !combinacion.isEmpty()) {
                    switch (posicion) {
                    case 1:
                        jLabel61.setIcon(DEFAULT);
                        break;
                    case 2:
                        jLabel62.setIcon(DEFAULT);
                        break;
                    case 3:
                        jLabel63.setIcon(DEFAULT);
                        break;
                    case 4:
                        jLabel64.setIcon(DEFAULT);
                        break;
                    }
                }
                posicion--;
                combinacion = combinacion.substring(0, (combinacion.length() - 1));
                if (!(combinacion.length() == 4)) {
                    jButtoncomprobar.setEnabled(false);
                }
            }
            if (combinacion.isEmpty()) {
                jButtonretroceder.setEnabled(false);
            }
        } else {
            jToggleButtoncomenzarparar.setSelected(false);
            jToggleButtoncomenzarparar.setText("Comenzar");
            for (int intentoaux = 1; intentoaux <= 6; intentoaux++) {
                switch (intento) {
                case 1:
                    jTextFieldresultadoAP1.setText(null);
                    jTextFieldresultadoA1.setText(null);
                    break;
                case 2:
                    jTextFieldresultadoAP2.setText(null);
                    jTextFieldresultadoA2.setText(null);
                    break;
                case 3:
                    jTextFieldresultadoAP3.setText(null);
                    jTextFieldresultadoA3.setText(null);
                    break;
                case 4:
                    jTextFieldresultadoAP4.setText(null);
                    jTextFieldresultadoA4.setText(null);
                    break;
                case 5:
                    jTextFieldresultadoAP5.setText(null);
                    jTextFieldresultadoA5.setText(null);
                    break;
                case 6:
                    jTextFieldresultadoAP6.setText(null);
                    jTextFieldresultadoA6.setText(null);
                    break;
                }
                for (int posicionaux = 1; posicionaux <= 4; posicionaux++) {
                    if (intentoaux == 1) {
                        switch (posicionaux) {
                        case 1:
                            jLabel11.setIcon(DEFAULT);
                            break;
                        case 2:
                            jLabel12.setIcon(DEFAULT);
                            break;
                        case 3:
                            jLabel13.setIcon(DEFAULT);
                            break;
                        case 4:
                            jLabel14.setIcon(DEFAULT);
                            break;
                        }
                    }
                    if (intentoaux == 2) {
                        switch (posicionaux) {
                        case 1:
                            jLabel21.setIcon(DEFAULT);
                            break;
                        case 2:
                            jLabel22.setIcon(DEFAULT);
                            break;
                        case 3:
                            jLabel23.setIcon(DEFAULT);
                            break;
                        case 4:
                            jLabel24.setIcon(DEFAULT);
                            break;
                        }
                    }
                    if (intentoaux == 3) {
                        switch (posicionaux) {
                        case 1:
                            jLabel31.setIcon(DEFAULT);
                            break;
                        case 2:
                            jLabel32.setIcon(DEFAULT);
                            break;
                        case 3:
                            jLabel33.setIcon(DEFAULT);
                            break;
                        case 4:
                            jLabel34.setIcon(DEFAULT);
                            break;
                        }
                    }
                    if (intentoaux == 4) {
                        switch (posicionaux) {
                        case 1:
                            jLabel41.setIcon(DEFAULT);
                            break;
                        case 2:
                            jLabel42.setIcon(DEFAULT);
                            break;
                        case 3:
                            jLabel43.setIcon(DEFAULT);
                            break;
                        case 4:
                            jLabel44.setIcon(DEFAULT);
                            break;
                        }
                    }
                    if (intentoaux == 5) {
                        switch (posicionaux) {
                        case 1:
                            jLabel51.setIcon(DEFAULT);
                            break;
                        case 2:
                            jLabel52.setIcon(DEFAULT);
                            break;
                        case 3:
                            jLabel53.setIcon(DEFAULT);
                            break;
                        case 4:
                            jLabel54.setIcon(DEFAULT);
                            break;
                        }
                    }
                    if (intentoaux == 6) {
                        switch (posicionaux) {
                        case 1:
                            jLabel61.setIcon(DEFAULT);
                            break;
                        case 2:
                            jLabel62.setIcon(DEFAULT);
                            break;
                        case 3:
                            jLabel63.setIcon(DEFAULT);
                            break;
                        case 4:
                            jLabel64.setIcon(DEFAULT);
                            break;
                        }
                    }
                }
                switch (intentoaux) {
                case 1:
                    jTextFieldresultadoAP1.setText(null);
                    jTextFieldresultadoA1.setText(null);
                    break;
                case 2:
                    jTextFieldresultadoAP2.setText(null);
                    jTextFieldresultadoA2.setText(null);
                    break;
                case 3:
                    jTextFieldresultadoAP3.setText(null);
                    jTextFieldresultadoA3.setText(null);
                    break;
                case 4:
                    jTextFieldresultadoAP4.setText(null);
                    jTextFieldresultadoA4.setText(null);
                    break;
                case 5:
                    jTextFieldresultadoAP5.setText(null);
                    jTextFieldresultadoA5.setText(null);
                    break;
                case 6:
                    jTextFieldresultadoAP6.setText(null);
                    jTextFieldresultadoA6.setText(null);
                    break;
                }

            }
            intento = 0;
            posicion = 0;
            combinacion = "";
            combinacionsecreta = "";
            jButtonretroceder.setEnabled(false);
            jButtoncomprobar.setEnabled(false);
            jButtonretroceder.setText("Retroceder");
            hasacertado = false;
            jMenuItemclavesecreta.setEnabled(true);

        }
    }//GEN-LAST:event_jButtonretrocederActionPerformed

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

        jToggleButtoncomenzarparar.setSelected(false);
        jToggleButtoncomenzarparar.setText("Comenzar");
        aciertopos = 0;
        acierto = 0;
        jMenuItemclavesecreta.setEnabled(false);
        for (int intentoaux = 1; intentoaux <= 6; intentoaux++) {
            switch (intentoaux) {
            case 1:
                jTextFieldresultadoAP1.setText(null);
                jTextFieldresultadoA1.setText(null);
                break;
            case 2:
                jTextFieldresultadoAP2.setText(null);
                jTextFieldresultadoA2.setText(null);
                break;
            case 3:
                jTextFieldresultadoAP3.setText(null);
                jTextFieldresultadoA3.setText(null);
                break;
            case 4:
                jTextFieldresultadoAP4.setText(null);
                jTextFieldresultadoA4.setText(null);
                break;
            case 5:
                jTextFieldresultadoAP5.setText(null);
                jTextFieldresultadoA5.setText(null);
                break;
            case 6:
                jTextFieldresultadoAP6.setText(null);
                jTextFieldresultadoA6.setText(null);
                break;
            }
            for (int posicionaux = 1; posicionaux <= 4; posicionaux++) {
                if (intentoaux == 1) {
                    switch (posicionaux) {
                    case 1:
                        jLabel11.setIcon(DEFAULT);
                        break;
                    case 2:
                        jLabel12.setIcon(DEFAULT);
                        break;
                    case 3:
                        jLabel13.setIcon(DEFAULT);
                        break;
                    case 4:
                        jLabel14.setIcon(DEFAULT);
                        break;
                    }
                }
                if (intentoaux == 2) {
                    switch (posicionaux) {
                    case 1:
                        jLabel21.setIcon(DEFAULT);
                        break;
                    case 2:
                        jLabel22.setIcon(DEFAULT);
                        break;
                    case 3:
                        jLabel23.setIcon(DEFAULT);
                        break;
                    case 4:
                        jLabel24.setIcon(DEFAULT);
                        break;
                    }
                }
                if (intentoaux == 3) {
                    switch (posicionaux) {
                    case 1:
                        jLabel31.setIcon(DEFAULT);
                        break;
                    case 2:
                        jLabel32.setIcon(DEFAULT);
                        break;
                    case 3:
                        jLabel33.setIcon(DEFAULT);
                        break;
                    case 4:
                        jLabel34.setIcon(DEFAULT);
                        break;
                    }
                }
                if (intentoaux == 4) {
                    switch (posicionaux) {
                    case 1:
                        jLabel41.setIcon(DEFAULT);
                        break;
                    case 2:
                        jLabel42.setIcon(DEFAULT);
                        break;
                    case 3:
                        jLabel43.setIcon(DEFAULT);
                        break;
                    case 4:
                        jLabel44.setIcon(DEFAULT);
                        break;
                    }
                }
                if (intentoaux == 5) {
                    switch (posicionaux) {
                    case 1:
                        jLabel51.setIcon(DEFAULT);
                        break;
                    case 2:
                        jLabel52.setIcon(DEFAULT);
                        break;
                    case 3:
                        jLabel53.setIcon(DEFAULT);
                        break;
                    case 4:
                        jLabel54.setIcon(DEFAULT);
                        break;
                    }
                }
                if (intentoaux == 6) {
                    switch (posicionaux) {
                    case 1:
                        jLabel61.setIcon(DEFAULT);
                        break;
                    case 2:
                        jLabel62.setIcon(DEFAULT);
                        break;
                    case 3:
                        jLabel63.setIcon(DEFAULT);
                        break;
                    case 4:
                        jLabel64.setIcon(DEFAULT);
                        break;
                    }
                }
            }

        }
        intento = 0;
        posicion = 0;
        combinacion = "";
        combinacionsecreta = "";
        jButtonretroceder.setEnabled(false);
        jButtoncomprobar.setEnabled(false);
        hasacertado = false;

    }//GEN-LAST:event_jMenuItemjugarActionPerformed

    private void jButtonaceptarnivelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonaceptarnivelActionPerformed
        this.setEnabled(true);
        this.setFocusableWindowState(true);
        jDialog1.setVisible(false);
        jToggleButtoncomenzarparar.setEnabled(true);
    }//GEN-LAST:event_jButtonaceptarnivelActionPerformed

    private void jMenuItemsalirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemsalirActionPerformed
        Runtime.getRuntime().exit(0);
    }//GEN-LAST:event_jMenuItemsalirActionPerformed

    private void formMouseMoved(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_formMouseMoved
        Calendar estiempo = Calendar.getInstance();
        estiempo.setTimeInMillis(tiempo.getTime());
        estiempo.get(Calendar.SECOND);
        estiempo.get(Calendar.MINUTE);
        jFormattedTextFieldtiempo.setValue(tiempo.getTime());

    }//GEN-LAST:event_formMouseMoved

    private void jButtonpausaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonpausaActionPerformed
        if (tiempo.isStarted()) {
            tiempo.suspend();
            jButtonpausa.setText("Reanudar");

        } else {
            tiempo.start();
            jButtonpausa.setText("Pausa");
        }
    }//GEN-LAST:event_jButtonpausaActionPerformed

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

        if (tiempo.isStarted()) {
            this.setEnabled(false);
            this.setFocusable(false);
            jDialog2.setVisible(true);
            jDialog2.setResizable(false);
            jDialog2.setFocusableWindowState(true);
            int i = 0;
            for (int j = 0; j < combinacionsecreta.length(); j++) {
                if (j == 0) {
                    switch ((char) combinacionsecreta.charAt(i)) {
                    case 'r':
                        jLabel11clavesecreta.setIcon(ROJO);
                        break;
                    case 'a':
                        jLabel11clavesecreta.setIcon(AZUL);
                        break;
                    case 'v':
                        jLabel11clavesecreta.setIcon(VERDE);
                        break;
                    case 'y':
                        jLabel11clavesecreta.setIcon(AMARILLO);
                        break;
                    case 'n':
                        jLabel11clavesecreta.setIcon(NARANJA);
                        break;
                    case 'g':
                        jLabel11clavesecreta.setIcon(GRIS);
                    }
                }
                if (j == 1) {
                    switch ((char) combinacionsecreta.charAt(i)) {
                    case 'r':
                        jLabel12clavesecreta.setIcon(ROJO);
                        break;
                    case 'a':
                        jLabel12clavesecreta.setIcon(AZUL);
                        break;
                    case 'v':
                        jLabel12clavesecreta.setIcon(VERDE);
                        break;
                    case 'y':
                        jLabel12clavesecreta.setIcon(AMARILLO);
                        break;
                    case 'n':
                        jLabel12.setIcon(NARANJA);
                        break;
                    case 'g':
                        jLabel12.setIcon(GRIS);
                    }
                }
                if (j == 2) {
                    switch ((char) combinacionsecreta.charAt(i)) {
                    case 'r':
                        jLabel13clavesecreta.setIcon(ROJO);
                        break;
                    case 'a':
                        jLabel13clavesecreta.setIcon(AZUL);
                        break;
                    case 'v':
                        jLabel13clavesecreta.setIcon(VERDE);
                        break;
                    case 'y':
                        jLabel13clavesecreta.setIcon(AMARILLO);
                        break;
                    case 'n':
                        jLabel13clavesecreta.setIcon(NARANJA);
                        break;
                    case 'g':
                        jLabel13.setIcon(GRIS);
                    }
                }
                if (j == 3) {
                    switch ((char) combinacionsecreta.charAt(i)) {
                    case 'r':
                        jLabel14clavesecreta.setIcon(ROJO);
                        break;
                    case 'a':
                        jLabel14clavesecreta.setIcon(AZUL);
                        break;
                    case 'v':
                        jLabel14clavesecreta.setIcon(VERDE);
                        break;
                    case 'y':
                        jLabel14clavesecreta.setIcon(AMARILLO);
                        break;
                    case 'n':
                        jLabel14clavesecreta.setIcon(NARANJA);
                        break;
                    case 'g':
                        jLabel14clavesecreta.setIcon(GRIS);
                    }
                }
                i++;
            }
        }

    }//GEN-LAST:event_jMenuItemclavesecretaActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        this.setEnabled(true);
        this.setFocusable(true);
        jDialog2.setVisible(false);
        jDialog2.setResizable(true);
        jDialog2.setFocusableWindowState(false);
    }//GEN-LAST:event_jButton1ActionPerformed

    /**
     * @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 | InstantiationException | IllegalAccessException
                | javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(main.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        //</editor-fold>

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

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButtonaceptarnivel;
    private javax.swing.JButton jButtonamarillo;
    private javax.swing.JButton jButtonazul;
    private javax.swing.JButton jButtoncomprobar;
    private javax.swing.JButton jButtongris;
    private javax.swing.JButton jButtonnaranja;
    private javax.swing.JButton jButtonpausa;
    private javax.swing.JButton jButtonretroceder;
    private javax.swing.JButton jButtonrojo;
    private javax.swing.JButton jButtonverde;
    private javax.swing.JCheckBox jCheckBoxrepeticion;
    private javax.swing.JComboBox jComboBoxnivel;
    private javax.swing.JDialog jDialog1;
    private javax.swing.JDialog jDialog2;
    private javax.swing.JFormattedTextField jFormattedTextFieldpuntuacion;
    private javax.swing.JFormattedTextField jFormattedTextFieldtiempo;
    private javax.swing.JInternalFrame jInternalFrameacercade;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel11clavesecreta;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel12clavesecreta;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel13clavesecreta;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel14clavesecreta;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel41;
    private javax.swing.JLabel jLabel42;
    private javax.swing.JLabel jLabel43;
    private javax.swing.JLabel jLabel44;
    private javax.swing.JLabel jLabel48;
    private javax.swing.JLabel jLabel49;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel50;
    private javax.swing.JLabel jLabel51;
    private javax.swing.JLabel jLabel52;
    private javax.swing.JLabel jLabel53;
    private javax.swing.JLabel jLabel54;
    private javax.swing.JLabel jLabel55;
    private javax.swing.JLabel jLabel56;
    private javax.swing.JLabel jLabel57;
    private javax.swing.JLabel jLabel58;
    private javax.swing.JLabel jLabel59;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel61;
    private javax.swing.JLabel jLabel62;
    private javax.swing.JLabel jLabel63;
    private javax.swing.JLabel jLabel64;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItemclavesecreta;
    private javax.swing.JMenuItem jMenuItemjugar;
    private javax.swing.JMenuItem jMenuItempreferencias;
    private javax.swing.JMenuItem jMenuItemsalir;
    private javax.swing.JMenu jMenuacercade;
    private javax.swing.JMenu jMenujugar;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel14;
    private javax.swing.JPanel jPanel15;
    private javax.swing.JPanel jPanel16;
    private javax.swing.JPanel jPanel17;
    private javax.swing.JPanel jPanel18;
    private javax.swing.JPanel jPanel19;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPaneintentos;
    private javax.swing.JTextArea jTextArea1;
    private javax.swing.JTextField jTextFieldresultadoA1;
    private javax.swing.JTextField jTextFieldresultadoA2;
    private javax.swing.JTextField jTextFieldresultadoA3;
    private javax.swing.JTextField jTextFieldresultadoA4;
    private javax.swing.JTextField jTextFieldresultadoA5;
    private javax.swing.JTextField jTextFieldresultadoA6;
    private javax.swing.JTextField jTextFieldresultadoAP1;
    private javax.swing.JTextField jTextFieldresultadoAP2;
    private javax.swing.JTextField jTextFieldresultadoAP3;
    private javax.swing.JTextField jTextFieldresultadoAP4;
    private javax.swing.JTextField jTextFieldresultadoAP5;
    private javax.swing.JTextField jTextFieldresultadoAP6;
    private javax.swing.JToggleButton jToggleButtoncomenzarparar;
    // End of variables declaration//GEN-END:variables
}