You are on page 1of 36

c 


     
  
         
V


 V VVV
 V
 VVVVV

     
V VV
VVV VV

   
   VV VV!V
V

V
2 2 
V


  VVV
V V VV V
 VŒ£ £ V   V V V


 V   V V V  V
V V 
V V V V  V

 V V V V

 VVV   VVVV V V !  V 
VVV ! V V
 
 V V  V
V V

V
 V V  V 
 V  V V 
 V 
V V  V V "
 V !! V
 
V  VV#
!V
VV
V
 V VV! V V$ VV V
VVV V!V! VVV
VV V V

V V  V#V## V
VV V#
 V# V V
VV VVV V VV

V VV V#   V
    V

V  V V   V  V V  V  V  V V    V
V%V  V V V V
 V
 V

& V 
 V V

V  
 V V %V   V V 
 V
 
 V&V
VVV V%V V
VV  VV  
 V

V!V VV V V  V VV!V#V VV


V   V
V  V   V
 V

' V   V  V V  V 


 V V %  V "( V V  V 
 V V  V
   V

V
V
V
·
  
V

&V  V V  V  


V  V V 
V V  
 V V V 
V V
V
VV  V
 V V V  
 V VV  V VVV
V
V

 
V

V !) VV V  V VV% VVV


VV  VVV V

 V
V!VV VV
VVV
V( VV  V

  

V

V V  
V V 
V V  V  V   V V   V V
) V
 VV 
 V

V
 

á
 VVV
V .VV
V V

V +V ,V
V -V
V
+V +V ,V
V

V -V
,V
V
+.V +V -V ,V
V

V V
+.V +.V
V /V +V 0V
V

V
,V - V+.V +V - V+.V ,V
V

-V
V
+V 1V
V
- +V .V +V
V

,V
V

V
, V- V+.V
2V
V

V
+ V, V- V+.V
V

V
*V
V
á á V4 4&V5V&V464V'$Vá 7V
V

.V 3V
,+V ! !   V
+V        V
,,V ! !   !V
,V        !V ,/V ! !   V
/V        V
,0V ! !   V
0V        V
V
V +.V
+V
,-V !  !  V
-V       !V
,1V !  !  !V
1V       V ,2V !  !  V
2V       V
,*V !  !  V
V
V
,V ++V
*V      V
,3V !   ! V
3V      V
/.V !   ! !V
V /+V !   ! V
/V
/,V !   ! V
+.V    V
V
++V    V +,V
V
//V !    !V
0V
/0V !    V
+,V   V /-V !    V
+/V   V
V
V
+/V
-V /1V  ! !  V
+0V  V
/2V  ! !  !V
V
/*V  ! !  V
1V /3V  ! !  V
+-V V
V
V
+0V
2V 0.V  !  ! V
+1VV
0+V  !  ! !V
V
0,V  !  ! V
*V 0/V  !  ! V
+2V !     V
V
+*V !     !V
+-V
+3V !     V
00V  !   !V
,.V !     V
0-V  !   V
V 01V  !   V
V
V
+1V ,,V
02V   ! ! V 2.V   V
0*V   ! ! !V 2+V   !V
03V   ! ! V 2,V   V
-.V   ! ! V 2/V   V
V V
+2V ,/V
-+V   !  !V 20V   V
-,V   !  V 2-V   !V
-/V   !  V 21V   V
V 22V   V
V V
0,V ,0V
-0V    ! !V 2*V   V
--V    ! V 23V   V
-1V    ! V V
V ,-V
+*V *.V  !V
-2V ! ! ! V *+V  V
-*V ! ! ! !V *,V  V
-3V ! ! ! V V
1.V ! ! ! V ,1V
V */V!      V
+3V *0V!      !V
1+V !  ! !V *-V!      V
1,V !  ! V *1V!      V
1/V !  ! V V
V ,2V
,.V *2V! !    V
10V ! !  !V **V! !    !V
1-V ! !  V *3V! !    V
11V ! !  V 3.V! !    V
V V
,+V ,*V
12V  ! ! !V 3+V!  !   V
1*V  ! ! V 3,V!  !   !V
13V  ! ! V 3/V!  !   V
V 30V!  !   V
V V
V V
V V
V V
,3V V /0V
3-V!   !  V ++0V !   ! !V
31V!   !  !V ++-V !   ! V
32V!   !  V ++1V !   ! V
3*V!   !  V V V
V V /-V
/.V ++2V ! ! ! !V
33V !    ! V V
+..V !    ! !V V /1V
+.+V !    ! V ++*V !  V
+.,V !    ! V ++3V !  !V
V V +,.V !  V
V /+V +,+V !  V
+./V !     !V V /2V
+.0V !     V +,,V ! V
+.-V !     V V
V V /*V
V /,V +,/V    V
+.1V ! ! !  V +,0V    !V
+.2V ! ! !  !V +,-V    V
+.*V ! ! !  V +,1V    V
+.3V ! ! !  V V V
V V V /3V
V //V +,2V   !V
++.V !  ! ! V +,*V   V
+++V !  ! ! !V +,3V   V
++,V !  ! ! V V
++/V !  ! ! V V 0.V
V +/.V  ! V
V +/+V  ! !V
V +/,V  ! V
V V V
V V 0+V
V +//V  V
V +/0V  V
V
V

V
>>Vá  VVVVá VVVV
VVV
VV  V VVV
VV
V

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

/*
* Interfase.java
*
* Created on 2/10/2010, 12:29:06 PM
*/

