Skip to main content
etiquetas editadas
Enlace
Mariano
  • 24.5k
  • 20
  • 76
  • 105
se añadieron 2971 caracteres en el cuerpo
Origen Enlace

este es mi metodo insertarPrendasaqui hago mis conexiones

package lavanderia.Modelo;
import java.sql.Date;
import java.util.ArrayList;
/**
 *
 * @author Lilium Gal
 */
public class dbRegistro extends ManejadorDB implements dbPersistencia {

java.sql.Date fecha;

@Override
public void insertarRegistroLavado(Object objeto) throws Exception {
    
    Registro re = new Registro();
    re = (Registro) objeto;

    fecha = new java.sql.Date(re.getFecha_actual().getYear(), 
            re.getFecha_actual().getMonth(), re.getFecha_actual().getDay());
   
    this.conectar();
    String consulta = "insert into " +"ciclo_lavado(ciclo,id_programa,id_equipo,tipo,fecha) values(?,?,?,?,?)";
    
    this.sqlConsulta = this.conexion.prepareStatement(consulta);
    
    this.sqlConsulta.setInt(1, 1);
    this.sqlConsulta.setInt(2, re.getId_programa());
    this.sqlConsulta.setInt(3, re.getId_equipo());
    this.sqlConsulta.setString(4, "Lavado");
    this.sqlConsulta.setDate(5, fecha);
    
    this.sqlConsulta.executeUpdate();
   
    this.desconectar();
}

@Override
public void insertarRegistroSecado(Object objeto) throws Exception {
   
     Registro re = new Registro();
    re = (Registro) objeto;

 fecha = new java.sql.Date(re.getFecha_actual().getYear(), 
            re.getFecha_actual().getMonth(), re.getFecha_actual().getDay());
    
    this.conectar();
    String consulta = "insert into " +"ciclo_secado(id_programa,id_equipo,tipo,fecha) values(?,?,?,?)";
    
    this.sqlConsulta = this.conexion.prepareStatement(consulta);
    
    
    this.sqlConsulta.setInt(1, re.getId_programa());
    this.sqlConsulta.setInt(2, re.getId_equipo());
    this.sqlConsulta.setString(3, "Secado");
    this.sqlConsulta.setDate(4, fecha);
    
    this.sqlConsulta.executeUpdate();
    
    this.desconectar();

}

@Override
public void activarEquipo(Object objeto) throws Exception {
    
    Registro re = new Registro();
    re = (Registro) objeto;
    
    this.conectar();
    String consulta = "update equipos set Status = ? where nombre = ?";
    this.sqlConsulta = this.conexion.prepareStatement(consulta);
    this.sqlConsulta.setString(1, "A");
    this.sqlConsulta.setString(2, re.getEquipo());
    
    this.sqlConsulta.executeUpdate();
    this.desconectar();
    
}

@Override
public void mantenimiento(Object objeto) throws Exception {
    Registro re = new Registro();
    re = (Registro) objeto;
    
    this.conectar();
    String consulta = "update equipos set Status = ? where nombre = ? ";
    this.sqlConsulta = this.conexion.prepareStatement(consulta);
    this.sqlConsulta.setString(1, "M");
    this.sqlConsulta.setString(2, re.getEquipo());
    
    this.sqlConsulta.executeUpdate();
    
    String consul = "insert into mantenimiento(id_equipo,fecha,motivo) values(?,?,?)";
    
    this.sqlConsulta = this.conexion.prepareStatement(consul);
    this.sqlConsulta.setInt(1, re.getId_equipo());
    this.sqlConsulta.setDate(2, (Date) re.getFecha_actual());
    this.sqlConsulta.setString(3, re.getMotivo());
    
    this.sqlConsulta.executeUpdate();
    this.desconectar();
    
    
}

@Override
public void actualizarInsumos(Object objeto) throws Exception {
  Registro re = new Registro();
  re = (Registro) objeto;
  
  this.conectar();
  String consulta = "update insumos set existencia = ? where id_insumo = ?";
  this.sqlConsulta = this.conexion.prepareStatement(consulta);
  this.sqlConsulta.setInt(1,re.getExistencia());
  this.sqlConsulta.setInt(2, re.getId_insumo());
  this.sqlConsulta.executeUpdate();
  this.desconectar();
  
}

@Override
public ArrayList consultaEquipos( ) throws Exception {

    ArrayList lista = new ArrayList();
    Registro re;
    String consulta = "select * from equipos";
    this.conectar();
    
    this.sqlConsulta = this.conexion.prepareStatement(consulta);
    this.registros = this.sqlConsulta.executeQuery();
    
    while(this.registros.next()){
        re = new Registro();
        
        re.setId_equipo(this.registros.getInt("id_equipo"));
        re.setEquipo(this.registros.getString("nombre"));
        re.setTipo(this.registros.getString("tipo"));
        re.setHrs_trabajadas(this.registros.getInt("hrs_trabajadas"));
        re.setStatus(this.registros.getString("Status"));
        
        lista.add(re);
    }
    this.desconectar();
    return lista;
}

@Override
public ArrayList consultaLavado() throws Exception {
     ArrayList lista = new ArrayList();
    Registro re;
    String consulta = "select ciclo_lavado.fecha,ciclo_lavado.ciclo,ciclo_lavado.id_programa,programas_lavado.duracion,prendas.nombre,prendas.ubicacion,registro_prendas.cantidad,programas_lavado.ablandador,programas_lavado.alcalino,programas_lavado.blanqueador,programas_lavado.detergente,programas_lavado.neutralizante,programas_lavado.suavizante,equipos.nombre from prendas inner join registro_prendas on prendas.id_prenda = registro_prendas.id_prenda inner join ciclo_lavado on registro_prendas.id_ciclo = ciclo_lavado.id_ciclo inner join equipos on ciclo_lavado.id_equipo = equipos.id_equipo inner join programas_lavado on ciclo_lavado.id_programa = programas_lavado.id_programa";
    this.conectar();
    
    this.sqlConsulta = this.conexion.prepareStatement(consulta);
    this.registros = this.sqlConsulta.executeQuery();
    
    while(this.registros.next()){
        re = new Registro();
        
        re.setFecha_actual(this.registros.getDate("ciclo_lavado.fecha"));
        re.setId_programa(this.registros.getInt("ciclo_lavado.id_programa"));
        re.setDuracion(this.registros.getInt("programas_lavado.duracion"));
        re.setPrenda(this.registros.getString("prendas.nombre"));
        re.setUbicacion(this.registros.getString("prendas.ubicacion"));
        re.setCantidad_prendas(this.registros.getInt("registro_prendas.cantidad"));
        re.setTipo("Quimico");
        re.setAblandador(this.registros.getInt("programas_lavado.ablandador"));
        re.setAlcalino(this.registros.getInt("programas_lavado.alcalino"));
        re.setBlanqueador(this.registros.getInt("programas_lavado.blanqueador"));
        re.setDetergente(this.registros.getInt("programas_lavado.detergente"));
        re.setNeutralizante(this.registros.getInt("programas_lavado.neutralizante"));
        re.setSuavizante(this.registros.getInt("programas_lavado.suavizante"));
        re.setEquipo(this.registros.getString("equipos.nombre"));
        
        lista.add(re);
    }
    this.desconectar();
    return lista;
}


@Override
public ArrayList consultaSecado () throws Exception{
ArrayList lista = new ArrayList();
    Registro re;
    String consulta = "select ciclo_secado.fecha,ciclo_secado.ciclo,ciclo_secado.id_programa,programas_secado.duracion,prendas.nombre,prendas.ubicacion,registro_prendas.cantidad,programas_secado.gas,equipos.nombre from prendas inner join registro_prendas on prendas.id_prenda = registro_prendas.id_prenda inner join ciclo_secado on registro_prendas.id_ciclo = ciclo_secado.id_ciclo inner join equipos on ciclo_secado.id_equipo = equipos.id_equipo inner join programas_secado on ciclo_secado.id_programa = programas_secado.id_programa";
    this.conectar();
    
    this.sqlConsulta = this.conexion.prepareStatement(consulta);
    this.registros = this.sqlConsulta.executeQuery();
    
    while(this.registros.next()){
        re = new Registro();
        
        re.setFecha_actual(this.registros.getDate("ciclo_secado.fecha"));
        re.setId_programa(this.registros.getInt("ciclo_secado.id_programa"));
        re.setDuracion(this.registros.getInt("programas_secado.duracion"));
        re.setPrenda(this.registros.getString("prendas.nombre"));
        re.setUbicacion(this.registros.getString("prendas.ubicacion"));
        re.setCantidad_prendas(this.registros.getInt("registro_prendas.cantidad"));
        re.setGas(this.registros.getInt("programas_secado.gas"));
        re.setEquipo(this.registros.getString("equipos.nombre"));
        
        lista.add(re);
    }
    this.desconectar();
    return lista;

}

@Override
public void insertarPrendas(Object objeto) throws Exception{
    Registro re = new Registro();
    re = (Registro) objeto;
    
    String consulta = "insert into " + "registro_prendas(id_ciclo,tipo,id_prenda,cantidad) values (?,?,?,?)";
    
    this.sqlConsulta = this.conexion.prepareStatement(consulta);
    
    this.sqlConsulta.setInt(1, re.getId_ciclo());
    this.sqlConsulta.setString(2, re.getTipo());
    this.sqlConsulta.setInt(2, re.getId_prenda());
    this.sqlConsulta.setInt(3, re.getCantidad_prendas());
    
    this.sqlConsulta.executeUpdate();
    this.desconectar();
    
}

@Override
public Object datosSecado(int id) throws Exception{
    Registro re = new Registro();
    this.conectar();
    
    String consulta = "select duracion,gas from programas_secado where id_programa = ?";
    this.sqlConsulta = this.conexion.prepareStatement(consulta);
    
    this.sqlConsulta.setInt(1, id);
    
    this.registros = this.sqlConsulta.executeQuery();
    
    if(this.registros.next()){
        re.setDuracion(this.registros.getInt("duracion"));
        re.setGas(this.registros.getInt("gas"));
        
    }
    
    this.desconectar();
    return re;
}

@Override
public Object datosLavado(int id) throws Exception{
    Registro re = new Registro();
    this.conectar();
    
    String consulta = "select gas from programas_secado where id_programa = ?";
    this.sqlConsulta = this.conexion.prepareStatement(consulta);
    
    this.sqlConsulta.setInt(1, id);
    
    this.registros = this.sqlConsulta.executeQuery();
    
    if(this.registros.next()){
        re.setGas(this.registros.getInt("gas"));
        
    }
    
    this.desconectar();
    return re;
}

@Override
public ArrayList consultaInsumos( ) throws Exception {
    ArrayList lista = new ArrayList();
    Registro re;
    String consulta = "select * from insumos";
    this.conectar();
    
    this.sqlConsulta = this.conexion.prepareStatement(consulta);
    this.registros = this.sqlConsulta.executeQuery();
    
    while(this.registros.next()){
        re = new Registro();
        
        re.setId_insumo(this.registros.getInt("id_insumo"));
        re.setInsumo(this.registros.getString("nombre"));
        re.setTipo(this.registros.getString("tipo"));
        re.setMotivo(this.registros.getString("medida"));
        re.setExistencia(this.registros.getInt("existencia"));
        
        lista.add(re);
    }
    this.desconectar();
    return lista;
    
}

@Override
 public ArrayList consultaPrendas() throws Exception{
     ArrayList lista = new ArrayList();
    Registro re;
    String consulta = "select * from prendas";
    this.conectar();
    
    this.sqlConsulta = this.conexion.prepareStatement(consulta);
    this.registros = this.sqlConsulta.executeQuery();
    
    while(this.registros.next()){
        re = new Registro();
        
        re.setId_prenda(this.registros.getInt("id_prenda"));
        re.setPrenda(this.registros.getString("nombre"));
        re.setUbicacion(this.registros.getString("ubicacion"));
        
        lista.add(re);
    }
    this.desconectar();
    return lista;
 }
 
