private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBox1ActionPerformed
        // TODO add your handling code here:
        try{
        DefaultTableModel modelo = new DefaultTableModel();
        String dev="Devueltos";
        String alq="Alquilados";
        Integer est, si=1, no=0;
        
        String[] columnas = {"Id_Alquiler","Id_Cliente","Fecha Alquiler","Fecha Entrega","Monto"};
        modelo.setColumnIdentifiers(columnas);

        GestorAlquileres ga = new GestorAlquileres();
        Collection alquiler = ga.listaalquileres();
        
        ArrayList ver = (ArrayList) alquiler;       
        Iterator<Alquileres> it = ver.iterator();
            
            
        if(this.jComboBox1.getSelectedItem().equals(alq)){
            while(it.hasNext()){
                    Alquileres al = it.next();
                
                    Integer id_alq = al.getId_alquiler();
                    Integer id_cli = al.getId();
                    Date fa = al.getFecha_alquiler();
                    Date fe = al.getFecha_entrega();
                    Integer mnt = al.getMonto_alquiler();
                    est = al.getEstado();
                    
                    if(est.equals(si)){
                    Object[] fila = {id_alq,id_cli,fa,fe,mnt};
                    modelo.addRow(fila);
                    }
                    else{}
                
            }
            this.jTable2.setModel(modelo);
            this.jScrollPane2.setRowHeader(null);
        }
        else
            
            if(this.jComboBox1.getSelectedItem().equals(dev)){
                while(it.hasNext()){
                        Alquileres al = it.next();
                
                        Integer id_alq = al.getId_alquiler();
                        Integer id_cli = al.getId();
                        Date fa = al.getFecha_alquiler();
                        Date fe = al.getFecha_entrega();
                        Integer mnt = al.getMonto_alquiler();
                        est = al.getEstado();
                
                        if(est.equals(no)){
                        Object[] fila = {id_alq,id_cli,fa,fe,mnt};
                        modelo.addRow(fila);
                        }
                        else{}
                        
                }
                this.jTable2.setModel(modelo);
                this.jScrollPane2.setRowHeader(null);
                }
        
        }catch(DateAccessException e){
            System.out.println(e);
        }
    }//GEN-LAST:event_jComboBox1ActionPerformed