package automata;

import java.awt.Component;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;

/**
*
* @author Ivan
*/
public class Interfase extends javax.swing.JFrame {

int cambio,dinero_maquina, dinero_ingresado, latas_maquina;


String cadena;
//JPanel dibuja = new JPanel();
JLabel dibuja = new JLabel();
ImageIcon[] latas = {

new
ImageIcon(getClass().getResource("/Iconos/lata_coca.jpg")),
//new ImageIcon("img\\spriteZero -lata.gif"),
new
ImageIcon(getClass().getResource("/Iconos/lata_fanta.jpg")),
new
ImageIcon(getClass().getResource("/Iconos/lata_sprite.jpg")),
new
ImageIcon(getClass().getResource("/Iconos/lata_sangria.jpg")),
new
ImageIcon(getClass().getResource("/Iconos/lata_manzana.jpg")),
new
ImageIcon(getClass().getResource("/Iconos/lata_coca_light.jpg"))
};
ImageIcon[] automata = {

new
ImageIcon(getClass().getResource("/Iconos/dibuja/0 aaaaaaaa.jpg")),//0
//new ImageIcon("img\\spriteZero -lata.gif"),
new
ImageIcon(getClass().getResource("/Iconos/dibuja/1 aaaaaab.jpg")),//1
new
ImageIcon(getClass().getResource("/Iconos/dibuja/2 aaaaac.jpg")),//2
new
ImageIcon(getClass().getResource("/Iconos/dibuja/3 aaaac.jpg")),//3
new
ImageIcon(getClass().getResource("/Iconos/dibuja/4 aaac.jpg")),//4
new
ImageIcon(getClass().getResource("/Iconos/dibuja/5 aad.jpg")),//5
new
ImageIcon(getClass().getResource("/Iconos/dibuja/6 ad.jpg")),//6
new
ImageIcon(getClass().getResource("/Iconos/dibuja/7 d.jpg")),//7
new
ImageIcon(getClass().getResource("/Iconos/dibuja/8 abaaaaa.jpg")),//8
new
ImageIcon(getClass().getResource("/Iconos/dibuja/9 abbaaa.jpg")),//9
new
ImageIcon(getClass().getResource("/Iconos/dibuja/10 ababaa.jpg")),//10
new
ImageIcon(getClass().getResource("/Iconos/dibuja/11 abaaba.jpg")),//11
new
ImageIcon(getClass().getResource("/Iconos/dibuja/12 abaaab.jpg")),//12
new
ImageIcon(getClass().getResource("/Iconos/dibuja/13 aabbaa.jpg")),//13
new
ImageIcon(getClass().getResource("/Iconos/dibuja/14 aababa.jpg")),//14
new
ImageIcon(getClass().getResource("/Iconos/dibuja/15 aabaab.jpg")),//15
new
ImageIcon(getClass().getResource("/Iconos/dibuja/16 aaabba.jpg")),//16
new
ImageIcon(getClass().getResource("/Iconos/dibuja/17 aaabab.jpg")),//17
new
ImageIcon(getClass().getResource("/Iconos/dibuja/18 abbba.jpg")),//18
new
ImageIcon(getClass().getResource("/Iconos/dibuja/19 ababb.jpg")),//19
new
ImageIcon(getClass().getResource("/Iconos/dibuja/20 abbab.jpg")),//20
new
ImageIcon(getClass().getResource("/Iconos/dibuja/21 aabbb.jpg")),//21
new
ImageIcon(getClass().getResource("/Iconos/dibuja/22 acaa.jpg")),//22
new
ImageIcon(getClass().getResource("/Iconos/dibuja/23 aaca.jpg")),//23
new
ImageIcon(getClass().getResource("/Iconos/dibuja/24 aaac.jpg")),//24
new
ImageIcon(getClass().getResource("/Iconos/dibuja/25 acb.jpg")),//25
new
ImageIcon(getClass().getResource("/Iconos/dibuja/26 baaaaaa.jpg")),//26
new
ImageIcon(getClass().getResource("/Iconos/dibuja/27 bbaaaa.jpg")),//27
new
ImageIcon(getClass().getResource("/Iconos/dibuja/28 babaaa.jpg")),//28
new
ImageIcon(getClass().getResource("/Iconos/dibuja/29 baabaa.jpg")),//29
new
ImageIcon(getClass().getResource("/Iconos/dibuja/30 baaaba.jpg")),//30
new
ImageIcon(getClass().getResource("/Iconos/dibuja/31 baaaab.jpg")),//31
new
ImageIcon(getClass().getResource("/Iconos/dibuja/32 bbbaa.jpg")),//32
new
ImageIcon(getClass().getResource("/Iconos/dibuja/33 babba.jpg")),//33
new
ImageIcon(getClass().getResource("/Iconos/dibuja/34 baabb.jpg")),//34
new
ImageIcon(getClass().getResource("/Iconos/dibuja/35 bbbb.jpg")),//35
new
ImageIcon(getClass().getResource("/Iconos/dibuja/36 bca.jpg")),//36
new
ImageIcon(getClass().getResource("/Iconos/dibuja/37 bd.jpg")),//37
new
ImageIcon(getClass().getResource("/Iconos/dibuja/38 caaa.jpg")),//38
new
ImageIcon(getClass().getResource("/Iconos/dibuja/39 cab.jpg")),//39
new
ImageIcon(getClass().getResource("/Iconos/dibuja/40 cba.jpg")),//40
new
ImageIcon(getClass().getResource("/Iconos/dibuja/41 cc.jpg")),//41
new
ImageIcon(getClass().getResource("/Iconos/dibuja/42 aaaabb.jpg")),//42
};

/** Creates new form Interfase */


public Interfase() {
initComponents();

dinero_maquina=300;
latas_maquina=100;
cadena="";

btn_toma_y_recoge.setEnabled(false);
btn_coca.setVisible(false);
btn_fanta.setVisible(false);
btn_sprite.setVisible(false);
btn_sangria.setVisible(false);
btn_manzana.setVisible(false);
btn_coca_light.setVisible(false);
btn_seguir.setVisible(false);
btn_dibuja_automata.setVisible(false);
pnl_recoge.setVisible(false);

lbl_cambio.setText("$");
lbl_ingresado.setText("$");
lbl_dinero_maquina.setText("$"+dinero_maquina);
lbl_latas.setText(""+latas_maquina);

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

btn_1_peso = new javax.swing.JButton();


btn_2_pesos = new javax.swing.JButton();
btn_5_pesos = new javax.swing.JButton();
btn_10_pesos = new javax.swing.JButton();
jLabel1 = new javax.swing.JLabel();
lbl_dinero_maquina = new javax.swing.JLabel();
lbl_latas = new javax.swing.JLabel();
lbl_ingresado = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();
btn_toma_y_recoge = new javax.swing.JButton();
btn_coca = new javax.swing.JButton();
btn_fanta = new javax.swing.JButton();
btn_sprite = new javax.swing.JButton();
btn_sangria = new javax.swing.JButton();
jLabel4 = new javax.swing.JLabel();
lbl_cambio = new javax.swing.JLabel();
btn_seguir = new javax.swing.JButton();
btn_manzana = new javax.swing.JButton();
btn_coca_light = new javax.swing.JButton();
pnl_recoge = new javax.swing.JPanel();
lbl_recoge = new javax.swing.JLabel();
btn_dibuja_automata = new javax.swing.JButton();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setBounds(new java.awt.Rectangle(0, 0, 0, 0));

btn_1_peso.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/Iconos/un_patipeso.png")))
; // NOI18N
btn_1_peso.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(java.awt.event.ActionEvent evt) {
btn_1_pesoActionPerformed(evt);
}
});