 @Override
public ArrayList consultaMantenimientos() throws Exception{
     ArrayList lista = new ArrayList();
    Registro re;
    String consulta = "select equipos.nombre,mantenimiento.fecha,mantenimiento.motivo from equipos inner join mantenimiento on equipos.id_equipo = mantenimiento.id_equipo ";
    this.conectar();
    
    this.sqlConsulta = this.conexion.prepareStatement(consulta);
    this.registros = this.sqlConsulta.executeQuery();
    
    while(this.registros.next()){
        re = new Registro();
        
        re.setEquipo(this.registros.getString("equipos.nombre"));
        re.setFecha_actual(this.registros.getDate("mantenimiento.fecha"));
        re.setMotivo(this.registros.getString("motivo"));
        
        lista.add(re);
    }
    this.desconectar();
    return lista;
}

}

este es mi constructor

package lavanderia.Controlador;

import lavanderia.Modelo.*;
import lavanderia.Vista.*;
import lavanderia.Controlador.*;
import java.awt.event.ActionEvent;
import java.util.ArrayList;
import java.awt.event.ActionListener;
import javax.swing.JOptionPane;
import java.io.*;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
 *
 * @author DiegoTrujillo
 */
public class ControladorPrendas implements ActionListener{
    
private RegistroPrendas vprendas;
private Registro reg;
String tipo;

public ControladorPrendas(RegistroPrendas vprendas,Registro reg,String tipo) {
this.vprendas=vprendas;
this.reg=reg;
this.tipo=tipo;
this.vprendas.btnAgregar.addActionListener(this);
this.vprendas.btnCancelar.addActionListener(this);
this.vprendas.btnLimpiar.addActionListener(this);

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


@Override
public void actionPerformed(ActionEvent e) {
    
if(e.getSource()==this.vprendas.btnAgregar){
            Registro aux = new Registro();
            dbRegistro db = new dbRegistro();
            try{
                aux.setId_prenda(this.vprendas.jComboBox1.getSelectedIndex()+1);
                aux.setCantidad_prendas(Integer.parseInt(this.vprendas.jTextField1.getText()));
            if(tipo == "Lavado"){
                aux.setId_ciclo(this.idLavado());
                aux.setTipo(tipo);
            }
            else if(tipo=="Secado"){
                aux.setId_ciclo(this.idSecado());
                aux.setTipo(tipo);
            }
                System.out.println(tipo);
                System.out.println(aux.getId_ciclo());
                System.out.println(aux.getId_prenda());
                System.out.println(aux.getCantidad_prendas());
                db.insertarPrendas(aux);
            }catch(Exception e1){
                e1.printStackTrace();
                JOptionPane.showMessageDialog(vprendas, "Surgio un Error " + e1.getMessage());
            }
         
        }

if(e.getSource()==this.vprendas.btnCancelar){
           Limpiar(); 
            vprendas.setVisible(false); 
        }
if(e.getSource()==this.vprendas.btnLimpiar){
            Limpiar(); 

  
}
}

java.lang.NullPointerException
at lavanderia.Modelo.dbRegistro.insertarPrendas(dbRegistro.java:222)
at lavanderia.Controlador.ControladorPrendas.actionPerformed(ControladorPrendas.java:68)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6533)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6298)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
at java.awt.Dialog.show(Dialog.java:1084)
at java.awt.Component.show(Component.java:1671)
at java.awt.Component.setVisible(Component.java:1623)
at java.awt.Window.setVisible(Window.java:1014)
atpublic java.awt.Dialog.setVisible(Dialog.java:1005)
atvoid lavanderia.Controlador.ControladorPrendas.iniciarVista(ControladorPrendas.java:90)
at lavanderia.Controlador.ControladorLavado.actionPerformed(ControladorLavado.java:68)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6533)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6298)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184){
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
at java.security.AccessController.doPrivileged(Native Method)
at java.awtthis.WaitDispatchSupportvprendas.entersetTitle(WaitDispatchSupport.java:227)
at" java.awt.Dialog.show(Dialog.java:1084");
at java.awt.Component.show(Component.java:1671)
at java.awt.Component.setVisible(Component.java:1623)
at java.awt.Window.setVisible(Window.java:1014)
at java.awtthis.Dialogvprendas.setVisible(Dialog.java:1005)
at lavanderia.Controlador.ControladorLavado.iniciarVista(ControladorLavado.java:90)
at lavanderia.Controlador.ControladorCiclo.actionPerformed(ControladorCiclo.java:41)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6533)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6298true);
at java.awt.Container.processEvent(Container.java:2236)}
at java.awt.Component.dispatchEventImpl(Component.java:4889)
atpublic java.awt.Container.dispatchEventImpl(Container.java:2294)
atvoid java.awt.Component.dispatchEvent(Component.java:4711)
atLimpiar java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888){
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at javathis.awtvprendas.EventQueue$3jComboBox1.runsetSelectedIndex(EventQueue.java:7090);
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at javathis.awtvprendas.EventQueue$4jTextField1.runsetText(EventQueue.java:729"");
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
at java.awt.Dialog.show(Dialog.java:1084)
at java.awt.Component.show(Component.java:1671)
at java.awt.Component.setVisible(Component.java:1623)
at java.awt.Window.setVisible(Window.java:1014)
at java.awt.Dialog.setVisible(Dialog.java:1005)}
at lavanderia.Controlador.ControladorCiclo.iniciarVista(ControladorCiclo.java:64)
atpublic lavanderia.Controlador.ControladorVistaPrincipal.actionPerformed(ControladorVistaPrincipal.java:44)
atint javax.swing.AbstractButton.fireActionPerformedidLavado(AbstractButton.java:2022){
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
atint java.awt.Component.processMouseEvent(Component.java:6533)idciclo=0;
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6298)
at java.awt.Container.processEvent(Container.java:2236)try{
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
atConnection java.awt.Component.dispatchEvent(Component.java:4711)
atcon java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at= java.awt.EventQueueDriverManager.access$500getConnection(EventQueue.java"jdbc:97)
at java.awt.EventQueue$3.run(EventQueue.javamysql:709)
at java.awt.EventQueue$3.run(EventQueue.java//localhost:7033306/lavanderia","root","");
at java.security.AccessController.doPrivileged(NativeStatement Method)
atSent java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at= java.security.ProtectionDomain$JavaSecurityAccessImplcon.doIntersectionPrivilegecreateStatement(ProtectionDomain.java:86);
atResultSet java.awt.EventQueue$4.run(EventQueue.java:731)
atrs java.awt.EventQueue$4=Sent.runexecuteQuery(EventQueue.java:729)
at"select java.security.AccessController.doPrivileged(Nativeid_ciclo Method)
atfrom java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
atciclo_lavado java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
atwhere java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
atid_ciclo java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at= java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
atselect java.awt.WaitDispatchSupport$2.runmax(WaitDispatchSupport.java:184id_ciclo)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
atfrom java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756ciclo_lavado)
at java.awt.EventQueue.access$500(EventQueue.java:97");
at java.awt.EventQueue$3.run

while(rs.next()){ idciclo=rs.getInt("id_ciclo"); }

}catch(EventQueue.java:709)
atException java.awt.EventQueue$3.run(EventQueue.java:703e){
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueueJOptionPane.dispatchEventshowMessageDialog(EventQueue.java:726)
atnull, java.awt.EventDispatchThreade.pumpOneEventForFiltersgetMessage(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116);
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)}
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
atreturn java.awt.EventDispatchThread.run(EventDispatchThread.java:82)idciclo;

}

