private void jTextField6FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField6FocusLost
        boolean es_componente=false;        
        int i=0;        
        Component[] components = jPanel3.getComponents();
        while ((!es_componente)&&(i<components.length)){
            if (components[i]==evt.getOppositeComponent()){
                es_componente=true;
            }
            i++;
        }        

        if(es_componente){   
            r_con.Connection();
            jButton4.setEnabled(true);
            try{
                if(!jTextField6.getText().equals("")){
                    ResultSet rs=r_con.Consultar("select * from productos where prod_codigo="+jTextField6.getText());
                    if(rs.next()){
                        jTextField12.setText(rs.getString(2));
                        jTextField7.setText(rs.getString(5));                
                    }
                    else{
                        jTextField6.requestFocusInWindow();
                    }
                }
                else{
                    jTextField6.requestFocusInWindow();
                }
            } catch(Exception e){            
            } finally {r_con.cierraConexion();}        
        }        
    }//GEN-LAST:event_jTextField6FocusLost