btn_2_pesos.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/Iconos/dos_patipesos.png")
)); // NOI18N
btn_2_pesos.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(java.awt.event.ActionEvent evt) {
btn_2_pesosActionPerformed(evt);
}
});

btn_5_pesos.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/Iconos/cinco_patipesos.png
"))); // NOI18N
btn_5_pesos.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(java.awt.event.ActionEvent evt) {
btn_5_pesosActionPerformed(evt);
}
});

btn_10_pesos.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/Iconos/diez_patipesos.png"
))); // NOI18N
btn_10_pesos.addActionListener(new
java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btn_10_pesosActionPerformed(evt);
}
});

jLabel1.setText("Ingresa Dinero");

lbl_dinero_maquina.setText(".");

lbl_latas.setText(".");

lbl_ingresado.setText(".");

jLabel2.setText("Dinero inside");

jLabel3.setText("Latas");

jLabel5.setText("Dinero insertado");

btn_toma_y_recoge.setText("Tomar cambio y elegir Refresco");


btn_toma_y_recoge.addActionListener(new
java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btn_toma_y_recogeActionPerformed(evt);
}
});

btn_coca.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/Iconos/logo_coca.jpg")));
// NOI18N
btn_coca.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btn_cocaActionPerformed(evt);
}
});

btn_fanta.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/Iconos/logo_fanta.jpg")));
// NOI18N
btn_fanta.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btn_fantaActionPerformed(evt);
}
});