public int idSecado(){
   int idciclo=0;
   try{
        
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/lavanderia","root","");
Statement Sent = con.createStatement();
ResultSet rs = Sent.executeQuery("select id_ciclo from ciclo_secado where id_ciclo = (select max(id_ciclo) from ciclo_secado)");

while(rs.next()){ idciclo=rs.getInt("id_ciclo"); }

}catch(Exception e){
    JOptionPane.showMessageDialog(null, e.getMessage());
}


return idciclo;

} }

este es mi metodo insertarPrendas

@Override
public void insertarPrendas(Object objeto) throws Exception{
    Registro re = new Registro();
    re = (Registro) objeto;
    String consulta = "insert into " + "registro_prendas(id_ciclo,tipo,id_prenda,cantidad) values (?,?,?,?)";
    this.sqlConsulta = this.conexion.prepareStatement(consulta);
    this.sqlConsulta.setInt(1, re.getId_ciclo());
    this.sqlConsulta.setString(2, re.getTipo());
    this.sqlConsulta.setInt(2, re.getId_prenda());
    this.sqlConsulta.setInt(3, re.getCantidad_prendas());
    this.sqlConsulta.executeUpdate();
    this.desconectar();
}


if(e.getSource()==this.vprendas.btnAgregar){
            Registro aux = new Registro();
            dbRegistro db = new dbRegistro();
            try{
                aux.setId_prenda(this.vprendas.jComboBox1.getSelectedIndex()+1);
                aux.setCantidad_prendas(Integer.parseInt(this.vprendas.jTextField1.getText()));
            if(tipo == "Lavado"){
                aux.setId_ciclo(this.idLavado());
                aux.setTipo(tipo);
            }
            else if(tipo=="Secado"){
                aux.setId_ciclo(this.idSecado());
                aux.setTipo(tipo);
            }
                System.out.println(tipo);
                System.out.println(aux.getId_ciclo());
                System.out.println(aux.getId_prenda());
                System.out.println(aux.getCantidad_prendas());
                db.insertarPrendas(aux);
            }catch(Exception e1){
                JOptionPane.showMessageDialog(vprendas, "Surgio un Error " + e1.getMessage());
            }
         
        }



