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

/*
 * jfrmPrincipal.java
 *
 * Created on 23-nov-2009, 13:07:46
 */

package BBUVAJAVA;

import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Adrian
 */
public class jfrmPrincipal extends javax.swing.JFrame {
    Sucursal suc = new Sucursal();

    /** Creates new form jfrmPrincipal */
    public jfrmPrincipal(Sucursal suc) {
        this.suc = suc;
        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() {

        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu4 = new javax.swing.JMenu();
        Salir = new javax.swing.JMenuItem();
        jMenu1 = new javax.swing.JMenu();
        Ingreso = new javax.swing.JMenuItem();
        jSeparator1 = new javax.swing.JSeparator();
        Reintegro = new javax.swing.JMenuItem();
        jSeparator2 = new javax.swing.JSeparator();
        remesacargo = new javax.swing.JMenuItem();
        jSeparator3 = new javax.swing.JSeparator();
        remesaabono = new javax.swing.JMenuItem();
        jSeparator11 = new javax.swing.JSeparator();
        transferencia = new javax.swing.JMenuItem();
        jMenu2 = new javax.swing.JMenu();
        vercuentas = new javax.swing.JMenuItem();
        jSeparator5 = new javax.swing.JSeparator();
        jMenuItem10 = new javax.swing.JMenuItem();
        jSeparator6 = new javax.swing.JSeparator();
        jMenuItem11 = new javax.swing.JMenuItem();
        jSeparator7 = new javax.swing.JSeparator();
        jverdomi = new javax.swing.JMenuItem();
        jMenu3 = new javax.swing.JMenu();
        jMenu5 = new javax.swing.JMenu();
        libreta = new javax.swing.JMenuItem();
        cuenta = new javax.swing.JMenuItem();
        jMenu6 = new javax.swing.JMenu();
        personal = new javax.swing.JMenuItem();
        hipotecario = new javax.swing.JMenuItem();
        jMpuesto = new javax.swing.JMenu();
        jmenuar = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 48));
        jLabel1.setForeground(new java.awt.Color(51, 0, 0));
        jLabel1.setText("BBUVA");

        jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/bbuvajava/Banco.gif"))); // NOI18N

        jMenu4.setText("Archivo");