btn_sprite.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/Iconos/logo_sprite.jpg")))
; // NOI18N
btn_sprite.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(java.awt.event.ActionEvent evt) {
btn_spriteActionPerformed(evt);
}
});

btn_sangria.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/Iconos/logo_sangria.jpg"))
); // NOI18N
btn_sangria.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(java.awt.event.ActionEvent evt) {
btn_sangriaActionPerformed(evt);
}
});

jLabel4.setText("Su cambio:");

lbl_cambio.setText(".");

btn_seguir.setText("Seguir comprando");
btn_seguir.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(java.awt.event.ActionEvent evt) {
btn_seguirActionPerformed(evt);
}
});

btn_manzana.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/Iconos/logo_manzana.jpg"))
); // NOI18N
btn_manzana.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(java.awt.event.ActionEvent evt) {
btn_manzanaActionPerformed(evt);
}
});

btn_coca_light.setIcon(new
javax.swing.ImageIcon(getClass().getResource("/Iconos/logo_coca_ligth.jpg
"))); // NOI18N
btn_coca_light.addActionListener(new
java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btn_coca_lightActionPerformed(evt);
}
});
pnl_recoge.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.sw
ing.border.BevelBorder.LOWERED));

javax.swing.GroupLayout pnl_recogeLayout = new


javax.swing.GroupLayout(pnl_recoge);
pnl_recoge.setLayout(pnl_recogeLayout);
pnl_recogeLayout.setHorizontalGroup(

pnl_recogeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LE
ADING)
.addGroup(pnl_recogeLayout.createSequentialGroup()
.addContainerGap()
.addComponent(lbl_recoge,
javax.swing.GroupLayout.DEFAULT_SIZE, 152, Short.MAX_VALUE)
.addContainerGap())
);
pnl_recogeLayout.setVerticalGroup(

pnl_recogeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LE
ADING)
.addComponent(lbl_recoge,
javax.swing.GroupLayout.DEFAULT_SIZE, 257, Short.MAX_VALUE)
);

btn_dibuja_automata.setText("Dibujar automata");
btn_dibuja_automata.addActionListener(new
java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btn_dibuja_automataActionPerformed(evt);
}
});

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.LE
ADING)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TR
AILING, false)
.addComponent(btn_coca_light,
javax.swing.GroupLayout.Alignment.LEADING, 0, 0, Short.MAX_VALUE)
.addComponent(btn_manzana,
javax.swing.GroupLayout.Alignment.LEADING, 0, 0, Short.MAX_VALUE)
.addComponent(btn_sangria,
javax.swing.GroupLayout.Alignment.LEADING, 0, 0, Short.MAX_VALUE)
.addComponent(btn_sprite,
javax.swing.GroupLayout.Alignment.LEADING, 0, 0, Short.MAX_VALUE)
.addComponent(btn_fanta,
javax.swing.GroupLayout.Alignment.LEADING, 0, 0, Short.MAX_VALUE)
.addComponent(btn_coca,
javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.PREFERRED_SIZE, 116, Short.MAX_VALUE))
.addComponent(pnl_recoge,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(layout.createSequentialGroup()
.addComponent(btn_seguir)
.addGap(18, 18, 18)
.addComponent(btn_dibuja_automata)))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LE
ADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LE
ADING)

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TR
AILING, false)
.addComponent(btn_5_pesos,
javax.swing.GroupLayout.Alignment.LEADING, 0, 0, Short.MAX_VALUE)
.addComponent(btn_1_peso,
javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.PREFERRED_SIZE, 153, Short.MAX_VALUE)
.addComponent(jLabel1))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LE
ADING)
.addComponent(btn_2_pesos,
javax.swing.GroupLayout.PREFERRED_SIZE, 145,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(btn_10_pesos,
javax.swing.GroupLayout.PREFERRED_SIZE, 145,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(142, 142, 142))

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TR
AILING)