java.lang.NullPointerException
at lavanderia.Modelo.dbRegistro.insertarPrendas(dbRegistro.java:222)
at lavanderia.Controlador.ControladorPrendas.actionPerformed(ControladorPrendas.java:68)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6533)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6298)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
at java.awt.Dialog.show(Dialog.java:1084)
at java.awt.Component.show(Component.java:1671)
at java.awt.Component.setVisible(Component.java:1623)
at java.awt.Window.setVisible(Window.java:1014)
at java.awt.Dialog.setVisible(Dialog.java:1005)
at lavanderia.Controlador.ControladorPrendas.iniciarVista(ControladorPrendas.java:90)
at lavanderia.Controlador.ControladorLavado.actionPerformed(ControladorLavado.java:68)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6533)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6298)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
at java.awt.Dialog.show(Dialog.java:1084)
at java.awt.Component.show(Component.java:1671)
at java.awt.Component.setVisible(Component.java:1623)
at java.awt.Window.setVisible(Window.java:1014)
at java.awt.Dialog.setVisible(Dialog.java:1005)
at lavanderia.Controlador.ControladorLavado.iniciarVista(ControladorLavado.java:90)
at lavanderia.Controlador.ControladorCiclo.actionPerformed(ControladorCiclo.java:41)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6533)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6298)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
at java.awt.Dialog.show(Dialog.java:1084)
at java.awt.Component.show(Component.java:1671)
at java.awt.Component.setVisible(Component.java:1623)
at java.awt.Window.setVisible(Window.java:1014)
at java.awt.Dialog.setVisible(Dialog.java:1005)
at lavanderia.Controlador.ControladorCiclo.iniciarVista(ControladorCiclo.java:64)
at lavanderia.Controlador.ControladorVistaPrincipal.actionPerformed(ControladorVistaPrincipal.java:44)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6533)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6298)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

aqui hago mis conexiones

package lavanderia.Modelo;
import java.sql.Date;
import java.util.ArrayList;
/**
 *
 * @author Lilium Gal
 */
