@SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        dateChooserCombo1 = new datechooser.beans.DateChooserCombo();
        jScrollPane1 = new javax.swing.JScrollPane();
        TablaExportacion tablaExp=new TablaExportacion();
        jTable1 = new javax.swing.JTable();
        jProgressBar1 = new javax.swing.JProgressBar();
        ZonasDeDistribucion zon=new ZonasDeDistribucion();
        ArrayList lista=new ArrayList();
        Busquedas busZ=new ZonasDeDistribucion();
        jComboBox1 = new javax.swing.JComboBox();
        jLabel2 = new javax.swing.JLabel();
        AlertasDeRepartos al=new AlertasDeRepartos();
        Busquedas Bal=new AlertasDeRepartos();
        ArrayList listadoAlertas=new ArrayList();
        listadoAlertas=Bal.listar("");
        Iterator illL=listadoAlertas.listIterator();
        String nombreCombo=null;
        while(illL.hasNext()){
            al=(AlertasDeRepartos)illL.next();
            //    nombreCombo="checkBox1"+al.getNumeroDeAlertas();
            //nombreCombo=new javax.swing.JCheckBox();
            switch (al.getNumeroDeAlertas())
            {
                case 1:
                checkBox1 = new javax.swing.JCheckBox();
                jPanel2 = new javax.swing.JPanel();
                jButton2 = new javax.swing.JButton();
                jButton1 = new javax.swing.JButton();
                jButton4 = new javax.swing.JButton();
                jButton5 = new javax.swing.JButton();

                setClosable(true);
                setMaximizable(true);
                setTitle("Editor de Pedidos - SIDERCON - Operador :"+VisorDeHojaDeRuta.tG.getOperador());

                jLabel1.setText("Seleccione fecha de entrega :");

                dateChooserCombo1.addSelectionChangedListener(new datechooser.events.SelectionChangedListener() {
                    public void onSelectionChange(datechooser.events.SelectionChangedEvent evt) {
                        dateChooserCombo1OnSelectionChange(evt);
                    }
                });

                PedidosParaReparto ped=new PedidosParaReparto();
                jTable1.setModel(tablaExp);
                tablaExp.addColumn("Razon Social");
                tablaExp.addColumn("Reparto");
                tablaExp.addColumn("Proceso");
                tablaExp.addColumn("Asignacion");
                tablaExp.addColumn("Descripcion Articulo");
                tablaExp.addColumn("Cant. Pendiente");
                tablaExp.addColumn("Nro Pedido");
                tablaExp.addColumn("Fecha Asignada");
                tablaExp.addColumn("Eliminar");
                tablaExp.addColumn("Bloquear");
                tablaExp.addColumn("Cant s/fecha de ent. asig.");
                Object[] fila=new Object[11];
                Iterator il=listadoDePedidos.listIterator();
                int columna=0;
                while(il.hasNext()){
                    ped=(PedidosParaReparto)il.next();
                    fila[0]=ped.getRazonSocial();
                    Boolean reparto=true;
                    Boolean proceso=true;
                    Boolean eliminar=false;
                    Boolean asignacion=true;
                    if(ped.getMarcadoParaReparto()==0){
                        reparto=false;
                    }
                    if(ped.getMarcadoParaProceso()==0){
                        proceso=false;
                    }

                    fila[1]=reparto;
                    fila[2]=proceso;
                    fila[3]=asignacion;
                    fila[4]=ped.getDescripcionArticulo();
                    fila[5]=ped.getCantidadArticulo();
                    fila[6]=ped.getCodigoTangoDePedido();
                    fila[7]=ped.getFechaEnvio();
                    fechaPedido=ped.getFechaEnvio();
                    fila[8]=eliminar;
                    String validarComprobante=ped.getNumeroComprobante().substring(0,1);
                    validarComprobante.trim();
                    System.out.println(validarComprobante);
                    if((ped.getCantidadArticulo()==0) && (validarComprobante.equals("X"))){
                        fila[9]=true;
                    }else{
                        fila[9]=false;
                    }
                    fila[10]=0.00;
                    tablaExp.addRow(fila);
                    columna++;
                }
                recargarFormulario();
                this.jButton1.setEnabled(false);
                //this.jButton3.setEnabled(false);
                jTable1.addMouseListener(new java.awt.event.MouseAdapter() {
                    public void mouseClicked(java.awt.event.MouseEvent evt) {
                        jTable1MouseClicked(evt);
                    }
                });
                jScrollPane1.setViewportView(jTable1);

                lista=busZ.listar("");
                Iterator ilL=lista.listIterator();
                while(ilL.hasNext()){
                    zon=(ZonasDeDistribucion)ilL.next();
                    jComboBox1.addItem(zon.getDescripcionDeZona());
                }
                jComboBox1.addActionListener(new java.awt.event.ActionListener() {
                    public void actionPerformed(java.awt.event.ActionEvent evt) {
                        jComboBox1ActionPerformed(evt);
                    }
                });

                jLabel2.setText("Seleccionar Zona");

                checkBox1.setText(al.getDescripcionAlertas());
                break;
                case 2:
                checkBox2=new javax.swing.JCheckBox();
                checkBox2.setText(al.getDescripcionAlertas());
                this.jPanel1.add(checkBox2);
                break;

                default:
                checkBox1 = new javax.swing.JCheckBox();

                checkBox1.setText(al.getDescripcionAlertas());
                break;

            }
        }

        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.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 996, Short.MAX_VALUE)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 171, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(dateChooserCombo1, javax.swing.GroupLayout.PREFERRED_SIZE, 195, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(checkBox1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jProgressBar1, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE))
                                .addGap(18, 18, 18)
                                .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 289, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(dateChooserCombo1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel1))
                .addGap(18, 18, 18)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 217, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jProgressBar1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel2)))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(checkBox1)
                        .addGap(0, 5, Short.MAX_VALUE)))
                .addContainerGap())
        );

        jButton2.setText("Guardar");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

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

        jButton4.setText("Actualizar");
        jButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton4ActionPerformed(evt);
            }
        });

        jButton5.setText("Eliminar");
        jButton5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton5ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 153, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 153, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(32, 32, 32)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton2)
                    .addComponent(jButton1)
                    .addComponent(jButton4)
                    .addComponent(jButton5))
                .addContainerGap(45, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 79, Short.MAX_VALUE)
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(52, 52, 52))
        );

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