.addGroup(layout.createSequentialGroup()
.addGap(18, 18, 18)
.addComponent(jLabel2))
.addComponent(jLabel3)
.addComponent(jLabel5))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LE
ADING, false)
.addComponent(lbl_dinero_maquina,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(lbl_latas,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(lbl_ingresado,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
layout.createSequentialGroup()
.addGap(105, 105, 105)
.addComponent(jLabel4)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(lbl_cambio,
javax.swing.GroupLayout.PREFERRED_SIZE, 85,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(46, 46, 46)))
.addContainerGap())
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
layout.createSequentialGroup()
.addComponent(btn_toma_y_recoge)
.addGap(71, 71, 71))))
);
layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel1)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LE
ADING)
.addGroup(layout.createSequentialGroup()

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btn_coca,
javax.swing.GroupLayout.PREFERRED_SIZE, 41,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btn_fanta,
javax.swing.GroupLayout.PREFERRED_SIZE, 42,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(btn_sprite,
javax.swing.GroupLayout.PREFERRED_SIZE, 43,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(btn_sangria,
javax.swing.GroupLayout.PREFERRED_SIZE, 43,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(36, 36, 36)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LE
ADING, false)
.addComponent(btn_2_pesos,
javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(btn_1_peso,
javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LE
ADING, false)
.addGroup(layout.createSequentialGroup()
.addComponent(btn_manzana)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btn_coca_light,
javax.swing.GroupLayout.PREFERRED_SIZE, 52,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(pnl_recoge,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BA
SELINE)
.addComponent(btn_seguir)
.addComponent(btn_dibuja_automata)))
.addGroup(layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LE
ADING)
.addComponent(btn_10_pesos)
.addComponent(btn_5_pesos))
.addGap(55, 55, 55)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BA
SELINE)
.addComponent(lbl_dinero_maquina)
.addComponent(jLabel2))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BA
SELINE)
.addComponent(lbl_latas)
.addComponent(jLabel3))
.addGap(18, 18, 18)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BA
SELINE)
.addComponent(lbl_ingresado)
.addComponent(jLabel5))
.addGap(18, 18, 18)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BA
SELINE)
.addComponent(lbl_cambio)
.addComponent(jLabel4))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(btn_toma_y_recoge)
.addGap(334, 334, 334))))
);

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

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

cambio=dinero_ingresado-8;
lbl_cambio.setText("$" +cambio);
latas_maquina=latas_maquina-1;

dinero_maquina=dinero_maquina-cambio;
lbl_dinero_maquina.setText("S"+dinero_maquina);

btn_coca.setVisible(true);
btn_fanta.setVisible(true);
btn_sprite.setVisible(true);
btn_sangria.setVisible(true);
btn_coca_light.setVisible(true);
btn_manzana.setVisible(true);
btn_toma_y_recoge.setEnabled(false);

pnl_recoge.setVisible(true);
lbl_latas.setText(""+ latas_maquina);

// TODO add your handling code here:


}//GEN-LAST:event_btn_toma_y_recogeActionPerformed
private void btn_1_pesoActionPerformed(java.awt.event.ActionEvent
evt) {//GEN-FIRST:event_btn_1_pesoActionPerformed

dinero_ingresado+=+1;

dinero_maquina+=+1;

cadena+="a";

if(dinero_ingresado>=8)
{
btn_1_peso.setEnabled(false);
btn_2_pesos.setEnabled(false);
btn_5_pesos.setEnabled(false);
btn_10_pesos.setEnabled(false);
btn_toma_y_recoge.setEnabled(true);
}

lbl_ingresado.setText("$"+ dinero_ingresado);
lbl_dinero_maquina.setText("$"+dinero_maquina);

// TODO add your handling code here:


}//GEN-LAST:event_btn_1_pesoActionPerformed

private void btn_2_pesosActionPerformed(java.awt.event.ActionEvent


evt) {//GEN-FIRST:event_btn_2_pesosActionPerformed

dinero_ingresado+=+2;

dinero_maquina+=+2;
cadena+="b";

if(dinero_ingresado>=8)
{
btn_1_peso.setEnabled(false);
btn_2_pesos.setEnabled(false);
btn_5_pesos.setEnabled(false);
btn_10_pesos.setEnabled(false);
btn_toma_y_recoge.setEnabled(true);
}

lbl_ingresado.setText("$"+ dinero_ingresado);
lbl_dinero_maquina.setText("$"+dinero_maquina);

// TODO add your handling code here:


}//GEN-LAST:event_btn_2_pesosActionPerformed

private void btn_5_pesosActionPerformed(java.awt.event.ActionEvent


evt) {//GEN-FIRST:event_btn_5_pesosActionPerformed

dinero_ingresado+=+5;

dinero_maquina+=+5;

cadena+="c";
//lbl_cadena.setText(cadena);

if(dinero_ingresado>=8)
{
btn_1_peso.setEnabled(false);
btn_2_pesos.setEnabled(false);
btn_5_pesos.setEnabled(false);
btn_10_pesos.setEnabled(false);
btn_toma_y_recoge.setEnabled(true);
}

lbl_ingresado.setText("$"+ dinero_ingresado);
lbl_dinero_maquina.setText("$"+dinero_maquina);
// TODO add your handling code here:

}//GEN-LAST:event_btn_5_pesosActionPerformed