        Salir.setText("Salir");
        Salir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                SalirActionPerformed(evt);
            }
        });
        jMenu4.add(Salir);

        jMenuBar1.add(jMenu4);

        jMenu1.setText("Operaciones");

        Ingreso.setText("Ingreso");
        Ingreso.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                IngresoActionPerformed(evt);
            }
        });
        jMenu1.add(Ingreso);
        jMenu1.add(jSeparator1);

        Reintegro.setText("Reintegro");
        Reintegro.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ReintegroActionPerformed(evt);
            }
        });
        jMenu1.add(Reintegro);
        jMenu1.add(jSeparator2);

        remesacargo.setText("Remesa cargo");
        remesacargo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                remesacargoActionPerformed(evt);
            }
        });
        jMenu1.add(remesacargo);
        jMenu1.add(jSeparator3);

        remesaabono.setText("Remesa abono");
        remesaabono.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                remesaabonoActionPerformed(evt);
            }
        });
        jMenu1.add(remesaabono);
        jMenu1.add(jSeparator11);

        transferencia.setText("Transferencia");
        transferencia.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                transferenciaActionPerformed(evt);
            }
        });
        jMenu1.add(transferencia);

        jMenuBar1.add(jMenu1);

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

        vercuentas.setText("Ver cuentas de un cliente");
        vercuentas.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                vercuentasActionPerformed(evt);
            }
        });
        jMenu2.add(vercuentas);
        jMenu2.add(jSeparator5);

        jMenuItem10.setText("Ver movimientos de una cuenta");
        jMenuItem10.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem10ActionPerformed(evt);
            }
        });
        jMenu2.add(jMenuItem10);
        jMenu2.add(jSeparator6);

        jMenuItem11.setText("Ver movimiento en detalle");
        jMenuItem11.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem11ActionPerformed(evt);
            }
        });
        jMenu2.add(jMenuItem11);
        jMenu2.add(jSeparator7);

        jverdomi.setText("Ver domiciliaciones de una cuenta");
        jverdomi.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jverdomiActionPerformed(evt);
            }
        });
        jMenu2.add(jverdomi);

        jMenuBar1.add(jMenu2);

        jMenu3.setText("Contratar productos");

        jMenu5.setText("Nueva cuenta");

        libreta.setText("Libreta de ahorro");
        libreta.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                libretaActionPerformed(evt);
            }
        });
        jMenu5.add(libreta);

        cuenta.setText("Cuenta corriente");
        cuenta.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cuentaActionPerformed(evt);
            }
        });
        jMenu5.add(cuenta);

        jMenu3.add(jMenu5);

        jMenu6.setText("Nuevo prestamo");

        personal.setText("Prestamo personal");
        personal.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                personalActionPerformed(evt);
            }
        });
        jMenu6.add(personal);

        hipotecario.setText("Prestamo hipotecario");
        hipotecario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                hipotecarioActionPerformed(evt);
            }
        });
        jMenu6.add(hipotecario);

        jMenu3.add(jMenu6);

        jMenuBar1.add(jMenu3);

        jMpuesto.setText("Gestion del Puesto");
        jMpuesto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMpuestoActionPerformed(evt);
            }
        });

        jmenuar.setText("Arqueo y envio");
        jmenuar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmenuarActionPerformed(evt);
            }
        });
        jMpuesto.add(jmenuar);

        jMenuBar1.add(jMpuesto);

        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()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(76, 76, 76)
                        .addComponent(jLabel2))
                    .addComponent(jLabel1))
                .addContainerGap(100, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGap(50, 50, 50)
                .addComponent(jLabel2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 41, Short.MAX_VALUE)
                .addComponent(jLabel1))
        );

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

    private void IngresoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_IngresoActionPerformed
        // TODO add your handling code here:
        //this.setVisible(false);
        //Ing.setVisible(true);
        new jfrmIngreso(this.suc,this).setVisible(true); //creamos uno ingreso
        this.setEnabled(false); //el principal queda desabilitado
}//GEN-LAST:event_IngresoActionPerformed

    private void ReintegroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ReintegroActionPerformed
        // TODO add your handling code here:
        //this.setVisible(false);
        //Rein.setVisible(true);
        new jfrmReintegro(this.suc,this).setVisible(true);
        this.setEnabled(false);
}//GEN-LAST:event_ReintegroActionPerformed

    private void SalirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SalirActionPerformed
        this.dispose(); //para cerrar el programa
}//GEN-LAST:event_SalirActionPerformed

    private void remesacargoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_remesacargoActionPerformed
        // TODO add your handling code here:
        new jfrmRemesaCargos(this.suc,this).setVisible(true);
        this.setEnabled(false);

    }//GEN-LAST:event_remesacargoActionPerformed

    private void vercuentasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_vercuentasActionPerformed
        new jfrmCuentasCliente1(this.suc,this).setVisible(true);
        this.setEnabled(false);
}//GEN-LAST:event_vercuentasActionPerformed

    private void transferenciaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_transferenciaActionPerformed
       new jfrmTransferencias(this.suc,this).setVisible(true);
       this.setEnabled(false);
}//GEN-LAST:event_transferenciaActionPerformed

    private void remesaabonoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_remesaabonoActionPerformed
        // TODO add your handling code here:

}//GEN-LAST:event_remesaabonoActionPerformed

    private void jMenuItem10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem10ActionPerformed
        new jfrmCuentasCliente1(this.suc,this).setVisible(true);
        this.setEnabled(false);                // TODO add your handling code here:
    }//GEN-LAST:event_jMenuItem10ActionPerformed

    private void libretaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_libretaActionPerformed
        // TODO add your handling code here:
         new jfrmLibreta(this.suc,this).setVisible(true);
         this.setEnabled(false);
    }//GEN-LAST:event_libretaActionPerformed

    private void cuentaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cuentaActionPerformed
        // TODO add your handling code here:
        new jfrmCuenta(this.suc,this).setVisible(true);
        this.setEnabled(false);
    }//GEN-LAST:event_cuentaActionPerformed

    private void personalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_personalActionPerformed
        // TODO add your handling code here:
        new jfrmPersonal(this.suc,this).setVisible(true);
        this.setEnabled(false);
    }//GEN-LAST:event_personalActionPerformed

    private void hipotecarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_hipotecarioActionPerformed
        // TODO add your handling code here:
         new jfrmHipotecario(this.suc,this).setVisible(true);
         this.setEnabled(false);
    }//GEN-LAST:event_hipotecarioActionPerformed

    private void jMenu2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenu2ActionPerformed
    new jfrmCuentasCliente1(this.suc,this).setVisible(true);
        this.setEnabled(false);
    }//GEN-LAST:event_jMenu2ActionPerformed

    private void jverdomiActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jverdomiActionPerformed
      new jfrmVerDomicializacion(this.suc,this).setVisible(true);
      this.setEnabled(false);
    }//GEN-LAST:event_jverdomiActionPerformed

    private void jMenuItem11ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem11ActionPerformed
     new jfrmCuentasCliente1(this.suc,this).setVisible(true);
        this.setEnabled(false);        
    }//GEN-LAST:event_jMenuItem11ActionPerformed

    private void jMpuestoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMpuestoActionPerformed
    
    }//GEN-LAST:event_jMpuestoActionPerformed

    private void jmenuarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmenuarActionPerformed
     new jfrmGestioPuesto(this.suc,this).setVisible(true);
    this.setEnabled(false);        // TODO add your handling code here:
    }//GEN-LAST:event_jmenuarActionPerformed

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

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenuItem Ingreso;
    private javax.swing.JMenuItem Reintegro;
    private javax.swing.JMenuItem Salir;
    private javax.swing.JMenuItem cuenta;
    private javax.swing.JMenuItem hipotecario;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenu jMenu3;
    private javax.swing.JMenu jMenu4;
    private javax.swing.JMenu jMenu5;
    private javax.swing.JMenu jMenu6;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem10;
    private javax.swing.JMenuItem jMenuItem11;
    private javax.swing.JMenu jMpuesto;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator11;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JSeparator jSeparator3;
    private javax.swing.JSeparator jSeparator5;
    private javax.swing.JSeparator jSeparator6;
    private javax.swing.JSeparator jSeparator7;
    private javax.swing.JMenuItem jmenuar;
    private javax.swing.JMenuItem jverdomi;
    private javax.swing.JMenuItem libreta;
    private javax.swing.JMenuItem personal;
    private javax.swing.JMenuItem remesaabono;
    private javax.swing.JMenuItem remesacargo;
    private javax.swing.JMenuItem transferencia;
    private javax.swing.JMenuItem vercuentas;
    // End of variables declaration//GEN-END:variables

}