public class dbRegistro extends ManejadorDB implements dbPersistencia {

java.sql.Date fecha;

@Override
public void insertarRegistroLavado(Object objeto) throws Exception {
    
    Registro re = new Registro();
    re = (Registro) objeto;

    fecha = new java.sql.Date(re.getFecha_actual().getYear(), 
            re.getFecha_actual().getMonth(), re.getFecha_actual().getDay());
   
    this.conectar();
    String consulta = "insert into " +"ciclo_lavado(ciclo,id_programa,id_equipo,tipo,fecha) values(?,?,?,?,?)";
    
    this.sqlConsulta = this.conexion.prepareStatement(consulta);
    
    this.sqlConsulta.setInt(1, 1);
    this.sqlConsulta.setInt(2, re.getId_programa());
    this.sqlConsulta.setInt(3, re.getId_equipo());
    this.sqlConsulta.setString(4, "Lavado");
    this.sqlConsulta.setDate(5, fecha);
    
    this.sqlConsulta.executeUpdate();
   
    this.desconectar();
}

@Override
public void insertarRegistroSecado(Object objeto) throws Exception {
   
     Registro re = new Registro();
    re = (Registro) objeto;

 fecha = new java.sql.Date(re.getFecha_actual().getYear(), 
            re.getFecha_actual().getMonth(), re.getFecha_actual().getDay());
    
    this.conectar();
    String consulta = "insert into " +"ciclo_secado(id_programa,id_equipo,tipo,fecha) values(?,?,?,?)";
    
    this.sqlConsulta = this.conexion.prepareStatement(consulta);
    
    
    this.sqlConsulta.setInt(1, re.getId_programa());
    this.sqlConsulta.setInt(2, re.getId_equipo());
    this.sqlConsulta.setString(3, "Secado");
    this.sqlConsulta.setDate(4, fecha);
    
    this.sqlConsulta.executeUpdate();
    
    this.desconectar();

}

@Override
public void activarEquipo(Object objeto) throws Exception {
    
    Registro re = new Registro();
    re = (Registro) objeto;
    
    this.conectar();
    String consulta = "update equipos set Status = ? where nombre = ?";
    this.sqlConsulta = this.conexion.prepareStatement(consulta);
    this.sqlConsulta.setString(1, "A");
    this.sqlConsulta.setString(2, re.getEquipo());
    
    this.sqlConsulta.executeUpdate();
    this.desconectar();
    
}

@Override
public void mantenimiento(Object objeto) throws Exception {
    Registro re = new Registro();
    re = (Registro) objeto;
    
    this.conectar();
    String consulta = "update equipos set Status = ? where nombre = ? ";
    this.sqlConsulta = this.conexion.prepareStatement(consulta);
    this.sqlConsulta.setString(1, "M");
    this.sqlConsulta.setString(2, re.getEquipo());
    
    this.sqlConsulta.executeUpdate();
    
    String consul = "insert into mantenimiento(id_equipo,fecha,motivo) values(?,?,?)";
    
    this.sqlConsulta = this.conexion.prepareStatement(consul);
    this.sqlConsulta.setInt(1, re.getId_equipo());
    this.sqlConsulta.setDate(2, (Date) re.getFecha_actual());
    this.sqlConsulta.setString(3, re.getMotivo());
    
    this.sqlConsulta.executeUpdate();
    this.desconectar();
    
    
}

@Override
public void actualizarInsumos(Object objeto) throws Exception {
  Registro re = new Registro();
  re = (Registro) objeto;
  
  this.conectar();
  String consulta = "update insumos set existencia = ? where id_insumo = ?";
  this.sqlConsulta = this.conexion.prepareStatement(consulta);
  this.sqlConsulta.setInt(1,re.getExistencia());
  this.sqlConsulta.setInt(2, re.getId_insumo());
  this.sqlConsulta.executeUpdate();
  this.desconectar();
  
}

@Override
public ArrayList consultaEquipos( ) throws Exception {

    ArrayList lista = new ArrayList();
    Registro re;
    String consulta = "select * from equipos";
    this.conectar();
    
    this.sqlConsulta = this.conexion.prepareStatement(consulta);
    this.registros = this.sqlConsulta.executeQuery();
    
    while(this.registros.next()){
        re = new Registro();
        
        re.setId_equipo(this.registros.getInt("id_equipo"));
        re.setEquipo(this.registros.getString("nombre"));
        re.setTipo(this.registros.getString("tipo"));
        re.setHrs_trabajadas(this.registros.getInt("hrs_trabajadas"));
        re.setStatus(this.registros.getString("Status"));
        
        lista.add(re);
    }
    this.desconectar();
    return lista;
}

@Override
public ArrayList consultaLavado() throws Exception {
     ArrayList lista = new ArrayList();
    Registro re;
    String consulta = "select ciclo_lavado.fecha,ciclo_lavado.ciclo,ciclo_lavado.id_programa,programas_lavado.duracion,prendas.nombre,prendas.ubicacion,registro_prendas.cantidad,programas_lavado.ablandador,programas_lavado.alcalino,programas_lavado.blanqueador,programas_lavado.detergente,programas_lavado.neutralizante,programas_lavado.suavizante,equipos.nombre from prendas inner join registro_prendas on prendas.id_prenda = registro_prendas.id_prenda inner join ciclo_lavado on registro_prendas.id_ciclo = ciclo_lavado.id_ciclo inner join equipos on ciclo_lavado.id_equipo = equipos.id_equipo inner join programas_lavado on ciclo_lavado.id_programa = programas_lavado.id_programa";
    this.conectar();
    
    this.sqlConsulta = this.conexion.prepareStatement(consulta);
    this.registros = this.sqlConsulta.executeQuery();
    
    while(this.registros.next()){
        re = new Registro();
        
        re.setFecha_actual(this.registros.getDate("ciclo_lavado.fecha"));
        re.setId_programa(this.registros.getInt("ciclo_lavado.id_programa"));
        re.setDuracion(this.registros.getInt("programas_lavado.duracion"));
        re.setPrenda(this.registros.getString("prendas.nombre"));
        re.setUbicacion(this.registros.getString("prendas.ubicacion"));
        re.setCantidad_prendas(this.registros.getInt("registro_prendas.cantidad"));
        re.setTipo("Quimico");
        re.setAblandador(this.registros.getInt("programas_lavado.ablandador"));
        re.setAlcalino(this.registros.getInt("programas_lavado.alcalino"));
        re.setBlanqueador(this.registros.getInt("programas_lavado.blanqueador"));
        re.setDetergente(this.registros.getInt("programas_lavado.detergente"));
        re.setNeutralizante(this.registros.getInt("programas_lavado.neutralizante"));
        re.setSuavizante(this.registros.getInt("programas_lavado.suavizante"));
        re.setEquipo(this.registros.getString("equipos.nombre"));
        
        lista.add(re);
    }
    this.desconectar();
    return lista;
}


@Override
public ArrayList consultaSecado () throws Exception{
ArrayList lista = new ArrayList();
    Registro re;
    String consulta = "select ciclo_secado.fecha,ciclo_secado.ciclo,ciclo_secado.id_programa,programas_secado.duracion,prendas.nombre,prendas.ubicacion,registro_prendas.cantidad,programas_secado.gas,equipos.nombre from prendas inner join registro_prendas on prendas.id_prenda = registro_prendas.id_prenda inner join ciclo_secado on registro_prendas.id_ciclo = ciclo_secado.id_ciclo inner join equipos on ciclo_secado.id_equipo = equipos.id_equipo inner join programas_secado on ciclo_secado.id_programa = programas_secado.id_programa";
    this.conectar();
    
    this.sqlConsulta = this.conexion.prepareStatement(consulta);
    this.registros = this.sqlConsulta.executeQuery();
    
    while(this.registros.next()){
        re = new Registro();
        
        re.setFecha_actual(this.registros.getDate("ciclo_secado.fecha"));
        re.setId_programa(this.registros.getInt("ciclo_secado.id_programa"));
        re.setDuracion(this.registros.getInt("programas_secado.duracion"));
        re.setPrenda(this.registros.getString("prendas.nombre"));
        re.setUbicacion(this.registros.getString("prendas.ubicacion"));
        re.setCantidad_prendas(this.registros.getInt("registro_prendas.cantidad"));
        re.setGas(this.registros.getInt("programas_secado.gas"));
        re.setEquipo(this.registros.getString("equipos.nombre"));
        
        lista.add(re);
    }
    this.desconectar();
    return lista;

}

@Override
public void insertarPrendas(Object objeto) throws Exception{
    Registro re = new Registro();
    re = (Registro) objeto;
    
    String consulta = "insert into " + "registro_prendas(id_ciclo,tipo,id_prenda,cantidad) values (?,?,?,?)";
    
    this.sqlConsulta = this.conexion.prepareStatement(consulta);
    
    this.sqlConsulta.setInt(1, re.getId_ciclo());
    this.sqlConsulta.setString(2, re.getTipo());
    this.sqlConsulta.setInt(2, re.getId_prenda());
    this.sqlConsulta.setInt(3, re.getCantidad_prendas());
    
    this.sqlConsulta.executeUpdate();
    this.desconectar();
    
}

@Override
public Object datosSecado(int id) throws Exception{
    Registro re = new Registro();
    this.conectar();
    
    String consulta = "select duracion,gas from programas_secado where id_programa = ?";
    this.sqlConsulta = this.conexion.prepareStatement(consulta);
    
    this.sqlConsulta.setInt(1, id);
    
    this.registros = this.sqlConsulta.executeQuery();
    
    if(this.registros.next()){
        re.setDuracion(this.registros.getInt("duracion"));
        re.setGas(this.registros.getInt("gas"));
        
    }
    
    this.desconectar();
    return re;
}

@Override
public Object datosLavado(int id) throws Exception{
    Registro re = new Registro();
    this.conectar();
    
    String consulta = "select gas from programas_secado where id_programa = ?";
    this.sqlConsulta = this.conexion.prepareStatement(consulta);
    
    this.sqlConsulta.setInt(1, id);
    
    this.registros = this.sqlConsulta.executeQuery();
    
    if(this.registros.next()){
        re.setGas(this.registros.getInt("gas"));
        
    }
    
    this.desconectar();
    return re;
}

@Override
public ArrayList consultaInsumos( ) throws Exception {
    ArrayList lista = new ArrayList();
    Registro re;
    String consulta = "select * from insumos";
    this.conectar();
    
    this.sqlConsulta = this.conexion.prepareStatement(consulta);
    this.registros = this.sqlConsulta.executeQuery();
    
    while(this.registros.next()){
        re = new Registro();
        
        re.setId_insumo(this.registros.getInt("id_insumo"));
        re.setInsumo(this.registros.getString("nombre"));
        re.setTipo(this.registros.getString("tipo"));
        re.setMotivo(this.registros.getString("medida"));
        re.setExistencia(this.registros.getInt("existencia"));
        
        lista.add(re);
    }
    this.desconectar();
    return lista;
    
}

@Override
 public ArrayList consultaPrendas() throws Exception{
     ArrayList lista = new ArrayList();
    Registro re;
    String consulta = "select * from prendas";
    this.conectar();
    
    this.sqlConsulta = this.conexion.prepareStatement(consulta);
    this.registros = this.sqlConsulta.executeQuery();
    
    while(this.registros.next()){
        re = new Registro();
        
        re.setId_prenda(this.registros.getInt("id_prenda"));
        re.setPrenda(this.registros.getString("nombre"));
        re.setUbicacion(this.registros.getString("ubicacion"));
        
        lista.add(re);
    }
    this.desconectar();
    return lista;
 }
 