private void btn_10_pesosActionPerformed(java.awt.event.ActionEvent


evt) {//GEN-FIRST:event_btn_10_pesosActionPerformed

dinero_ingresado+=+10;

dinero_maquina+=+10;
cadena+="d";

if(dinero_ingresado>=8)
{
btn_1_peso.setEnabled(false);
btn_2_pesos.setEnabled(false);
btn_5_pesos.setEnabled(false);
btn_10_pesos.setEnabled(false);
btn_toma_y_recoge.setEnabled(true);
}

lbl_ingresado.setText("$"+ dinero_ingresado);
lbl_dinero_maquina.setText("$"+dinero_maquina);

// TODO add your handling code here:


}//GEN-LAST:event_btn_10_pesosActionPerformed

private void btn_seguirActionPerformed(java.awt.event.ActionEvent


evt) {//GEN-FIRST:event_btn_seguirActionPerformed

btn_1_peso.setEnabled(true);
btn_2_pesos.setEnabled(true);
btn_5_pesos.setEnabled(true);
btn_10_pesos.setEnabled(true);
btn_toma_y_recoge.setEnabled(false);
btn_coca.setVisible(false);
btn_fanta.setVisible(false);
btn_sprite.setVisible(false);
btn_sangria.setVisible(false);
btn_coca_light.setVisible(false);
btn_manzana.setVisible(false);
btn_seguir.setVisible(false);
btn_dibuja_automata.setVisible(false);
pnl_recoge.setVisible(false);

dinero_ingresado=0;
lbl_ingresado.setText("$");
lbl_cambio.setText("$");
lbl_recoge.setIcon(null);
cadena="";

// TODO add your handling code here:


}//GEN-LAST:event_btn_seguirActionPerformed

private void btn_cocaActionPerformed(java.awt.event.ActionEvent evt)


{//GEN-FIRST:event_btn_cocaActionPerformed

lbl_recoge.setIcon(latas[0]);
btn_seguir.setVisible(true);

btn_coca.setVisible(false);
btn_coca_light.setVisible(false);
btn_fanta.setVisible(false);
btn_manzana.setVisible(false);
btn_sangria.setVisible(false);
btn_sprite.setVisible(false);
btn_dibuja_automata.setVisible(true);
// TODO add your handling code here:
}//GEN-LAST:event_btn_cocaActionPerformed

private void btn_fantaActionPerformed(java.awt.event.ActionEvent evt)


{//GEN-FIRST:event_btn_fantaActionPerformed

lbl_recoge.setIcon(latas[1]);
btn_seguir.setVisible(true);

btn_coca.setVisible(false);
btn_coca_light.setVisible(false);
btn_fanta.setVisible(false);
btn_manzana.setVisible(false);
btn_sangria.setVisible(false);
btn_sprite.setVisible(false);
btn_dibuja_automata.setVisible(true);
// TODO add your handling code here:
}//GEN-LAST:event_btn_fantaActionPerformed

private void btn_spriteActionPerformed(java.awt.event.ActionEvent


evt) {//GEN-FIRST:event_btn_spriteActionPerformed

lbl_recoge.setIcon(latas[2]);
btn_seguir.setVisible(true);

btn_coca.setVisible(false);
btn_coca_light.setVisible(false);
btn_fanta.setVisible(false);
btn_manzana.setVisible(false);
btn_sangria.setVisible(false);
btn_sprite.setVisible(false);
btn_dibuja_automata.setVisible(true);
// TODO add your handling code here:
}//GEN-LAST:event_btn_spriteActionPerformed

private void btn_sangriaActionPerformed(java.awt.event.ActionEvent


evt) {//GEN-FIRST:event_btn_sangriaActionPerformed

lbl_recoge.setIcon(latas[3]);
btn_seguir.setVisible(true);

btn_coca.setVisible(false);
btn_coca_light.setVisible(false);
btn_fanta.setVisible(false);
btn_manzana.setVisible(false);
btn_sangria.setVisible(false);
btn_sprite.setVisible(false);
btn_dibuja_automata.setVisible(true);
// TODO add your handling code here:
}//GEN-LAST:event_btn_sangriaActionPerformed

private void btn_manzanaActionPerformed(java.awt.event.ActionEvent


evt) {//GEN-FIRST:event_btn_manzanaActionPerformed

lbl_recoge.setIcon(latas[4]);
btn_seguir.setVisible(true);

btn_coca.setVisible(false);
btn_coca_light.setVisible(false);
btn_fanta.setVisible(false);
btn_manzana.setVisible(false);
btn_sangria.setVisible(false);
btn_sprite.setVisible(false);
btn_dibuja_automata.setVisible(true);

// TODO add your handling code here:


}//GEN-LAST:event_btn_manzanaActionPerformed

