package Globales;
import villa1.*;
import Personajes.*;
/*
 * Cargar.java
 *
 * Created on 28-ago-2009, 0:18:44
 */

/**
 *
 * @author Xabier
 */
public class VisitVillas extends Inicio {
    /** Creates new form Cargar */
    public VisitVillas() {
        initComponents();
    }

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

        jPanel1 = new javax.swing.JPanel();
        labelVilla1 = new javax.swing.JButton();
        labelEleccion = new javax.swing.JLabel();
        labelVillas = new javax.swing.JLabel();
        labelVilla2 = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("RpG Java - Subir Nivel");

        labelVilla1.setText("Villa 1");
        labelVilla1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                labelVilla1ActionPerformed(evt);
            }
        });

        labelEleccion.setText("Que villa quieres visitar?");

        labelVillas.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
        labelVillas.setText(". Villas .");

        labelVilla2.setText("Villa 2");
        labelVilla2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                labelVilla2ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(25, 25, 25)
                        .addComponent(labelEleccion))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(45, 45, 45)
                        .addComponent(labelVillas))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(45, 45, 45)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(labelVilla2)
                            .addComponent(labelVilla1))))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(17, 17, 17)
                .addComponent(labelVillas)
                .addGap(18, 18, 18)
                .addComponent(labelEleccion)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(labelVilla1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(labelVilla2)
                .addGap(164, 164, 164))
        );

        labelVilla1.getAccessibleContext().setAccessibleName("btnSubir HP (+5)");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

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

    private void labelVilla1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_labelVilla1ActionPerformed
pers.posicion = 1;
        new villa1.NMenu().setVisible(true);// TODO add your handling code here:
    }//GEN-LAST:event_labelVilla1ActionPerformed

    private void labelVilla2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_labelVilla2ActionPerformed
pers.posicion = 2;
        new villa2.NMenu().setVisible(true);        // TODO add your handling code here:
    }//GEN-LAST:event_labelVilla2ActionPerformed

    /**
    * @param args the command line arguments
    */
   

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel jPanel1;
    private javax.swing.JLabel labelEleccion;
    private javax.swing.JButton labelVilla1;
    private javax.swing.JButton labelVilla2;
    private javax.swing.JLabel labelVillas;
    // End of variables declaration//GEN-END:variables

}