 @Override
public ArrayList consultaMantenimientos() throws Exception{
     ArrayList lista = new ArrayList();
    Registro re;
    String consulta = "select equipos.nombre,mantenimiento.fecha,mantenimiento.motivo from equipos inner join mantenimiento on equipos.id_equipo = mantenimiento.id_equipo ";
    this.conectar();
    
    this.sqlConsulta = this.conexion.prepareStatement(consulta);
    this.registros = this.sqlConsulta.executeQuery();
    
    while(this.registros.next()){
        re = new Registro();
        
        re.setEquipo(this.registros.getString("equipos.nombre"));
        re.setFecha_actual(this.registros.getDate("mantenimiento.fecha"));
        re.setMotivo(this.registros.getString("motivo"));
        
        lista.add(re);
    }
    this.desconectar();
    return lista;
}

}

este es mi constructor

package lavanderia.Controlador;

import lavanderia.Modelo.*;
import lavanderia.Vista.*;
import lavanderia.Controlador.*;
import java.awt.event.ActionEvent;
import java.util.ArrayList;
import java.awt.event.ActionListener;
import javax.swing.JOptionPane;
import java.io.*;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
 *
 * @author DiegoTrujillo
 */
public class ControladorPrendas implements ActionListener{
    
private RegistroPrendas vprendas;
private Registro reg;
String tipo;

public ControladorPrendas(RegistroPrendas vprendas,Registro reg,String tipo) {
this.vprendas=vprendas;
this.reg=reg;
this.tipo=tipo;
this.vprendas.btnAgregar.addActionListener(this);
this.vprendas.btnCancelar.addActionListener(this);
this.vprendas.btnLimpiar.addActionListener(this);

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


@Override
public void actionPerformed(ActionEvent e) {
    
if(e.getSource()==this.vprendas.btnAgregar){
            Registro aux = new Registro();
            dbRegistro db = new dbRegistro();
            try{
                aux.setId_prenda(this.vprendas.jComboBox1.getSelectedIndex()+1);
                aux.setCantidad_prendas(Integer.parseInt(this.vprendas.jTextField1.getText()));
            if(tipo == "Lavado"){
                aux.setId_ciclo(this.idLavado());
                aux.setTipo(tipo);
            }
            else if(tipo=="Secado"){
                aux.setId_ciclo(this.idSecado());
                aux.setTipo(tipo);
            }
                System.out.println(tipo);
                System.out.println(aux.getId_ciclo());
                System.out.println(aux.getId_prenda());
                System.out.println(aux.getCantidad_prendas());
                db.insertarPrendas(aux);
            }catch(Exception e1){
                e1.printStackTrace();
                JOptionPane.showMessageDialog(vprendas, "Surgio un Error " + e1.getMessage());
            }
         
        }

if(e.getSource()==this.vprendas.btnCancelar){
           Limpiar(); 
            vprendas.setVisible(false); 
        }
if(e.getSource()==this.vprendas.btnLimpiar){
            Limpiar(); 

  
}
}


public void iniciarVista(){
    this.vprendas.setTitle(" ");
    this.vprendas.setVisible(true);
}

public void Limpiar (){
    
    this.vprendas.jComboBox1.setSelectedIndex(0);
    this.vprendas.jTextField1.setText("");
    
            
}

public int idLavado(){
   int idciclo=0;
   try{
        
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/lavanderia","root","");
Statement Sent = con.createStatement();
ResultSet rs =Sent.executeQuery("select id_ciclo from ciclo_lavado where id_ciclo = (select max(id_ciclo) from ciclo_lavado)");

while(rs.next()){ idciclo=rs.getInt("id_ciclo"); }

}catch(Exception e){
    JOptionPane.showMessageDialog(null, e.getMessage());
}


return idciclo;

}

public int idSecado(){
   int idciclo=0;
   try{
        
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/lavanderia","root","");
Statement Sent = con.createStatement();
ResultSet rs = Sent.executeQuery("select id_ciclo from ciclo_secado where id_ciclo = (select max(id_ciclo) from ciclo_secado)");

while(rs.next()){ idciclo=rs.getInt("id_ciclo"); }

}catch(Exception e){
    JOptionPane.showMessageDialog(null, e.getMessage());
}


return idciclo;

} }

se añadieron 686 caracteres en el cuerpo
Origen Enlace

este es mi metodo insertarPrendas

@Override
public void insertarPrendas(Object objeto) throws Exception{
    Registro re = new Registro();
    re = (Registro) objeto;
    String consulta = "insert into " + "registro_prendas(id_ciclo,tipo,id_prenda,cantidad) values (?,?,?,?)";
    this.sqlConsulta = this.conexion.prepareStatement(consulta);
    this.sqlConsulta.setInt(1, re.getId_ciclo());
    this.sqlConsulta.setString(2, re.getTipo());
    this.sqlConsulta.setInt(2, re.getId_prenda());
    this.sqlConsulta.setInt(3, re.getCantidad_prendas());
    this.sqlConsulta.executeUpdate();
    this.desconectar();
}


if(e.getSource()==this.vprendas.btnAgregar){
            Registro aux = new Registro();
            dbRegistro db = new dbRegistro();
            try{
                aux.setId_prenda(this.vprendas.jComboBox1.getSelectedIndex()+1);
                aux.setCantidad_prendas(Integer.parseInt(this.vprendas.jTextField1.getText()));
            if(tipo == "Lavado"){
                aux.setId_ciclo(this.idLavado());
                aux.setTipo(tipo);
            }
            else if(tipo=="Secado"){
                aux.setId_ciclo(this.idSecado());
                aux.setTipo(tipo);
            }
                System.out.println(tipo);
                System.out.println(aux.getId_ciclo());
                System.out.println(aux.getId_prenda());
                System.out.println(aux.getCantidad_prendas());
                db.insertarPrendas(aux);
            }catch(Exception e1){
                JOptionPane.showMessageDialog(vprendas, "Surgio un Error " + e1.getMessage());
            }
         
        }



java.lang.NullPointerException
at lavanderia.Modelo.dbRegistro.insertarPrendas(dbRegistro.java:222)
at lavanderia.Controlador.ControladorPrendas.actionPerformed(ControladorPrendas.java:68)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6533)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6298)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
at java.awt.Dialog.show(Dialog.java:1084)
at java.awt.Component.show(Component.java:1671)
at java.awt.Component.setVisible(Component.java:1623)
at java.awt.Window.setVisible(Window.java:1014)
at java.awt.Dialog.setVisible(Dialog.java:1005)
at lavanderia.Controlador.ControladorPrendas.iniciarVista(ControladorPrendas.java:90)
at lavanderia.Controlador.ControladorLavado.actionPerformed(ControladorLavado.java:68)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6533)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6298)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
at java.awt.Dialog.show(Dialog.java:1084)
at java.awt.Component.show(Component.java:1671)
at java.awt.Component.setVisible(Component.java:1623)
at java.awt.Window.setVisible(Window.java:1014)
at java.awt.Dialog.setVisible(Dialog.java:1005)
at lavanderia.Controlador.ControladorLavado.iniciarVista(ControladorLavado.java:90)
at lavanderia.Controlador.ControladorCiclo.actionPerformed(ControladorCiclo.java:41)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6533)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6298)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
at java.awt.Dialog.show(Dialog.java:1084)
at java.awt.Component.show(Component.java:1671)
at java.awt.Component.setVisible(Component.java:1623)
at java.awt.Window.setVisible(Window.java:1014)
at java.awt.Dialog.setVisible(Dialog.java:1005)
at lavanderia.Controlador.ControladorCiclo.iniciarVista(ControladorCiclo.java:64)
at lavanderia.Controlador.ControladorVistaPrincipal.actionPerformed(ControladorVistaPrincipal.java:44)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6533)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6298)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
if(e.getSource()==this.vprendas.btnAgregar){
            Registro aux = new Registro();
            dbRegistro db = new dbRegistro();
            try{
                aux.setId_prenda(this.vprendas.jComboBox1.getSelectedIndex()+1);
                aux.setCantidad_prendas(Integer.parseInt(this.vprendas.jTextField1.getText()));
            if(tipo == "Lavado"){
                aux.setId_ciclo(this.idLavado());
                aux.setTipo(tipo);
            }
            else if(tipo=="Secado"){
                aux.setId_ciclo(this.idSecado());
                aux.setTipo(tipo);
            }
                System.out.println(tipo);
                System.out.println(aux.getId_ciclo());
                System.out.println(aux.getId_prenda());
                System.out.println(aux.getCantidad_prendas());
                db.insertarPrendas(aux);
            }catch(Exception e1){
                JOptionPane.showMessageDialog(vprendas, "Surgio un Error " + e1.getMessage());
            }
         
        }