private void btn_coca_lightActionPerformed(java.awt.event.ActionEvent


evt) {//GEN-FIRST:event_btn_coca_lightActionPerformed

lbl_recoge.setIcon(latas[5]);
btn_seguir.setVisible(true);

btn_coca.setVisible(false);
btn_coca_light.setVisible(false);
btn_fanta.setVisible(false);
btn_manzana.setVisible(false);
btn_sangria.setVisible(false);
btn_sprite.setVisible(false);
btn_dibuja_automata.setVisible(true);

// TODO add your handling code here:


}//GEN-LAST:event_btn_coca_lightActionPerformed
private void
btn_dibuja_automataActionPerformed(java.awt.event.ActionEvent evt)
{//GEN-FIRST:event_btn_dibuja_automataActionPerformed

btn_dibuja_automata.setVisible(false);

if(cadena.equals("aaaaaaaa")||cadena.equals("aaaaaaab")||cadena.equals("a
aaaaaac")||cadena.equals("aaaaaaad"))
{
dibuja.setIcon(automata[0]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

if(cadena.equals("aaaaaab")||cadena.equals("aaaaaac")||cadena.equals("aaa
aaad"))
{
dibuja.setIcon(automata[1]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

if(cadena.equals("aaaaac")||cadena.equals("aaaaad"))
{
dibuja.setIcon(automata[2]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

if(cadena.equals("aaaac")||cadena.equals("aaaad"))
{
dibuja.setIcon(automata[3]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

if(cadena.equals("aaac")||cadena.equals("aaad"))
{
dibuja.setIcon(automata[4]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

if(cadena.equals("aad"))
{
dibuja.setIcon(automata[5]);
JFrame frame=new JFrame();
frame.setSize(500, 500);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

if(cadena.equals("ad"))
{
dibuja.setIcon(automata[6]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

if(cadena.equals("d"))
{
dibuja.setIcon(automata[7]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

if(cadena.equals("abaaaaa")||cadena.equals("abaaaab")||cadena.equals("aba
aaac")||cadena.equals("abaaaad"))
{
dibuja.setIcon(automata[8]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

if(cadena.equals("abbaaa")||cadena.equals("abbaab")||cadena.equals("abbaa
c")||cadena.equals("abbaad"))
{
dibuja.setIcon(automata[9]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

if(cadena.equals("ababaa")||cadena.equals("ababab")||cadena.equals("ababa
c")||cadena.equals("ababad"))
{
dibuja.setIcon(automata[10]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}
if(cadena.equals("abaaba")||cadena.equals("abaabb")||cadena.equals("abaab
c")||cadena.equals("abaabd"))
{
dibuja.setIcon(automata[11]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

if(cadena.equals("abaaab")||cadena.equals("abaaac")||cadena.equals("abaaa
d"))
{
dibuja.setIcon(automata[12]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

if(cadena.equals("aabbaa")||cadena.equals("aabbab")||cadena.equals("aabba
c")||cadena.equals("aabbad"))
{
dibuja.setIcon(automata[13]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

if(cadena.equals("aababa")||cadena.equals("aababb")||cadena.equals("aabab
c")||cadena.equals("aababd"))
{
dibuja.setIcon(automata[14]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

if(cadena.equals("aabaab")||cadena.equals("aabaac")||cadena.equals("aabaa
d"))
{
dibuja.setIcon(automata[15]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}
if(cadena.equals("aaabba")||cadena.equals("aaabbb")||cadena.equals("aaabb
c")||cadena.equals("aaabbd"))
{
dibuja.setIcon(automata[16]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

if(cadena.equals("aaabab")||cadena.equals("aaabac")||cadena.equals("aaaba
d"))
{
dibuja.setIcon(automata[17]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

if(cadena.equals("abbba")||cadena.equals("abbbb")||cadena.equals("abbbc")
||cadena.equals("abbbd"))
{
dibuja.setIcon(automata[18]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

if(cadena.equals("ababb")||cadena.equals("ababc")||cadena.equals("ababd")
)
{
dibuja.setIcon(automata[19]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

if(cadena.equals("abbab")||cadena.equals("abbac")||cadena.equals("abbad")
)
{
dibuja.setIcon(automata[20]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}
if(cadena.equals("aabbb")||cadena.equals("aabbc")||cadena.equals("aabbd")
)
{
dibuja.setIcon(automata[21]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

if(cadena.equals("acaa")||cadena.equals("acab")||cadena.equals("acac")||c
adena.equals("acad"))
{
dibuja.setIcon(automata[22]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

if(cadena.equals("aaca")||cadena.equals("aacb")||cadena.equals("aacc")||c
adena.equals("aacd"))
{
dibuja.setIcon(automata[23]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

if(cadena.equals("aaac")||cadena.equals("aaad"))
{
dibuja.setIcon(automata[24]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

if(cadena.equals("acb")||cadena.equals("acc")||cadena.equals("acd"))
{
dibuja.setIcon(automata[25]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

if(cadena.equals("baaaaaa")||cadena.equals("baaaaab")||cadena.equals("baa
aaac")||cadena.equals("baaaaad"))
{
dibuja.setIcon(automata[26]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

if(cadena.equals("bbaaaa")||cadena.equals("bbaaab")||cadena.equals("bbaaa
c")||cadena.equals("bbaaad"))
{
dibuja.setIcon(automata[27]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

if(cadena.equals("babaaa")||cadena.equals("babaab")||cadena.equals("babaa
c")||cadena.equals("babaad"))
{
dibuja.setIcon(automata[28]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

if(cadena.equals("baabaa")||cadena.equals("baabab")||cadena.equals("baaba
c")||cadena.equals("baabad"))
{
dibuja.setIcon(automata[29]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

if(cadena.equals("baaaba")||cadena.equals("baaabb")||cadena.equals("baaab
c")||cadena.equals("baaabd"))
{
dibuja.setIcon(automata[30]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

if(cadena.equals("baaaab")||cadena.equals("baaaac")||cadena.equals("baaaa
d"))
{
dibuja.setIcon(automata[31]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

if(cadena.equals("bbbaa")||cadena.equals("bbbab")||cadena.equals("bbbac")
||cadena.equals("bbbad"))
{
dibuja.setIcon(automata[32]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

if(cadena.equals("babba")||cadena.equals("babbb")||cadena.equals("babbc")
||cadena.equals("babbd"))
{
dibuja.setIcon(automata[33]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

if(cadena.equals("baabb")||cadena.equals("baabc")||cadena.equals("baabd")
)
{
dibuja.setIcon(automata[34]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

if(cadena.equals("bbbb"))
{
dibuja.setIcon(automata[35]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

if(cadena.equals("bca")||cadena.equals("bcb")||cadena.equals("bcc")||cade
na.equals("bcd"))
{
dibuja.setIcon(automata[36]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}
if(cadena.equals("bd"))
{
dibuja.setIcon(automata[37]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

if(cadena.equals("caaa")||cadena.equals("caab")||cadena.equals("caac")||c
adena.equals("caad"))
{
dibuja.setIcon(automata[38]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

if(cadena.equals("cab")||cadena.equals("cac")||cadena.equals("cad"))
{
dibuja.setIcon(automata[39]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

if(cadena.equals("cba")||cadena.equals("cbb")||cadena.equals("cbc"))
{
dibuja.setIcon(automata[40]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

if(cadena.equals("cc")||cadena.equals("cd"))
{
dibuja.setIcon(automata[41]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

if(cadena.equals("aaaabb")||cadena.equals("aaaabc")||cadena.equals("aaaab
d"))
{
dibuja.setIcon(automata[42]);
JFrame frame=new JFrame();
frame.setSize(500, 700);
frame.setVisible(true);
Component add = frame.add(dibuja);
}

// TODO add your handling code here:


}//GEN-LAST:event_btn_dibuja_automataActionPerformed

/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Interfase().setVisible(true);
}
});
}

// Variables declaration - do not modify//GEN-BEGIN:variables


private javax.swing.JButton btn_10_pesos;
private javax.swing.JButton btn_1_peso;
private javax.swing.JButton btn_2_pesos;
private javax.swing.JButton btn_5_pesos;
private javax.swing.JButton btn_coca;
private javax.swing.JButton btn_coca_light;
private javax.swing.JButton btn_dibuja_automata;
private javax.swing.JButton btn_fanta;
private javax.swing.JButton btn_manzana;
private javax.swing.JButton btn_sangria;
private javax.swing.JButton btn_seguir;
private javax.swing.JButton btn_sprite;
private javax.swing.JButton btn_toma_y_recoge;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel lbl_cambio;
private javax.swing.JLabel lbl_dinero_maquina;
private javax.swing.JLabel lbl_ingresado;
private javax.swing.JLabel lbl_latas;
private javax.swing.JLabel lbl_recoge;
private javax.swing.JPanel pnl_recoge;
// End of variables declaration//GEN-END:variables

V
V V V  
V  V V V 
V V V V  V
 V V  V  V
 
VV VV V
VVVV  V

& V VVV 8VV

ïV V  VVVV VV*V V


ïV V V VVV
VVVV
! V VV9/..VV V
ïV &V
VVV V VV
 VV+..V VV VVV

V
V%V  V V*V V VV
 VVV V
 V V#!VV!  V
V VV4
V
! V VV  V VV V!   VVVV  VV
#
V
 V  V
! V V VV#
V  VVV
 VV  VV
  V

VV

V
V %V V V   V #V  V  V  V  
V  V  V   V  V  V
V V
 V V!)VV
V

V
V V
 VV V V#!V V!   VV V V V
VVV V  VV  V

V
' V V
V!)VV
V V!VVVVVV VVV

 VVV
V  VVV  VV V

V
V