java.lang.NullPointerException
at lavanderia.Modelo.dbRegistro.insertarPrendas(dbRegistro.java:222)
at lavanderia.Controlador.ControladorPrendas.actionPerformed(ControladorPrendas.java:68)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6533)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6298)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
at java.awt.Dialog.show(Dialog.java:1084)
at java.awt.Component.show(Component.java:1671)
at java.awt.Component.setVisible(Component.java:1623)
at java.awt.Window.setVisible(Window.java:1014)
at java.awt.Dialog.setVisible(Dialog.java:1005)
at lavanderia.Controlador.ControladorPrendas.iniciarVista(ControladorPrendas.java:90)
at lavanderia.Controlador.ControladorLavado.actionPerformed(ControladorLavado.java:68)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6533)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6298)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
at java.awt.Dialog.show(Dialog.java:1084)
at java.awt.Component.show(Component.java:1671)
at java.awt.Component.setVisible(Component.java:1623)
at java.awt.Window.setVisible(Window.java:1014)
at java.awt.Dialog.setVisible(Dialog.java:1005)
at lavanderia.Controlador.ControladorLavado.iniciarVista(ControladorLavado.java:90)
at lavanderia.Controlador.ControladorCiclo.actionPerformed(ControladorCiclo.java:41)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6533)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6298)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
at java.awt.Dialog.show(Dialog.java:1084)
at java.awt.Component.show(Component.java:1671)
at java.awt.Component.setVisible(Component.java:1623)
at java.awt.Window.setVisible(Window.java:1014)
at java.awt.Dialog.setVisible(Dialog.java:1005)
at lavanderia.Controlador.ControladorCiclo.iniciarVista(ControladorCiclo.java:64)
at lavanderia.Controlador.ControladorVistaPrincipal.actionPerformed(ControladorVistaPrincipal.java:44)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6533)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6298)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

este es mi metodo insertarPrendas

@Override
public void insertarPrendas(Object objeto) throws Exception{
    Registro re = new Registro();
    re = (Registro) objeto;
    String consulta = "insert into " + "registro_prendas(id_ciclo,tipo,id_prenda,cantidad) values (?,?,?,?)";
    this.sqlConsulta = this.conexion.prepareStatement(consulta);
    this.sqlConsulta.setInt(1, re.getId_ciclo());
    this.sqlConsulta.setString(2, re.getTipo());
    this.sqlConsulta.setInt(2, re.getId_prenda());
    this.sqlConsulta.setInt(3, re.getCantidad_prendas());
    this.sqlConsulta.executeUpdate();
    this.desconectar();
}


if(e.getSource()==this.vprendas.btnAgregar){
            Registro aux = new Registro();
            dbRegistro db = new dbRegistro();
            try{
                aux.setId_prenda(this.vprendas.jComboBox1.getSelectedIndex()+1);
                aux.setCantidad_prendas(Integer.parseInt(this.vprendas.jTextField1.getText()));
            if(tipo == "Lavado"){
                aux.setId_ciclo(this.idLavado());
                aux.setTipo(tipo);
            }
            else if(tipo=="Secado"){
                aux.setId_ciclo(this.idSecado());
                aux.setTipo(tipo);
            }
                System.out.println(tipo);
                System.out.println(aux.getId_ciclo());
                System.out.println(aux.getId_prenda());
                System.out.println(aux.getCantidad_prendas());
                db.insertarPrendas(aux);
            }catch(Exception e1){
                JOptionPane.showMessageDialog(vprendas, "Surgio un Error " + e1.getMessage());
            }
         
        }



java.lang.NullPointerException
at lavanderia.Modelo.dbRegistro.insertarPrendas(dbRegistro.java:222)
at lavanderia.Controlador.ControladorPrendas.actionPerformed(ControladorPrendas.java:68)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6533)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6298)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
at java.awt.Dialog.show(Dialog.java:1084)
at java.awt.Component.show(Component.java:1671)
at java.awt.Component.setVisible(Component.java:1623)
at java.awt.Window.setVisible(Window.java:1014)
at java.awt.Dialog.setVisible(Dialog.java:1005)
at lavanderia.Controlador.ControladorPrendas.iniciarVista(ControladorPrendas.java:90)
at lavanderia.Controlador.ControladorLavado.actionPerformed(ControladorLavado.java:68)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6533)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6298)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
at java.awt.Dialog.show(Dialog.java:1084)
at java.awt.Component.show(Component.java:1671)
at java.awt.Component.setVisible(Component.java:1623)
at java.awt.Window.setVisible(Window.java:1014)
at java.awt.Dialog.setVisible(Dialog.java:1005)
at lavanderia.Controlador.ControladorLavado.iniciarVista(ControladorLavado.java:90)
at lavanderia.Controlador.ControladorCiclo.actionPerformed(ControladorCiclo.java:41)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6533)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6298)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
at java.awt.Dialog.show(Dialog.java:1084)
at java.awt.Component.show(Component.java:1671)
at java.awt.Component.setVisible(Component.java:1623)
at java.awt.Window.setVisible(Window.java:1014)
at java.awt.Dialog.setVisible(Dialog.java:1005)
at lavanderia.Controlador.ControladorCiclo.iniciarVista(ControladorCiclo.java:64)
at lavanderia.Controlador.ControladorVistaPrincipal.actionPerformed(ControladorVistaPrincipal.java:44)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6533)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6298)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
se añadieron 12971 caracteres en el cuerpo
Origen Enlace
Loading
Origen Enlace
Loading