/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package arql2020;

import Calculos_automaticos.B_Composicion_puntasfilossup;
import static arql2020.ARQL2020.capa_nivel;
import static arql2020.ARQL2020.cuadro;
import static arql2020.ARQL2020.episodio_estruct_planta;
import static arql2020.ARQL2020.estruct_arq;
import static arql2020.ARQL2020.localidad;
import static arql2020.ARQL2020.microsector;
import static arql2020.ARQL2020.nombre_estruct_planta;
import static arql2020.ARQL2020.piso_subcapa;
import static arql2020.ARQL2020.siglasitio;
import static arql2020.ARQL2020.sitio;
import static arql2020.ARQL2020.tipo_estruct_planta;
import static arql2020.ARQL2020.zona_ambiental;
import static arql2020.DT_frame.selectednodeparaeliminar;
import static arql2020.FORMATIZADOS_frame.editando;
import static arql2020.FORMATIZADOS_frame.expandirultimarama;
import static arql2020.FORMATIZADOS_frame.jTree1;
import static arql2020.FORMATIZADOS_frame.model;
import static arql2020.FORMATIZADOS_frame.selectednode;
import static arql2020.Internal_estandard.btn_eliminar_estandar;
import static arql2020.Internal_estandard.s0_txt_codigopieza;
import static arql2020.Internal_estandard.s32_txt_partepasiva_posicion;
import clases.InteraccionesBD;
import clases.ValidarCampos;
import clases.bagolini_tamaños;
import clases.conexion;
import java.beans.PropertyVetoException;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JCheckBox;
import javax.swing.JOptionPane;
import javax.swing.JTextField;
import javax.swing.tree.DefaultMutableTreeNode;

/**
 *
 * @author chuen
 */
public class Internal_puntas extends javax.swing.JInternalFrame {

    /**
     * Creates new form Internal_puntas
     */
    public Internal_puntas() {
        initComponents();
                        try{
            this.setMaximum(true);
        } catch (PropertyVetoException ex) {
            Logger.getLogger(B_Composicion_puntasfilossup.class.getName()).log(Level.SEVERE, null, ex);
        }   
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jScrollPane1 = new javax.swing.JScrollPane();
        jPanel1 = new javax.swing.JPanel();
        jLabel6 = new javax.swing.JLabel();
        jSeparator2 = new javax.swing.JSeparator();
        jButton1 = new javax.swing.JButton();
        jLabel22 = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        p48_txta_observaciones = new javax.swing.JTextArea();
        jPanel3 = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        p2_txt_codigopunta = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();
        p3_txt_grupo = new javax.swing.JTextField();
        p4_cbx_subgrupo = new javax.swing.JComboBox<>();
        jLabel12 = new javax.swing.JLabel();
        p1_txt_codigopieza = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        jPanel4 = new javax.swing.JPanel();
        p6_cbx_forma_limbo = new javax.swing.JComboBox<>();
        jPanel2 = new javax.swing.JPanel();
        p10_cbx_LIMBO_estadoborde_izquierdo = new javax.swing.JComboBox<>();
        p11_cbx_LIMBO_formaborde_izquierdo = new javax.swing.JComboBox<>();
        jLabel9 = new javax.swing.JLabel();
        p12_txt_LIMBO_longitud_izquierdo = new javax.swing.JTextField();
        jLabel23 = new javax.swing.JLabel();
        p13_txt_LIMBO_prof_izquierdo = new javax.swing.JTextField();
        p14_cbx_LIMBO_formaarista_izquierda = new javax.swing.JComboBox<>();
        jPanel6 = new javax.swing.JPanel();
        p17_txt_LIMBO_longitud_derecho = new javax.swing.JTextField();
        jLabel24 = new javax.swing.JLabel();
        p19_cbx_LIMBO_formaarista_derecho = new javax.swing.JComboBox<>();
        p16_cbx_LIMBO_formaborde_derecho = new javax.swing.JComboBox<>();
        jLabel19 = new javax.swing.JLabel();
        p18_txt_LIMBO_prof_derecho = new javax.swing.JTextField();
        p15_cbx_LIMBO_estadoborde_derecho = new javax.swing.JComboBox<>();
        jLabel10 = new javax.swing.JLabel();
        p7_txt_limbo_angulo_medido = new javax.swing.JTextField();
        jLabel11 = new javax.swing.JLabel();
        p8_txt_limbo_angulo_estimado = new javax.swing.JTextField();
        p9_ckh_no_es_posible_medir_angulo = new javax.swing.JCheckBox();
        jPanel5 = new javax.swing.JPanel();
        p23_cbx_pedunculo_forma = new javax.swing.JComboBox<>();
        p22_cbx_pedunculo_tratamiento = new javax.swing.JComboBox<>();
        p21_txt_pedunculo_longitud = new javax.swing.JTextField();
        jLabel15 = new javax.swing.JLabel();
        p20_cbx_pedunculo_estado = new javax.swing.JComboBox<>();
        jPanel7 = new javax.swing.JPanel();
        p24_cbx_base_estado = new javax.swing.JComboBox<>();
        jLabel16 = new javax.swing.JLabel();
        p25_txt_base_ancho = new javax.swing.JTextField();
        jLabel17 = new javax.swing.JLabel();
        p26_txt_base_prof = new javax.swing.JTextField();
        p27_cbx_base_forma = new javax.swing.JComboBox<>();
        p28_cbx_base_tratamiento = new javax.swing.JComboBox<>();
        jPanel8 = new javax.swing.JPanel();
        jPanel9 = new javax.swing.JPanel();
        p34_cbx_aletaIZQ_forma = new javax.swing.JComboBox<>();
        jLabel20 = new javax.swing.JLabel();
        p30_txt_aletaIZQ_ancho = new javax.swing.JTextField();
        p29_cbx_aletaIZQ_estado = new javax.swing.JComboBox<>();
        jLabel21 = new javax.swing.JLabel();
        p31_txt_aletaIZQ_angulomedido = new javax.swing.JTextField();
        jLabel26 = new javax.swing.JLabel();
        p32_txt_aletaIZQ_anguloestimado = new javax.swing.JTextField();
        p33_chk_aletaIZQ_noangulo = new javax.swing.JCheckBox();
        jPanel10 = new javax.swing.JPanel();
        p40_cbx_aletaDER_forma = new javax.swing.JComboBox<>();
        p35_cbx_aletaDER_estado = new javax.swing.JComboBox<>();
        jLabel25 = new javax.swing.JLabel();
        p36_txt_aletaDER_ancho = new javax.swing.JTextField();
        p37_txt_aletaDER_angulomedido = new javax.swing.JTextField();
        jLabel27 = new javax.swing.JLabel();
        p38_txt_aletaDER_anguloestimado = new javax.swing.JTextField();
        jLabel28 = new javax.swing.JLabel();
        p39_chk_aletaDER_noangulo = new javax.swing.JCheckBox();
        jPanel11 = new javax.swing.JPanel();
        p5_cbx_forma_punta = new javax.swing.JComboBox<>();
        jPanel12 = new javax.swing.JPanel();
        p45_chk_nodiferenciado = new javax.swing.JCheckBox();
        p41_chk_retalla = new javax.swing.JCheckBox();
        p42_chk_retoque = new javax.swing.JCheckBox();
        p43_chk_microrretoque = new javax.swing.JCheckBox();
        p44_chk_pulido = new javax.swing.JCheckBox();
        p0_chk_talla_ext_nobip = new javax.swing.JCheckBox();
        p0_abrasion = new javax.swing.JCheckBox();
        jLabel30 = new javax.swing.JLabel();
        p46_cbx_mantenimiento = new javax.swing.JComboBox<>();
        jLabel31 = new javax.swing.JLabel();
        p47_cbx_corteza = new javax.swing.JComboBox<>();
        btn_eliminarpuntas = new javax.swing.JButton();
        jSeparator1 = new javax.swing.JSeparator();
        jButton4 = new javax.swing.JButton();

        setResizable(true);
        setTitle("Ficha de puntas de proyectil");
        addInternalFrameListener(new javax.swing.event.InternalFrameListener() {
            public void internalFrameActivated(javax.swing.event.InternalFrameEvent evt) {
            }
            public void internalFrameClosed(javax.swing.event.InternalFrameEvent evt) {
            }
            public void internalFrameClosing(javax.swing.event.InternalFrameEvent evt) {
            }
            public void internalFrameDeactivated(javax.swing.event.InternalFrameEvent evt) {
            }
            public void internalFrameDeiconified(javax.swing.event.InternalFrameEvent evt) {
            }
            public void internalFrameIconified(javax.swing.event.InternalFrameEvent evt) {
            }
            public void internalFrameOpened(javax.swing.event.InternalFrameEvent evt) {
                formInternalFrameOpened(evt);
            }
        });

        jPanel1.setBackground(new java.awt.Color(255, 255, 153));

        jLabel6.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N
        jLabel6.setText("Descripción segmental de puntas de proyectil");

        jButton1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jButton1.setText("Limpiar campos");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jLabel22.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        jLabel22.setText("Observaciones (500 caracteres)");

        p48_txta_observaciones.setColumns(20);
        p48_txta_observaciones.setFont(new java.awt.Font("Monospaced", 0, 16)); // NOI18N
        p48_txta_observaciones.setLineWrap(true);
        p48_txta_observaciones.setRows(5);
        p48_txta_observaciones.setWrapStyleWord(true);
        p48_txta_observaciones.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                p48_txta_observacionesKeyPressed(evt);
            }
            public void keyTyped(java.awt.event.KeyEvent evt) {
                p48_txta_observacionesKeyTyped(evt);
            }
        });
        jScrollPane2.setViewportView(p48_txta_observaciones);

        jPanel3.setBackground(new java.awt.Color(255, 255, 204));
        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Códigos*", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 14))); // NOI18N

        jLabel2.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel2.setText("Código ARQ:L punta de proyectil");

        p2_txt_codigopunta.setEditable(false);
        p2_txt_codigopunta.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N

        jLabel1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel1.setText("Grupo tipológico");

        p3_txt_grupo.setEditable(false);
        p3_txt_grupo.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p3_txt_grupo.setText("PP-Punta de proyectil");

        p4_cbx_subgrupo.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p4_cbx_subgrupo.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Subgrupos tipológicos de Puntas de Proyectil", "1-Apedunculada con aletas", "2-Apedunculada sin aletas", "3-Preforma  apedunculada", "4-Fragmento proximal apedunculado", "5-Con pedúnculo esbozado", "6-Con pedúnculo esbozado, hombros y/o aletas", "7-Con pedúnculo destacado", "8-Con pedúnculo destacado, hombros y/o aletas", "9-Con pedúnculo diferenciado", "10-Con pedúnculo diferenciado, hombros y/o aletas", "11-Preforma de punta pedunculada", "12-Fragmento  de pedúnculo", "13-Fragmento distal de limbo", "14-Fragmento mesial de limbo", "15-Fragmento basal de limbo", "16-Fragmento no diferenciado", "CN" }));

        jLabel12.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel12.setText("Código ARQ:L general");

        p1_txt_codigopieza.setEditable(false);
        p1_txt_codigopieza.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N

        jLabel3.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel3.setText("Familia: E");

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(p4_cbx_subgrupo, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jLabel12, javax.swing.GroupLayout.Alignment.TRAILING))
                                .addGap(14, 14, 14)
                                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(p1_txt_codigopieza, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(p2_txt_codigopunta, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(0, 0, Short.MAX_VALUE))))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGap(112, 112, 112)
                        .addComponent(jLabel1)
                        .addGap(14, 14, 14)
                        .addComponent(p3_txt_grupo, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGap(161, 161, 161)
                .addComponent(jLabel3)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGap(11, 11, 11)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel12)
                    .addComponent(p1_txt_codigopieza, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(p2_txt_codigopunta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(p3_txt_grupo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 39, Short.MAX_VALUE)
                .addComponent(p4_cbx_subgrupo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel3)
                .addGap(10, 10, 10))
        );

        jPanel4.setBackground(new java.awt.Color(255, 255, 204));
        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Limbo", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 14))); // NOI18N

        p6_cbx_forma_limbo.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p6_cbx_forma_limbo.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Forma geométrica del contorno", "TrRc-Triangular rectilínea, filo normal", "TrCv-Triangular convexilínea, filo normal", "TrCvDt-Triangular convexilínea, filo dentado", "TrCvFs-Triangular convexilínea, filo festoneado", "TrCvEs-Triangular convexilínea, filo con espolones", "TrCc-Triangular concavilínea, filo normal", "BiCv-Biconvexa o \"en mandorla\"", "Lc-Lanceolada normal", "LcDt-Lanceolada dentada", "LcBS-Lanceolada de bordes subparalelos, normal", "LcBSDt-Lanceolada de bordes subparalelos, dentada", "LcBSEs-Lanceolada de bordes subparalelos con espolones", "Cd-Cordiforme, normal", "CdAg-Cordiforme normal con ápice aguzado", "CdDt-Cordiforme dentada", "CdDtAg-Cordiforme, dentada con ápice aguzado", "Amig-Amigdaloide (asimétrica)", "Rb-Romboidal", "ND-No diferenciada", "CN" }));

        jPanel2.setBackground(new java.awt.Color(255, 255, 204));
        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Izquierdo (en cara de mejor factura)", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 2, 12))); // NOI18N

        p10_cbx_LIMBO_estadoborde_izquierdo.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p10_cbx_LIMBO_estadoborde_izquierdo.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Estado del borde", "Ent-Entero", "Frc-Fracturado", "Rbj-Rebajado", "Eli-Eliminado", "CN" }));

        p11_cbx_LIMBO_formaborde_izquierdo.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p11_cbx_LIMBO_formaborde_izquierdo.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Forma del borde", "Rc-Recto", "Rc.Cv-Recto-convexo", "CcMA-Cóncavo muy atenuado", "CcA-Cóncavo atenuado", "CcAs-Cóncavo asimétrico", "CvMA-Convexo muy atenuado", "CvA-Convexo atenuado", "CvAs-Convexo asimétrico", "CvE-Convexo extendido", "DtRc-Dentado rectilíneo", "DtCc-Dentado concavilíneo", "DtCv-Dentado convexilíneo", "PFND-Parcialmente fragmentado, no diferenciado.", "CN" }));

        jLabel9.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel9.setText("Longitud del borde");

        p12_txt_LIMBO_longitud_izquierdo.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p12_txt_LIMBO_longitud_izquierdo.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                p12_txt_LIMBO_longitud_izquierdoKeyTyped(evt);
            }
        });

        jLabel23.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel23.setText("Prof. de los lascados de format.");

        p13_txt_LIMBO_prof_izquierdo.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p13_txt_LIMBO_prof_izquierdo.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                p13_txt_LIMBO_prof_izquierdoKeyTyped(evt);
            }
        });

        p14_cbx_LIMBO_formaarista_izquierda.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p14_cbx_LIMBO_formaarista_izquierda.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Forma de la arista borde", "Nr-Normal", "SiR-Sinuosa regular", "SiIr-Sinuosa irregular", "FrND-Fragmento no diferenciado", "CN" }));

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(p14_cbx_LIMBO_formaarista_izquierda, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel23, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel9, javax.swing.GroupLayout.Alignment.TRAILING))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(p12_txt_LIMBO_longitud_izquierdo)
                            .addComponent(p13_txt_LIMBO_prof_izquierdo)))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(p11_cbx_LIMBO_formaborde_izquierdo, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(p10_cbx_LIMBO_estadoborde_izquierdo, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addGap(0, 1, Short.MAX_VALUE)))
                .addGap(22, 22, 22))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addComponent(p10_cbx_LIMBO_estadoborde_izquierdo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(7, 7, 7)
                .addComponent(p11_cbx_LIMBO_formaborde_izquierdo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(23, 23, 23)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jLabel9)
                    .addComponent(p12_txt_LIMBO_longitud_izquierdo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(17, 17, 17)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jLabel23)
                    .addComponent(p13_txt_LIMBO_prof_izquierdo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(30, 30, 30)
                .addComponent(p14_cbx_LIMBO_formaarista_izquierda, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(26, Short.MAX_VALUE))
        );

        jPanel6.setBackground(new java.awt.Color(255, 255, 204));
        jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Derecho (en cara de mejor factura)", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 2, 12))); // NOI18N

        p17_txt_LIMBO_longitud_derecho.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p17_txt_LIMBO_longitud_derecho.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                p17_txt_LIMBO_longitud_derechoKeyTyped(evt);
            }
        });

        jLabel24.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel24.setText("Prof. de los lascados de format.");

        p19_cbx_LIMBO_formaarista_derecho.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p19_cbx_LIMBO_formaarista_derecho.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Forma de la arista borde", "Nr-Normal", "SiR-Sinuosa regular", "SiIr-Sinuosa irregular", "FrND-Fragmento no diferenciado", "CN" }));

        p16_cbx_LIMBO_formaborde_derecho.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p16_cbx_LIMBO_formaborde_derecho.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Forma del borde", "Rc-Recto", "Rc.Cv-Recto-convexo", "CcMA-Cóncavo muy atenuado", "CcA-Cóncavo atenuado", "CcAs-Cóncavo asimétrico", "CvMA-Convexo muy atenuado", "CvA-Convexo atenuado", "CvAs-Convexo asimétrico", "CvE-Convexo extendido", "DtRc-Dentado rectilíneo", "DtCc-Dentado concavilíneo", "DtCv-Dentado convexilíneo", "PFND-Parcialmente fragmentado, no diferenciado.", "CN" }));

        jLabel19.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel19.setText("Longitud del borde");

        p18_txt_LIMBO_prof_derecho.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p18_txt_LIMBO_prof_derecho.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                p18_txt_LIMBO_prof_derechoKeyTyped(evt);
            }
        });

        p15_cbx_LIMBO_estadoborde_derecho.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p15_cbx_LIMBO_estadoborde_derecho.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Estado del borde", "Ent-Entero", "Frc-Fracturado", "Rbj-Rebajado", "Eli-Eliminado", "CN" }));

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(p19_cbx_LIMBO_formaarista_derecho, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel6Layout.createSequentialGroup()
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel24, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel19, javax.swing.GroupLayout.Alignment.TRAILING))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(p17_txt_LIMBO_longitud_derecho)
                            .addComponent(p18_txt_LIMBO_prof_derecho)))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel6Layout.createSequentialGroup()
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(p16_cbx_LIMBO_formaborde_derecho, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(p15_cbx_LIMBO_estadoborde_derecho, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addGap(0, 1, Short.MAX_VALUE)))
                .addGap(23, 23, 23))
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addGap(22, 22, 22)
                .addComponent(p15_cbx_LIMBO_estadoborde_derecho, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(7, 7, 7)
                .addComponent(p16_cbx_LIMBO_formaborde_derecho, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(23, 23, 23)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jLabel19)
                    .addComponent(p17_txt_LIMBO_longitud_derecho, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(17, 17, 17)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jLabel24)
                    .addComponent(p18_txt_LIMBO_prof_derecho, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(30, 30, 30)
                .addComponent(p19_cbx_LIMBO_formaarista_derecho, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(24, Short.MAX_VALUE))
        );

        jLabel10.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel10.setText("Ángulo del ápice (medido)");

        p7_txt_limbo_angulo_medido.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p7_txt_limbo_angulo_medido.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                p7_txt_limbo_angulo_medidoKeyTyped(evt);
            }
        });

        jLabel11.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel11.setText("Ángulo del ápice (estimado)");

        p8_txt_limbo_angulo_estimado.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p8_txt_limbo_angulo_estimado.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                p8_txt_limbo_angulo_estimadoKeyTyped(evt);
            }
        });

        p9_ckh_no_es_posible_medir_angulo.setBackground(new java.awt.Color(255, 255, 204));
        p9_ckh_no_es_posible_medir_angulo.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p9_ckh_no_es_posible_medir_angulo.setText("No es posible medir el ángulo (SM)");
        p9_ckh_no_es_posible_medir_angulo.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                p9_ckh_no_es_posible_medir_anguloItemStateChanged(evt);
            }
        });

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(p9_ckh_no_es_posible_medir_angulo)
                    .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(p6_cbx_forma_limbo, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(jPanel4Layout.createSequentialGroup()
                            .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(27, 27, 27)
                            .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(jLabel10)
                        .addGap(18, 18, 18)
                        .addComponent(p7_txt_limbo_angulo_medido, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(39, 39, 39)
                        .addComponent(jLabel11)
                        .addGap(18, 18, 18)
                        .addComponent(p8_txt_limbo_angulo_estimado, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(p6_cbx_forma_limbo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jLabel10)
                    .addComponent(p7_txt_limbo_angulo_medido, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel11)
                    .addComponent(p8_txt_limbo_angulo_estimado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(p9_ckh_no_es_posible_medir_angulo)
                .addGap(45, 45, 45)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(33, Short.MAX_VALUE))
        );

        jPanel5.setBackground(new java.awt.Color(255, 255, 204));
        jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Pedúnculo", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 14))); // NOI18N

        p23_cbx_pedunculo_forma.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p23_cbx_pedunculo_forma.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Forma de los bordes (en norma frontal)", "PaRc-Paralelos rectos", "PaCc-Paralelos concavilíneos", "Dv-Divergentes rectos", "DvCc-Divergentes concavilíneos", "CoRc-Convergentes rectos", "Acu-Acuminados (convergentes en punta, rectos)", "ND-No diferenciada", "CvCo-Convexilíneos convergentes", "CvEx-Concavilíneos expandidos", "ND-No diferenciados", "CN" }));

        p22_cbx_pedunculo_tratamiento.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p22_cbx_pedunculo_tratamiento.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Tratamiento del pedúnculo", "Rtq ó MrtBf -Retoque o microretoque bifacial normal", "Rtq ó MrtBf+UfA-Retoque o microretoque bifacial y unifacial abrupto", "Rtq o MrtUfA-Retoque unifacial abrupto", "Rtq ó MrtBf+Ab-Retoque o microretoque bifacial  + abrasión (embotamiento por abrasión)", "Rtq ó MtrAl-Retoque o microretoque alterno", "ND-No diferenciado", "CN" }));

        p21_txt_pedunculo_longitud.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p21_txt_pedunculo_longitud.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                p21_txt_pedunculo_longitudKeyTyped(evt);
            }
        });

        jLabel15.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel15.setText("Longitud borde más largo");

        p20_cbx_pedunculo_estado.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p20_cbx_pedunculo_estado.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Estado del pedúnculo", "Ent-Entero", "Frc-Fracturado", "Rbj-Rebajado", "Eli-Eliminado", "CN" }));

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(jLabel15)
                        .addGap(13, 13, 13)
                        .addComponent(p21_txt_pedunculo_longitud, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(p23_cbx_pedunculo_forma, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(p22_cbx_pedunculo_tratamiento, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(p20_cbx_pedunculo_estado, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 379, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(p20_cbx_pedunculo_estado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(7, 7, 7)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel15)
                    .addComponent(p21_txt_pedunculo_longitud, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(7, 7, 7)
                .addComponent(p22_cbx_pedunculo_tratamiento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(7, 7, 7)
                .addComponent(p23_cbx_pedunculo_forma, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(23, Short.MAX_VALUE))
        );

        jPanel7.setBackground(new java.awt.Color(255, 255, 204));
        jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Base (limbo o pedúnculo)", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 14))); // NOI18N

        p24_cbx_base_estado.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p24_cbx_base_estado.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Estado de la base", "Ent-Entero", "Frc-Fracturado", "Rbj-Rebajado", "Eli-Eliminado", "CN" }));

        jLabel16.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel16.setText("Ancho de la base (cm)");

        p25_txt_base_ancho.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p25_txt_base_ancho.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                p25_txt_base_anchoKeyTyped(evt);
            }
        });

        jLabel17.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel17.setText("Prof. de los lascados de formatización(cm)");

        p26_txt_base_prof.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p26_txt_base_prof.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                p26_txt_base_profKeyTyped(evt);
            }
        });

        p27_cbx_base_forma.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p27_cbx_base_forma.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Forma geométrica", "Rc-Rectilínea", "Cv-Convexilínea", "Cc-Concavilínea", "Es-Escotada", "Acu-Acuminado", "ND-No diferenciada", "CN" }));

        p28_cbx_base_tratamiento.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p28_cbx_base_tratamiento.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Tratamiento diferencial", "AdRtqBf/MrtBf-Adelgazada por retoque o microretoque bifacial normal", "AdRtqUf/AdMrtUf-Adelgazada por retoque o microretoque  unifacial", "Ac-Acanalada", "ERtqUF-Embotada por retoque unifacial (abrupto)", "Rtq ó MrtBf +Ab-Retoque o microretoque bifacial +Abrasión (embotamiento)", "ND-No diferenciada", "CN" }));

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addGap(76, 76, 76)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(p28_cbx_base_tratamiento, javax.swing.GroupLayout.PREFERRED_SIZE, 641, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel7Layout.createSequentialGroup()
                            .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel17, javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(jLabel16, javax.swing.GroupLayout.Alignment.TRAILING))
                            .addGap(28, 28, 28)
                            .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addComponent(p25_txt_base_ancho)
                                .addComponent(p26_txt_base_prof, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(p27_cbx_base_forma, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(p24_cbx_base_estado, javax.swing.GroupLayout.Alignment.LEADING, 0, 641, Short.MAX_VALUE))))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(p24_cbx_base_estado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(p25_txt_base_ancho, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel16))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jLabel17)
                    .addComponent(p26_txt_base_prof, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(p27_cbx_base_forma, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(p28_cbx_base_tratamiento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(23, Short.MAX_VALUE))
        );

        jPanel8.setBackground(new java.awt.Color(255, 255, 204));
        jPanel8.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Aletas", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 14))); // NOI18N

        jPanel9.setBackground(new java.awt.Color(255, 255, 204));
        jPanel9.setBorder(javax.swing.BorderFactory.createTitledBorder(null, " Izquierda (en cara de mejor factura)", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 2, 12))); // NOI18N

        p34_cbx_aletaIZQ_forma.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p34_cbx_aletaIZQ_forma.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Forma", "Ho-En hombro ", "EtOb-Entrante obtusa  (EtOb)", "EnRc-Entrante recta.", "EnObl-Entrante oblicua (recta)", "EtMOb-Entrante muy oblicua  (EtMOb)", "SaEp-Saliente en espolón.", "ND- No diferenciada por fractura", "CN" }));

        jLabel20.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel20.setText("Ancho");

        p30_txt_aletaIZQ_ancho.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p30_txt_aletaIZQ_ancho.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                p30_txt_aletaIZQ_anchoKeyTyped(evt);
            }
        });

        p29_cbx_aletaIZQ_estado.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p29_cbx_aletaIZQ_estado.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Estado", "En-Entera", "Fr-Fracturada", "CN" }));

        jLabel21.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel21.setText("Ángulo medido");

        p31_txt_aletaIZQ_angulomedido.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p31_txt_aletaIZQ_angulomedido.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                p31_txt_aletaIZQ_angulomedidoKeyTyped(evt);
            }
        });

        jLabel26.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel26.setText("Ángulo estimado");

        p32_txt_aletaIZQ_anguloestimado.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p32_txt_aletaIZQ_anguloestimado.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                p32_txt_aletaIZQ_anguloestimadoKeyTyped(evt);
            }
        });

        p33_chk_aletaIZQ_noangulo.setBackground(new java.awt.Color(255, 255, 204));
        p33_chk_aletaIZQ_noangulo.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p33_chk_aletaIZQ_noangulo.setText("No es posible medir el ángulo (SM)");
        p33_chk_aletaIZQ_noangulo.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                p33_chk_aletaIZQ_noanguloItemStateChanged(evt);
            }
        });

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel9Layout.createSequentialGroup()
                        .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel26)
                            .addComponent(jLabel21))
                        .addGap(12, 12, 12)
                        .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(p31_txt_aletaIZQ_angulomedido)
                            .addComponent(p32_txt_aletaIZQ_anguloestimado)))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel9Layout.createSequentialGroup()
                        .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addGroup(jPanel9Layout.createSequentialGroup()
                                    .addGap(10, 10, 10)
                                    .addComponent(jLabel20)
                                    .addGap(12, 12, 12)
                                    .addComponent(p30_txt_aletaIZQ_ancho))
                                .addComponent(p34_cbx_aletaIZQ_forma, javax.swing.GroupLayout.Alignment.TRAILING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(p29_cbx_aletaIZQ_estado, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 263, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(p33_chk_aletaIZQ_noangulo, javax.swing.GroupLayout.Alignment.LEADING))
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addGap(37, 37, 37))
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addGap(25, 25, 25)
                .addComponent(p29_cbx_aletaIZQ_estado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(7, 7, 7)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel20)
                    .addComponent(p30_txt_aletaIZQ_ancho, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(21, 21, 21)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel21)
                    .addComponent(p31_txt_aletaIZQ_angulomedido, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(12, 12, 12)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel26)
                    .addComponent(p32_txt_aletaIZQ_anguloestimado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(p33_chk_aletaIZQ_noangulo)
                .addGap(24, 24, 24)
                .addComponent(p34_cbx_aletaIZQ_forma, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel10.setBackground(new java.awt.Color(255, 255, 204));
        jPanel10.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Derecha (en cara de mejor factura)", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 2, 12))); // NOI18N

        p40_cbx_aletaDER_forma.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p40_cbx_aletaDER_forma.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Forma", "Ho-En hombro ", "EtOb-Entrante obtusa  (EtOb)", "EnRc-Entrante recta.", "EnObl-Entrante oblicua (recta)", "EtMOb-Entrante muy oblicua  (EtMOb)", "SaEp-Saliente en espolón.", "ND- No diferenciada por fractura", "CN" }));

        p35_cbx_aletaDER_estado.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p35_cbx_aletaDER_estado.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Estado", "En-Entera", "Fr-Fracturada", "CN" }));

        jLabel25.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel25.setText("Ancho");

        p36_txt_aletaDER_ancho.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p36_txt_aletaDER_ancho.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                p36_txt_aletaDER_anchoKeyTyped(evt);
            }
        });

        p37_txt_aletaDER_angulomedido.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p37_txt_aletaDER_angulomedido.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                p37_txt_aletaDER_angulomedidoKeyTyped(evt);
            }
        });

        jLabel27.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel27.setText("Ángulo medido");

        p38_txt_aletaDER_anguloestimado.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p38_txt_aletaDER_anguloestimado.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                p38_txt_aletaDER_anguloestimadoKeyTyped(evt);
            }
        });

        jLabel28.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel28.setText("Ángulo estimado");

        p39_chk_aletaDER_noangulo.setBackground(new java.awt.Color(255, 255, 204));
        p39_chk_aletaDER_noangulo.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p39_chk_aletaDER_noangulo.setText("No es posible medir el ángulo (SM)");
        p39_chk_aletaDER_noangulo.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                p39_chk_aletaDER_noanguloItemStateChanged(evt);
            }
        });

        javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addComponent(p39_chk_aletaDER_noangulo)
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addGroup(jPanel10Layout.createSequentialGroup()
                                    .addGap(10, 10, 10)
                                    .addComponent(jLabel25)
                                    .addGap(12, 12, 12)
                                    .addComponent(p36_txt_aletaDER_ancho))
                                .addComponent(p40_cbx_aletaDER_forma, javax.swing.GroupLayout.Alignment.TRAILING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(p35_cbx_aletaDER_estado, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 263, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel10Layout.createSequentialGroup()
                                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel27)
                                    .addComponent(jLabel28))
                                .addGap(12, 12, 12)
                                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(p38_txt_aletaDER_anguloestimado)
                                    .addComponent(p37_txt_aletaDER_angulomedido))))
                        .addGap(16, 16, 16))))
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addGap(24, 24, 24)
                .addComponent(p35_cbx_aletaDER_estado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(7, 7, 7)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel25)
                    .addComponent(p36_txt_aletaDER_ancho, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(21, 21, 21)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel27)
                    .addComponent(p37_txt_aletaDER_angulomedido, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel28)
                    .addComponent(p38_txt_aletaDER_anguloestimado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(9, 9, 9)
                .addComponent(p39_chk_aletaDER_noangulo)
                .addGap(24, 24, 24)
                .addComponent(p40_cbx_aletaDER_forma, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(27, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addGap(55, 55, 55)
                .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(46, 46, 46))
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jPanel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(31, Short.MAX_VALUE))
        );

        jPanel11.setBackground(new java.awt.Color(255, 255, 204));
        jPanel11.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Forma general de la punta de proyectil (limbo y pedúnculo)", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 14))); // NOI18N

        p5_cbx_forma_punta.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p5_cbx_forma_punta.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Seleccione...", "TrRc-Triangular rectilínea, filo normal", "TrCv-Triangular convexilínea, filo normal", "TrCvDt-Triangular convexilínea, filo dentado", "TrCvFs-Triangular convexilínea, filo festoneado", "TrCvEs-Triangular convexilínea, filo con espolones", "TrCc-Triangular concavilínea, filo normal", "BiCv-Biconvexa o \"en mandorla\"", "Lc-Lanceolada normal", "LcDt-Lanceolada dentada", "LcBS-Lanceolada de bordes subparalelos, normal", "LcBSDt-Lanceolada de bordes subparalelos, dentada", "LcBSEs-Lanceolada de bordes subparalelos con espolones", "Cd-Cordiforme, normal", "CdAg-Cordiforme normal con ápice aguzado", "CdDt-Cordiforme dentada", "CdDtAg-Cordiforme, dentada con ápice aguzado", "Amig-Amigdaloide (asimétrica)", "Rb-Romboidal", "ND-No diferenciada", "CN" }));

        javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
        jPanel11.setLayout(jPanel11Layout);
        jPanel11Layout.setHorizontalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(p5_cbx_forma_punta, javax.swing.GroupLayout.PREFERRED_SIZE, 669, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel11Layout.setVerticalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addGap(19, 19, 19)
                .addComponent(p5_cbx_forma_punta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(19, Short.MAX_VALUE))
        );

        jPanel12.setBackground(new java.awt.Color(255, 255, 204));
        jPanel12.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Técnicas de formatización * (marque lo que corresponda)", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 14))); // NOI18N

        p45_chk_nodiferenciado.setBackground(new java.awt.Color(255, 255, 204));
        p45_chk_nodiferenciado.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        p45_chk_nodiferenciado.setForeground(new java.awt.Color(255, 153, 102));
        p45_chk_nodiferenciado.setText("No diferenciado");

        p41_chk_retalla.setBackground(new java.awt.Color(255, 255, 204));
        p41_chk_retalla.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p41_chk_retalla.setText("Rt-Retalla (>7mm)");
        p41_chk_retalla.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                p41_chk_retallaActionPerformed(evt);
            }
        });

        p42_chk_retoque.setBackground(new java.awt.Color(255, 255, 204));
        p42_chk_retoque.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p42_chk_retoque.setText("Rq-Retoque (7 a 2mm)");

        p43_chk_microrretoque.setBackground(new java.awt.Color(255, 255, 204));
        p43_chk_microrretoque.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p43_chk_microrretoque.setText("Mrq-Microrretoque (<2mm)");

        p44_chk_pulido.setBackground(new java.awt.Color(255, 255, 204));
        p44_chk_pulido.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p44_chk_pulido.setText("Pul-Pulido");

        p0_chk_talla_ext_nobip.setBackground(new java.awt.Color(255, 255, 204));
        p0_chk_talla_ext_nobip.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p0_chk_talla_ext_nobip.setText("TENBp-Talla de extraccion no bipolar");
        p0_chk_talla_ext_nobip.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                p0_chk_talla_ext_nobipActionPerformed(evt);
            }
        });

        p0_abrasion.setBackground(new java.awt.Color(255, 255, 204));
        p0_abrasion.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p0_abrasion.setText("Ab-Abrasión");

        javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);
        jPanel12.setLayout(jPanel12Layout);
        jPanel12Layout.setHorizontalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel12Layout.createSequentialGroup()
                .addGap(36, 36, 36)
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel12Layout.createSequentialGroup()
                        .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel12Layout.createSequentialGroup()
                                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(p43_chk_microrretoque)
                                    .addComponent(p42_chk_retoque))
                                .addGap(248, 248, 248)
                                .addComponent(p45_chk_nodiferenciado))
                            .addGroup(jPanel12Layout.createSequentialGroup()
                                .addComponent(p41_chk_retalla)
                                .addGap(304, 304, 304)
                                .addComponent(p0_abrasion)))
                        .addGap(192, 192, 192))
                    .addGroup(jPanel12Layout.createSequentialGroup()
                        .addComponent(p0_chk_talla_ext_nobip)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(p44_chk_pulido)
                        .addGap(240, 240, 240))))
        );
        jPanel12Layout.setVerticalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel12Layout.createSequentialGroup()
                .addGap(15, 15, 15)
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(p0_chk_talla_ext_nobip)
                    .addComponent(p44_chk_pulido))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(p41_chk_retalla)
                    .addComponent(p0_abrasion))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(p42_chk_retoque)
                    .addComponent(p45_chk_nodiferenciado))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(p43_chk_microrretoque)
                .addGap(15, 15, 15))
        );

        jLabel30.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        jLabel30.setText("Mantenimiento");

        p46_cbx_mantenimiento.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p46_cbx_mantenimiento.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Seleccione", "1-Sí", "0-No", "CN" }));

        jLabel31.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        jLabel31.setText("¿Corteza?");

        p47_cbx_corteza.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        p47_cbx_corteza.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Seleccione", "1-Sí", "0-No", "CN" }));

        btn_eliminarpuntas.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        btn_eliminarpuntas.setText("Eliminar");
        btn_eliminarpuntas.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_eliminarpuntasActionPerformed(evt);
            }
        });

        jButton4.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jButton4.setText("Guardar");
        jButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton4ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(10, 10, 10)
                        .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 780, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                            .addGap(32, 32, 32)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jPanel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jPanel12, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addComponent(jLabel31)
                                        .addGap(18, 18, 18)
                                        .addComponent(p47_cbx_corteza, javax.swing.GroupLayout.PREFERRED_SIZE, 300, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addComponent(jLabel30)
                                        .addGap(18, 18, 18)
                                        .addComponent(p46_cbx_mantenimiento, javax.swing.GroupLayout.PREFERRED_SIZE, 300, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                            .addGap(30, 30, 30)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jScrollPane2)
                                .addGroup(jPanel1Layout.createSequentialGroup()
                                    .addComponent(jLabel22)
                                    .addGap(0, 0, Short.MAX_VALUE))
                                .addGroup(jPanel1Layout.createSequentialGroup()
                                    .addComponent(jButton1)
                                    .addGap(162, 162, 162)
                                    .addComponent(btn_eliminarpuntas, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(212, 212, 212)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jSeparator1))))
                .addContainerGap(76, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(21, 21, 21)
                .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 0, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel6)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(29, 29, 29)
                .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(24, 24, 24)
                .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(36, 36, 36)
                .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(36, 36, 36)
                .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(37, 37, 37)
                .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jPanel12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(21, 21, 21)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(p46_cbx_mantenimiento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel30))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(p47_cbx_corteza, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel31))
                .addGap(27, 27, 27)
                .addComponent(jLabel22)
                .addGap(3, 3, 3)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(37, 37, 37)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton1)
                    .addComponent(btn_eliminarpuntas)
                    .addComponent(jButton4))
                .addContainerGap(95, Short.MAX_VALUE))
        );

        jScrollPane1.setViewportView(jPanel1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 2287, Short.MAX_VALUE)
                .addGap(0, 0, 0))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents
private void validarcampos(){
    
ValidarCampos v = new ValidarCampos();

v.validarcamposcbx(p4_cbx_subgrupo);      
v.validarcamposcbx(p5_cbx_forma_punta);      
v.validarcamposcbx(p6_cbx_forma_limbo); 
v.validarcamposcbx(p10_cbx_LIMBO_estadoborde_izquierdo); 
v.validarcamposcbx(p11_cbx_LIMBO_formaborde_izquierdo); 
v.validarcamposcbx(p14_cbx_LIMBO_formaarista_izquierda); 
v.validarcamposcbx(p15_cbx_LIMBO_estadoborde_derecho); 
v.validarcamposcbx(p16_cbx_LIMBO_formaborde_derecho); 
v.validarcamposcbx(p20_cbx_pedunculo_estado); 
v.validarcamposcbx(p22_cbx_pedunculo_tratamiento); 
v.validarcamposcbx(p23_cbx_pedunculo_forma); 
v.validarcamposcbx(p24_cbx_base_estado); 
v.validarcamposcbx(p27_cbx_base_forma); 
v.validarcamposcbx(p28_cbx_base_tratamiento); 
v.validarcamposcbx(p29_cbx_aletaIZQ_estado); 
v.validarcamposcbx(p34_cbx_aletaIZQ_forma); 
v.validarcamposcbx(p35_cbx_aletaDER_estado); 
v.validarcamposcbx(p40_cbx_aletaDER_forma); 
v.validarcamposcbx(p46_cbx_mantenimiento); 
v.validarcamposcbx(p47_cbx_corteza); 

v.validarcampostxtarea(p48_txta_observaciones); 


v.validarcampostxt(p7_txt_limbo_angulo_medido);      
v.validarcampostxt(p8_txt_limbo_angulo_estimado);      
v.validarcampostxt(p12_txt_LIMBO_longitud_izquierdo);      
v.validarcampostxt(p13_txt_LIMBO_prof_izquierdo);      
v.validarcampostxt(p17_txt_LIMBO_longitud_derecho);      
v.validarcampostxt(p18_txt_LIMBO_prof_derecho);      
v.validarcampostxt(p21_txt_pedunculo_longitud);      
v.validarcampostxt(p25_txt_base_ancho);      
v.validarcampostxt(p26_txt_base_prof);      
v.validarcampostxt(p30_txt_aletaIZQ_ancho);      
v.validarcampostxt(p31_txt_aletaIZQ_angulomedido);      
v.validarcampostxt(p32_txt_aletaIZQ_anguloestimado);      
v.validarcampostxt(p36_txt_aletaDER_ancho);      
v.validarcampostxt(p37_txt_aletaDER_angulomedido);      
v.validarcampostxt(p38_txt_aletaDER_anguloestimado);      



     
    
}
    private void p12_txt_LIMBO_longitud_izquierdoKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_p12_txt_LIMBO_longitud_izquierdoKeyTyped

        char caracter = evt.getKeyChar();
        if (((caracter < '0') || (caracter > '9')) && (caracter != evt.VK_BACK_SPACE)
            && (caracter != '.') ) {
            evt.consume();
        }
    }//GEN-LAST:event_p12_txt_LIMBO_longitud_izquierdoKeyTyped

    private void p13_txt_LIMBO_prof_izquierdoKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_p13_txt_LIMBO_prof_izquierdoKeyTyped

        char caracter = evt.getKeyChar();
        if (((caracter < '0') || (caracter > '9')) && (caracter != evt.VK_BACK_SPACE)
            && (caracter != '.') ) {
            evt.consume();
        }
    }//GEN-LAST:event_p13_txt_LIMBO_prof_izquierdoKeyTyped

    private void p17_txt_LIMBO_longitud_derechoKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_p17_txt_LIMBO_longitud_derechoKeyTyped

        char caracter = evt.getKeyChar();
        if (((caracter < '0') || (caracter > '9')) && (caracter != evt.VK_BACK_SPACE)
            && (caracter != '.') ) {
            evt.consume();
        }
    }//GEN-LAST:event_p17_txt_LIMBO_longitud_derechoKeyTyped

    private void p18_txt_LIMBO_prof_derechoKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_p18_txt_LIMBO_prof_derechoKeyTyped

        char caracter = evt.getKeyChar();
        if (((caracter < '0') || (caracter > '9')) && (caracter != evt.VK_BACK_SPACE)
            && (caracter != '.') ) {
            evt.consume();
        }
    }//GEN-LAST:event_p18_txt_LIMBO_prof_derechoKeyTyped

    private void p21_txt_pedunculo_longitudKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_p21_txt_pedunculo_longitudKeyTyped

        char caracter = evt.getKeyChar();
        if (((caracter < '0') || (caracter > '9')) && (caracter != evt.VK_BACK_SPACE)
            && (caracter != '.') ) {
            evt.consume();
        }       // TODO add your handling code here:
    }//GEN-LAST:event_p21_txt_pedunculo_longitudKeyTyped

    private void p25_txt_base_anchoKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_p25_txt_base_anchoKeyTyped

        char caracter = evt.getKeyChar();
        if (((caracter < '0') || (caracter > '9')) && (caracter != evt.VK_BACK_SPACE)
            && (caracter != '.') ) {
            evt.consume();
        }
    }//GEN-LAST:event_p25_txt_base_anchoKeyTyped

    private void p26_txt_base_profKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_p26_txt_base_profKeyTyped

        char caracter = evt.getKeyChar();
        if (((caracter < '0') || (caracter > '9')) && (caracter != evt.VK_BACK_SPACE)
            && (caracter != '.') ) {
            evt.consume();
        }
    }//GEN-LAST:event_p26_txt_base_profKeyTyped

    private void p30_txt_aletaIZQ_anchoKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_p30_txt_aletaIZQ_anchoKeyTyped

        char caracter = evt.getKeyChar();
        if (((caracter < '0') || (caracter > '9')) && (caracter != evt.VK_BACK_SPACE)
            && (caracter != '.') ) {
            evt.consume();
        }
    }//GEN-LAST:event_p30_txt_aletaIZQ_anchoKeyTyped

    private void p36_txt_aletaDER_anchoKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_p36_txt_aletaDER_anchoKeyTyped

        char caracter = evt.getKeyChar();
        if (((caracter < '0') || (caracter > '9')) && (caracter != evt.VK_BACK_SPACE)
            && (caracter != '.') ) {
            evt.consume();
        }
    }//GEN-LAST:event_p36_txt_aletaDER_anchoKeyTyped

    private void p7_txt_limbo_angulo_medidoKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_p7_txt_limbo_angulo_medidoKeyTyped
        // TODO add your handling code here:
    }//GEN-LAST:event_p7_txt_limbo_angulo_medidoKeyTyped

    private void p8_txt_limbo_angulo_estimadoKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_p8_txt_limbo_angulo_estimadoKeyTyped
        // TODO add your handling code here:
    }//GEN-LAST:event_p8_txt_limbo_angulo_estimadoKeyTyped

    private void p31_txt_aletaIZQ_angulomedidoKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_p31_txt_aletaIZQ_angulomedidoKeyTyped

    }//GEN-LAST:event_p31_txt_aletaIZQ_angulomedidoKeyTyped

    private void p32_txt_aletaIZQ_anguloestimadoKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_p32_txt_aletaIZQ_anguloestimadoKeyTyped
        // TODO add your handling code here:
    }//GEN-LAST:event_p32_txt_aletaIZQ_anguloestimadoKeyTyped

    private void p37_txt_aletaDER_angulomedidoKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_p37_txt_aletaDER_angulomedidoKeyTyped
        // TODO add your handling code here:
    }//GEN-LAST:event_p37_txt_aletaDER_angulomedidoKeyTyped

    private void p38_txt_aletaDER_anguloestimadoKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_p38_txt_aletaDER_anguloestimadoKeyTyped
        // TODO add your handling code here:
    }//GEN-LAST:event_p38_txt_aletaDER_anguloestimadoKeyTyped

    private void p41_chk_retallaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_p41_chk_retallaActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_p41_chk_retallaActionPerformed

    private void p48_txta_observacionesKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_p48_txta_observacionesKeyTyped
  if (p48_txta_observaciones.getText().length()== 500){
    evt.consume();
}
    }//GEN-LAST:event_p48_txta_observacionesKeyTyped

    private void p48_txta_observacionesKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_p48_txta_observacionesKeyPressed
if (evt.getKeyChar() != evt.VK_ENTER && evt.getKeyChar() != evt.VK_TAB)
				{
				} else {
   
    evt.consume();
    }
    }//GEN-LAST:event_p48_txta_observacionesKeyPressed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
limpiarcampos();
    }//GEN-LAST:event_jButton1ActionPerformed

    private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
validarcampos();


validarcampos();      

//



if(editando==false){
 
    guardar();

}else{
    actualizarregistro();
}




expandirultimarama();

//        guardar();
//        this.dispose();
//        INGRESO_FORMATIZADO general = new INGRESO_FORMATIZADO();
//        general.setVisible(true);


////ingresar al arbol
//        selectednode = (DefaultMutableTreeNode) jTree1.getLastSelectedPathComponent();
//        System.out.println("altura: "+ selectednode.getDepth());
//        String Tipo_ficha = selectednode.toString()+"/Punta de proyectil";
//        selectednode = (DefaultMutableTreeNode) jTree1.getLastSelectedPathComponent();
// //si la seleccion no está vacía
//        if(selectednode!=null){
////si es que no tiene hijos, agregar nodo
//            if(selectednode.getChildCount()==0){
//    DefaultMutableTreeNode general = new DefaultMutableTreeNode(Tipo_ficha);  
//   selectednode.add(general);
//   model.reload();  
////si es que ya tiene hijos, agregar al último
//            }else{
//            selectednode.insert (new DefaultMutableTreeNode(Tipo_ficha),selectednode.getIndex(selectednode.getLastChild()));
//            model.reload(selectednode);
//        }        }
//
//expandirultimarama();
//this.dispose();
    }//GEN-LAST:event_jButton4ActionPerformed

    private void formInternalFrameOpened(javax.swing.event.InternalFrameEvent evt) {//GEN-FIRST:event_formInternalFrameOpened
consultarid();
    }//GEN-LAST:event_formInternalFrameOpened
private void guardar(){
    
         try {
            conexion c = new conexion();
            c.getConexion();
            int aux = c.insert("insert into PUNTAS_DE_PROYECTIL2 (ID_PUNTAS, ID_FORMATIZADOS, ZONA_AMBIENTAL,"
                + "LOCALIDAD,"
                + "SITIO,"
                + "SIGLA_SITIO,"
                + "CAPA_NIVEL,"
                + "ESTRUC_ARQ,"
                + "PISO_SUBCAPA,"
                + "ESTRUC_PLANTA,"
                + "NOMBRE_ESTRUC_PLANTA,"
                + "EPISODIO_ESTRUC_PLANTA,"
                + "CUADRO,"
                + "MICROSECTOR,"
                    
                + "GRUPO,"
                + "SUBGRUPO,"
                + "FORMA_PUNTA,"
                + "FORMA_LIMBO,"
                + "LIMBO_ANGULO_MEDIDO,"
                + "LIMBO_ANGULO_ESTIMADO,"
                    
                + "LIMBOIZQ_ESTADO_BORDE,"
                + "LIMBOIZQ_FORMA_BORDE,"
                + "LIMBOIZQ_LONGITUD,"
                + "LIMBOIZQ_PROF,"
                + "LIMBOIZQ_FORMA_ARISTA,"

                + "LIMBODER_ESTADO_BORDE,"
                + "LIMBODER_FORMA_BORDE,"
                + "LIMBODER_LONGITUD,"
                + "LIMBODER_PROF,"
                + "LIMBODER_FORMA_ARISTA,"
                    
                + "PEDUNCULO_ESTADO,"
                + "PEDUNCULO_LONGITUD,"
                + "PEDUNCULO_TRATAMIENTO,"
                + "PEDUNCULO_FORMA,"
                    
                + "BASE_ESTADO,"
                + "BASE_ANCHO,"
                + "BASE_PROF,"
                + "BASE_FORMA,"
                + "BASE_TRATAM,"
                    
                + "ALETAIZQ_ESTADO,"
                + "ALETAIZQ_ANCHO,"
                + "ALETAIZQ_ANGULO_MEDIDO,"
                + "ALETAIZQ_ANGULO_ESTIMADO,"
                + "ALETAIZQ_FORMA,"
                    
                + "ALETADER_ESTADO,"
                + "ALETADER_ANCHO,"
                + "ALETADER_ANGULO_MEDIDO,"
                + "ALETADER_ANGULO_ESTIMADO,"
                + "ALETADER_FORMA,"
                    
                + "RETALLA,"
                + "RETOQUE,"
                + "MICRORRETOQUE,"
                + "PULIDO,"
                + "NO_DIFERENCIADO,"
                    
                + "MANTENIMIENTO,"
                + "CORTEZA,"
                + "OBSERVACIONES, "
                + "TALLA_EXT_NOBIP, "
                + "ABRASION "
                    
            
                +") Values ("+Integer.parseInt(p2_txt_codigopunta.getText())+","

                +Integer.parseInt(p1_txt_codigopieza.getText())+","

                +"'"+zona_ambiental+"',"
                +"'"+localidad+"',"
                +"'"+sitio+"',"
                +"'"+siglasitio+"',"
                +"'"+capa_nivel+"',"
                +"'"+estruct_arq+"',"
                +"'"+piso_subcapa+"',"
                +"'"+tipo_estruct_planta+"',"
                +"'"+nombre_estruct_planta+"',"
                +"'"+episodio_estruct_planta+"',"
                +"'"+cuadro+"',"
                +"'"+microsector+"',"

                +"'"+p3_txt_grupo.getText()+"',"
                +"'"+p4_cbx_subgrupo.getSelectedItem()+"',"
                +"'"+p5_cbx_forma_punta.getSelectedItem()+"',"
                +"'"+p6_cbx_forma_limbo.getSelectedItem()+"',"
                +"'"+p7_txt_limbo_angulo_medido.getText()+"',"
                +"'"+p8_txt_limbo_angulo_estimado.getText()+"',"
                +"'"+p10_cbx_LIMBO_estadoborde_izquierdo.getSelectedItem()+"',"
                +"'"+p11_cbx_LIMBO_formaborde_izquierdo.getSelectedItem()+"',"
                +"'"+p12_txt_LIMBO_longitud_izquierdo.getText()+"',"
                +"'"+p13_txt_LIMBO_prof_izquierdo.getText()+"',"
                +"'"+p14_cbx_LIMBO_formaarista_izquierda.getSelectedItem()+"',"
                +"'"+p15_cbx_LIMBO_estadoborde_derecho.getSelectedItem()+"',"
                +"'"+p16_cbx_LIMBO_formaborde_derecho.getSelectedItem()+"',"
                +"'"+p17_txt_LIMBO_longitud_derecho.getText()+"',"
                +"'"+p18_txt_LIMBO_prof_derecho.getText()+"',"
                +"'"+p19_cbx_LIMBO_formaarista_derecho.getSelectedItem()+"',"
                +"'"+p20_cbx_pedunculo_estado.getSelectedItem()+"',"
                +"'"+p21_txt_pedunculo_longitud.getText()+"',"
                +"'"+p22_cbx_pedunculo_tratamiento.getSelectedItem()+"',"
                +"'"+p23_cbx_pedunculo_forma.getSelectedItem()+"',"
                +"'"+p24_cbx_base_estado.getSelectedItem()+"',"
                +"'"+p25_txt_base_ancho.getText()+"',"
                +"'"+p26_txt_base_prof.getText()+"',"
                +"'"+p27_cbx_base_forma.getSelectedItem()+"',"
                +"'"+p28_cbx_base_tratamiento.getSelectedItem()+"',"
                +"'"+p29_cbx_aletaIZQ_estado.getSelectedItem()+"',"
                +"'"+p30_txt_aletaIZQ_ancho.getText()+"',"
                +"'"+p31_txt_aletaIZQ_angulomedido.getText()+"',"
                +"'"+p32_txt_aletaIZQ_anguloestimado.getText()+"',"
                +"'"+p34_cbx_aletaIZQ_forma.getSelectedItem()+"',"
                +"'"+p35_cbx_aletaDER_estado.getSelectedItem()+"',"
                +"'"+p36_txt_aletaDER_ancho.getText()+"',"
                +"'"+p37_txt_aletaDER_angulomedido.getText()+"',"
                +"'"+p38_txt_aletaDER_anguloestimado.getText()+"',"
                +"'"+p40_cbx_aletaDER_forma.getSelectedItem()+"',"
                +"'"+p41_chk_retalla.isSelected()+"',"
                +"'"+p42_chk_retoque.isSelected()+"',"
                +"'"+p43_chk_microrretoque.isSelected()+"',"
                +"'"+p44_chk_pulido.isSelected()+"',"
                +"'"+p45_chk_nodiferenciado.isSelected()+"',"
                +"'"+p46_cbx_mantenimiento.getSelectedItem()+"',"
                +"'"+p47_cbx_corteza.getSelectedItem()+"',"
                +"'"+p48_txta_observaciones.getText()+"', "
                +"'"+p0_chk_talla_ext_nobip.isSelected()+"', "
                +"'"+p0_abrasion.isSelected()+"' "
                
                        
              
               
                + ")");

            c.closeconnection();
            if (aux>0){
                agregarhoja();
                limpiarcampos();
                consultarid();
                btn_eliminarpuntas.setEnabled(false);
            }
        

            
        } catch (SQLException ex) {
            Logger.getLogger(Internal_puntas.class.getName()).log(Level.SEVERE, null, ex);
        }
}
private void agregarhoja(){
String Tipo_ficha = "PP-"+p2_txt_codigopunta.getText()+"/Pieza-"+p1_txt_codigopieza.getText();
DefaultMutableTreeNode general = new DefaultMutableTreeNode(Tipo_ficha);  
selectednodeparaeliminar.add(general);
model.reload();  
expandirultimarama();
}   
    private void p9_ckh_no_es_posible_medir_anguloItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_p9_ckh_no_es_posible_medir_anguloItemStateChanged
    anguloSM(p9_ckh_no_es_posible_medir_angulo, p8_txt_limbo_angulo_estimado, p7_txt_limbo_angulo_medido);
    }//GEN-LAST:event_p9_ckh_no_es_posible_medir_anguloItemStateChanged

    private void p33_chk_aletaIZQ_noanguloItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_p33_chk_aletaIZQ_noanguloItemStateChanged
anguloSM(p33_chk_aletaIZQ_noangulo, p32_txt_aletaIZQ_anguloestimado, p31_txt_aletaIZQ_angulomedido);
    }//GEN-LAST:event_p33_chk_aletaIZQ_noanguloItemStateChanged

    private void p39_chk_aletaDER_noanguloItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_p39_chk_aletaDER_noanguloItemStateChanged
anguloSM(p39_chk_aletaDER_noangulo, p38_txt_aletaDER_anguloestimado, p37_txt_aletaDER_angulomedido);
    }//GEN-LAST:event_p39_chk_aletaDER_noanguloItemStateChanged

    private void btn_eliminarpuntasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_eliminarpuntasActionPerformed
eliminar();
    }//GEN-LAST:event_btn_eliminarpuntasActionPerformed

    private void p0_chk_talla_ext_nobipActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_p0_chk_talla_ext_nobipActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_p0_chk_talla_ext_nobipActionPerformed
private void anguloSM (JCheckBox chk, JTextField txt1, JTextField txt2 ){
    if(chk.isSelected()==true){
        txt1.setText("SM");
        txt1.setEnabled(false);
        txt2.setText("SM");
        txt2.setEnabled(false);
    }else{
        txt1.setText("");
        txt1.setEnabled(true);
        txt2.setText("");
        txt2.setEnabled(true);
    }
    
}
    private void consultarid(){
    InteraccionesBD inter = new InteraccionesBD();
    int id = inter.obtenersiguienteID("PUNTAS_DE_PROYECTIL2", "ID_PUNTAS");
    p2_txt_codigopunta.setText(String.valueOf(id));
    
    }
    
    private void limpiarcampos(){
   
    p3_txt_grupo.setText("");
    p4_cbx_subgrupo.setSelectedIndex(0);
    p5_cbx_forma_punta.setSelectedIndex(0);
    p6_cbx_forma_limbo.setSelectedIndex(0);
    p7_txt_limbo_angulo_medido.setText("");
    p8_txt_limbo_angulo_estimado.setText("");
    p9_ckh_no_es_posible_medir_angulo.setSelected(false);
    p10_cbx_LIMBO_estadoborde_izquierdo.setSelectedIndex(0);
    p11_cbx_LIMBO_formaborde_izquierdo.setSelectedIndex(0);
    p12_txt_LIMBO_longitud_izquierdo.setText("");
    p13_txt_LIMBO_prof_izquierdo.setText("");
    p14_cbx_LIMBO_formaarista_izquierda.setSelectedIndex(0);
    p15_cbx_LIMBO_estadoborde_derecho.setSelectedIndex(0);
    p16_cbx_LIMBO_formaborde_derecho.setSelectedIndex(0);
    p17_txt_LIMBO_longitud_derecho.setText("");
    p18_txt_LIMBO_prof_derecho.setText("");
    p19_cbx_LIMBO_formaarista_derecho.setSelectedIndex(0);
    p20_cbx_pedunculo_estado.setSelectedIndex(0);
    p21_txt_pedunculo_longitud.setText("");
    p22_cbx_pedunculo_tratamiento.setSelectedIndex(0);
    p23_cbx_pedunculo_forma.setSelectedIndex(0);
    p24_cbx_base_estado.setSelectedIndex(0);
    p25_txt_base_ancho.setText("");
    p26_txt_base_prof.setText("");
    p27_cbx_base_forma.setSelectedIndex(0);
    p28_cbx_base_tratamiento.setSelectedIndex(0);
    p29_cbx_aletaIZQ_estado.setSelectedIndex(0);
    p30_txt_aletaIZQ_ancho.setText("");
    p31_txt_aletaIZQ_angulomedido.setText("");
    p32_txt_aletaIZQ_anguloestimado.setText("");
    p33_chk_aletaIZQ_noangulo.setSelected(false);
    p34_cbx_aletaIZQ_forma.setSelectedIndex(0);
    p35_cbx_aletaDER_estado.setSelectedIndex(0);
    p36_txt_aletaDER_ancho.setText("");
    p37_txt_aletaDER_angulomedido.setText("");
    p38_txt_aletaDER_anguloestimado.setText("");
    p39_chk_aletaDER_noangulo.setSelected(false);
    p40_cbx_aletaDER_forma.setSelectedIndex(0);
    p41_chk_retalla.setSelected(false);
    p0_chk_talla_ext_nobip.setSelected(false);
    p0_abrasion.setSelected(false);
    p42_chk_retoque.setSelected(false);
    p43_chk_microrretoque.setSelected(false);
    p44_chk_pulido.setSelected(false);
    p45_chk_nodiferenciado.setSelected(false);
    p46_cbx_mantenimiento.setSelectedIndex(0);
    p47_cbx_corteza.setSelectedIndex(0);
    p48_txta_observaciones.setText("");
           
}
    public void cargaridPuntas(int id){
        
         java.sql.ResultSet rs=null;       
        try {
            conexion c = new conexion();
            c.getConexion();
            
             rs = c.consulta("SELECT * FROM PUNTAS_DE_PROYECTIL2 WHERE (ID_PUNTAS="+id+")");
             
             while(rs.next()){
                 p1_txt_codigopieza.setText(String.valueOf(rs.getInt("ID_FORMATIZADOS")));
                 p2_txt_codigopunta.setText(String.valueOf(rs.getInt("ID_PUNTAS")));
                 p3_txt_grupo.setText(String.valueOf(rs.getString("GRUPO")));
                 p4_cbx_subgrupo.setSelectedItem(rs.getString("SUBGRUPO"));
                 p5_cbx_forma_punta.setSelectedItem(rs.getString("FORMA_PUNTA"));
                 p6_cbx_forma_limbo.setSelectedItem(rs.getString("FORMA_LIMBO"));
                 p7_txt_limbo_angulo_medido.setText(rs.getString("LIMBO_ANGULO_MEDIDO"));
                 p8_txt_limbo_angulo_estimado.setText(rs.getString("LIMBO_ANGULO_ESTIMADO"));
                 p10_cbx_LIMBO_estadoborde_izquierdo.setSelectedItem(rs.getString("LIMBOIZQ_ESTADO_BORDE"));
                 p11_cbx_LIMBO_formaborde_izquierdo.setSelectedItem(rs.getString("LIMBOIZQ_FORMA_BORDE"));
                 p12_txt_LIMBO_longitud_izquierdo.setText(rs.getString("LIMBOIZQ_LONGITUD"));
                 p13_txt_LIMBO_prof_izquierdo.setText(rs.getString("LIMBOIZQ_PROF"));
                 p14_cbx_LIMBO_formaarista_izquierda.setSelectedItem(rs.getString("LIMBOIZQ_FORMA_ARISTA"));
                 p15_cbx_LIMBO_estadoborde_derecho.setSelectedItem(rs.getString("LIMBODER_ESTADO_BORDE"));
                 p16_cbx_LIMBO_formaborde_derecho.setSelectedItem(rs.getString("LIMBODER_FORMA_BORDE"));
                 p17_txt_LIMBO_longitud_derecho.setText(rs.getString("LIMBODER_LONGITUD"));
                 p18_txt_LIMBO_prof_derecho.setText(rs.getString("LIMBODER_PROF"));
                 p19_cbx_LIMBO_formaarista_derecho.setSelectedItem(rs.getString("LIMBODER_FORMA_ARISTA"));
                 p20_cbx_pedunculo_estado.setSelectedItem(rs.getString("PEDUNCULO_ESTADO"));
                 p21_txt_pedunculo_longitud.setText(rs.getString("PEDUNCULO_LONGITUD"));
                 p22_cbx_pedunculo_tratamiento.setSelectedItem(rs.getString("PEDUNCULO_TRATAMIENTO"));
                 p23_cbx_pedunculo_forma.setSelectedItem(rs.getString("PEDUNCULO_FORMA"));
                 p24_cbx_base_estado.setSelectedItem(rs.getString("BASE_ESTADO"));
                 p25_txt_base_ancho.setText(rs.getString("BASE_ANCHO"));
                 p26_txt_base_prof.setText(rs.getString("BASE_PROF"));
                 p27_cbx_base_forma.setSelectedItem(rs.getString("BASE_FORMA"));
                 p28_cbx_base_tratamiento.setSelectedItem(rs.getString("BASE_TRATAM"));
                 p29_cbx_aletaIZQ_estado.setSelectedItem(rs.getString("ALETAIZQ_ESTADO"));
                 p30_txt_aletaIZQ_ancho.setText(rs.getString("ALETAIZQ_ANCHO"));
                 p31_txt_aletaIZQ_angulomedido.setText(rs.getString("ALETAIZQ_ANGULO_MEDIDO"));
                 p32_txt_aletaIZQ_anguloestimado.setText(rs.getString("ALETAIZQ_ANGULO_ESTIMADO"));
                 p34_cbx_aletaIZQ_forma.setSelectedItem(rs.getString("ALETAIZQ_FORMA"));
                 p35_cbx_aletaDER_estado.setSelectedItem(rs.getString("ALETADER_ESTADO"));
                 p36_txt_aletaDER_ancho.setText(rs.getString("ALETADER_ANCHO"));
                 p37_txt_aletaDER_angulomedido.setText(rs.getString("ALETADER_ANGULO_MEDIDO"));
                 p38_txt_aletaDER_anguloestimado.setText(rs.getString("ALETADER_ANGULO_ESTIMADO"));
                 p40_cbx_aletaDER_forma.setSelectedItem(rs.getString("ALETADER_FORMA"));
                 
                   if(rs.getString("RETALLA").equals("false")){
                     p41_chk_retalla.setSelected(false);
                 }else{
                     p41_chk_retalla.setSelected(true);
                 }         
                 
                   if(rs.getString("RETOQUE").equals("false")){
                     p42_chk_retoque.setSelected(false);
                 }else{
                     p42_chk_retoque.setSelected(true);
                 }         
                          
                 
                   if(rs.getString("MICRORRETOQUE").equals("false")){
                     p43_chk_microrretoque.setSelected(false);
                 }else{
                     p43_chk_microrretoque.setSelected(true);
                 }         
                 
                   if(rs.getString("PULIDO").equals("false")){
                     p44_chk_pulido.setSelected(false);
                 }else{
                     p44_chk_pulido.setSelected(true);
                 }         
                 
                   if(rs.getString("NO_DIFERENCIADO").equals("false")){
                     p45_chk_nodiferenciado.setSelected(false);
                 }else{
                     p45_chk_nodiferenciado.setSelected(true);
                 }         
                
                   if(rs.getString("TALLA_EXT_NOBIP").equals("false")){
                     p0_chk_talla_ext_nobip.setSelected(false);
                 }else{
                     p0_chk_talla_ext_nobip.setSelected(true);
                 }         
                
                   if(rs.getString("ABRASION").equals("false")){
                     p0_abrasion.setSelected(false);
                 }else{
                     p0_abrasion.setSelected(true);
                 }         
                
                 p46_cbx_mantenimiento.setSelectedItem(rs.getString("MANTENIMIENTO"));
                 p47_cbx_corteza.setSelectedItem(rs.getString("CORTEZA"));
                 p48_txta_observaciones.setText(rs.getString("OBSERVACIONES"));
                 


                 zona_ambiental=rs.getString("ZONA_AMBIENTAL");
                 localidad=rs.getString("LOCALIDAD");
                 sitio=rs.getString("SITIO");
                 siglasitio=rs.getString("SIGLA_SITIO");
                 capa_nivel=rs.getString("CAPA_NIVEL");
                 estruct_arq=rs.getString("ESTRUC_ARQ");
                 piso_subcapa=rs.getString("PISO_SUBCAPA");
                 tipo_estruct_planta=rs.getString("ESTRUC_PLANTA");
                 nombre_estruct_planta=rs.getString("NOMBRE_ESTRUC_PLANTA");
                 episodio_estruct_planta=rs.getString("EPISODIO_ESTRUC_PLANTA");
                 cuadro=rs.getString("CUADRO");
                 microsector=rs.getString("MICROSECTOR");
                }
        
        c.closeconnection();
       } catch (SQLException ex) {
            Logger.getLogger(InteraccionesBD.class.getName()).log(Level.SEVERE, null, ex);
        }
    
    cargarchecks(p7_txt_limbo_angulo_medido, p8_txt_limbo_angulo_estimado, p9_ckh_no_es_posible_medir_angulo);
    cargarchecks(p31_txt_aletaIZQ_angulomedido, p32_txt_aletaIZQ_anguloestimado, p33_chk_aletaIZQ_noangulo);
    cargarchecks(p37_txt_aletaDER_angulomedido, p38_txt_aletaDER_anguloestimado, p39_chk_aletaDER_noangulo);
    }
    
    
        private void cargarchecks(JTextField txt1, JTextField txt2, JCheckBox check){
            if((txt1.getText().equals("SM"))&&(txt2.getText().equals("SM"))){
                check.setSelected(true);
            }else{
                check.setSelected(false);
            }

    }   
    private void actualizarregistro(){
            int respuesta = 0;
    try {
     conexion c = new conexion();
    c.getConexion();

    respuesta = c.eliminar_actualizar("UPDATE PUNTAS_DE_PROYECTIL2 SET "
            + ""
//            
            
            + "ZONA_AMBIENTAL='"+zona_ambiental+"', "
            + "LOCALIDAD='"+localidad+"', "
            + "SITIO='"+sitio+"', "
            + "SIGLA_SITIO='"+siglasitio+"', "
            + "CAPA_NIVEL='"+capa_nivel+"', "
            + "ESTRUC_ARQ='"+estruct_arq+"', "
            + "PISO_SUBCAPA='"+piso_subcapa+"', "
            + "ESTRUC_PLANTA='"+tipo_estruct_planta+"', "
            + "NOMBRE_ESTRUC_PLANTA='"+nombre_estruct_planta+"', "
            + "EPISODIO_ESTRUC_PLANTA='"+episodio_estruct_planta+"', "
            + "CUADRO='"+cuadro+"', "
            + "MICROSECTOR='"+microsector+"', "
            
            + "GRUPO='"+p3_txt_grupo.getText()+"', "
            + "SUBGRUPO='"+p4_cbx_subgrupo.getSelectedItem()+"', "
            + "FORMA_PUNTA='"+p5_cbx_forma_punta.getSelectedItem()+"', "
            + "FORMA_LIMBO='"+p6_cbx_forma_limbo.getSelectedItem()+"', "
            + "LIMBO_ANGULO_MEDIDO='"+p7_txt_limbo_angulo_medido.getText()+"', "
            + "LIMBO_ANGULO_ESTIMADO='"+p8_txt_limbo_angulo_estimado.getText()+"', "
            
            + "LIMBOIZQ_ESTADO_BORDE='"+p10_cbx_LIMBO_estadoborde_izquierdo.getSelectedItem()+"', "
            + "LIMBOIZQ_FORMA_BORDE='"+p11_cbx_LIMBO_formaborde_izquierdo.getSelectedItem()+"', "
            + "LIMBOIZQ_LONGITUD='"+p12_txt_LIMBO_longitud_izquierdo.getText()+"', "
            + "LIMBOIZQ_PROF='"+p13_txt_LIMBO_prof_izquierdo.getText()+"', "
            + "LIMBOIZQ_FORMA_ARISTA='"+p14_cbx_LIMBO_formaarista_izquierda.getSelectedItem()+"', "
                    
            + "LIMBODER_ESTADO_BORDE='"+p15_cbx_LIMBO_estadoborde_derecho.getSelectedItem()+"', "
            + "LIMBODER_FORMA_BORDE='"+p16_cbx_LIMBO_formaborde_derecho.getSelectedItem()+"', "
            + "LIMBODER_LONGITUD='"+p17_txt_LIMBO_longitud_derecho.getText()+"', "
            + "LIMBODER_PROF='"+p18_txt_LIMBO_prof_derecho.getText()+"', "
            + "LIMBODER_FORMA_ARISTA='"+p19_cbx_LIMBO_formaarista_derecho.getSelectedItem()+"', "
                    
            + "PEDUNCULO_ESTADO='"+p20_cbx_pedunculo_estado.getSelectedItem()+"', "
            + "PEDUNCULO_LONGITUD='"+p21_txt_pedunculo_longitud.getText()+"', "
            + "PEDUNCULO_TRATAMIENTO='"+p22_cbx_pedunculo_tratamiento.getSelectedItem()+"', "
            + "PEDUNCULO_FORMA='"+p23_cbx_pedunculo_forma.getSelectedItem()+"', "
                    
            + "BASE_ESTADO='"+p24_cbx_base_estado.getSelectedItem()+"', "
            + "BASE_ANCHO='"+p25_txt_base_ancho.getText()+"', "
            + "BASE_PROF='"+p26_txt_base_prof.getText()+"', "
            + "BASE_FORMA='"+p27_cbx_base_forma.getSelectedItem()+"', "
            + "BASE_TRATAM='"+p28_cbx_base_tratamiento.getSelectedItem()+"', "
                    
            + "ALETAIZQ_ESTADO='"+p29_cbx_aletaIZQ_estado.getSelectedItem()+"', "
            + "ALETAIZQ_ANCHO='"+p30_txt_aletaIZQ_ancho.getText()+"', "
            + "ALETAIZQ_ANGULO_MEDIDO='"+p31_txt_aletaIZQ_angulomedido.getText()+"', "
            + "ALETAIZQ_ANGULO_ESTIMADO='"+p32_txt_aletaIZQ_anguloestimado.getText()+"', "
            + "ALETAIZQ_FORMA='"+p34_cbx_aletaIZQ_forma.getSelectedItem()+"', "
                    
                    
            + "ALETADER_ESTADO='"+p35_cbx_aletaDER_estado.getSelectedItem()+"', "
            + "ALETADER_ANCHO='"+p36_txt_aletaDER_ancho.getText()+"', "
            + "ALETADER_ANGULO_MEDIDO='"+p37_txt_aletaDER_angulomedido.getText()+"', "
            + "ALETADER_ANGULO_ESTIMADO='"+p38_txt_aletaDER_anguloestimado.getText()+"', "
            + "ALETADER_FORMA='"+p40_cbx_aletaDER_forma.getSelectedItem()+"', "
            
            + "RETALLA='"+p41_chk_retalla.isSelected()+"', "
            + "RETOQUE='"+p42_chk_retoque.isSelected()+"', "
            + "MICRORRETOQUE='"+p43_chk_microrretoque.isSelected()+"', "
            + "PULIDO='"+p44_chk_pulido.isSelected()+"', "
            + "NO_DIFERENCIADO='"+p45_chk_nodiferenciado.isSelected()+"', "
                    
            + "MANTENIMIENTO='"+p46_cbx_mantenimiento.getSelectedItem()+"', "
            + "CORTEZA='"+p47_cbx_corteza.getSelectedItem()+"', "
            + "OBSERVACIONES='"+p48_txta_observaciones.getText()+"', "
            + "TALLA_EXT_NOBIP='"+p0_chk_talla_ext_nobip.isSelected()+"', "
            + "ABRASION='"+p0_abrasion.isSelected()+"' "
                    
                    
        +" WHERE ID_PUNTAS="+Integer.parseInt(p2_txt_codigopunta.getText()));
    

    c.closeconnection();



    
    } catch (NumberFormatException | SQLException e) {
    JOptionPane.showMessageDialog(null, "No se pudieron guardar las modificaciones de la pieza: " + e);
        }
    
            if(respuesta>0){
                    JOptionPane.showMessageDialog(null, "Se han actualizado los datos de la pieza: "+ p1_txt_codigopieza.getText());
                    limpiarcampos();
                    consultarid();
                   btn_eliminarpuntas.setEnabled(false);
                  
        }
}

    private void eliminar(){
    int confirma =0;
    int ID_PIEZA = Integer.parseInt(p2_txt_codigopunta.getText());
    String codigo_pieza = p1_txt_codigopieza.getText();

String sql = "DELETE FROM PUNTAS_DE_PROYECTIL2 WHERE ID_PUNTAS="+ID_PIEZA;    
            try {
            conexion c = new conexion();
            c.getConexion();

            confirma = c.eliminar_actualizar(sql);
            c.closeconnection();
         
         if(confirma>0){
         JOptionPane.showMessageDialog(null, "Se eliminó la descripción de la punta de proyectil, pieza: "+codigo_pieza +"\n Nota: La procedencia de la misma está activa para un ingreso nuevo \n Si no desea trabajar con la misma, diríjase a la sección de procedencias");
         InteraccionesBD interac = new InteraccionesBD();
         interac.eliminarhojaarbol(jTree1, selectednodeparaeliminar);
         
         
         limpiarcampos();
         consultarid();
         btn_eliminarpuntas.setEnabled(false);
         }

        } catch (SQLException ex) {
            JOptionPane.showMessageDialog(null, "No se pudo eliminar la descripción de la punta de proyectil, pieza: "+codigo_pieza +" "+ ex);
        }
}   
    // Variables declaration - do not modify//GEN-BEGIN:variables
    public static javax.swing.JButton btn_eliminarpuntas;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton4;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JCheckBox p0_abrasion;
    private javax.swing.JCheckBox p0_chk_talla_ext_nobip;
    private javax.swing.JComboBox<String> p10_cbx_LIMBO_estadoborde_izquierdo;
    private javax.swing.JComboBox<String> p11_cbx_LIMBO_formaborde_izquierdo;
    private javax.swing.JTextField p12_txt_LIMBO_longitud_izquierdo;
    private javax.swing.JTextField p13_txt_LIMBO_prof_izquierdo;
    private javax.swing.JComboBox<String> p14_cbx_LIMBO_formaarista_izquierda;
    private javax.swing.JComboBox<String> p15_cbx_LIMBO_estadoborde_derecho;
    private javax.swing.JComboBox<String> p16_cbx_LIMBO_formaborde_derecho;
    private javax.swing.JTextField p17_txt_LIMBO_longitud_derecho;
    private javax.swing.JTextField p18_txt_LIMBO_prof_derecho;
    private javax.swing.JComboBox<String> p19_cbx_LIMBO_formaarista_derecho;
    public static javax.swing.JTextField p1_txt_codigopieza;
    private javax.swing.JComboBox<String> p20_cbx_pedunculo_estado;
    private javax.swing.JTextField p21_txt_pedunculo_longitud;
    private javax.swing.JComboBox<String> p22_cbx_pedunculo_tratamiento;
    private javax.swing.JComboBox<String> p23_cbx_pedunculo_forma;
    private javax.swing.JComboBox<String> p24_cbx_base_estado;
    private javax.swing.JTextField p25_txt_base_ancho;
    private javax.swing.JTextField p26_txt_base_prof;
    private javax.swing.JComboBox<String> p27_cbx_base_forma;
    private javax.swing.JComboBox<String> p28_cbx_base_tratamiento;
    private javax.swing.JComboBox<String> p29_cbx_aletaIZQ_estado;
    private javax.swing.JTextField p2_txt_codigopunta;
    private javax.swing.JTextField p30_txt_aletaIZQ_ancho;
    private javax.swing.JTextField p31_txt_aletaIZQ_angulomedido;
    private javax.swing.JTextField p32_txt_aletaIZQ_anguloestimado;
    private javax.swing.JCheckBox p33_chk_aletaIZQ_noangulo;
    private javax.swing.JComboBox<String> p34_cbx_aletaIZQ_forma;
    private javax.swing.JComboBox<String> p35_cbx_aletaDER_estado;
    private javax.swing.JTextField p36_txt_aletaDER_ancho;
    private javax.swing.JTextField p37_txt_aletaDER_angulomedido;
    private javax.swing.JTextField p38_txt_aletaDER_anguloestimado;
    private javax.swing.JCheckBox p39_chk_aletaDER_noangulo;
    private javax.swing.JTextField p3_txt_grupo;
    private javax.swing.JComboBox<String> p40_cbx_aletaDER_forma;
    private javax.swing.JCheckBox p41_chk_retalla;
    private javax.swing.JCheckBox p42_chk_retoque;
    private javax.swing.JCheckBox p43_chk_microrretoque;
    private javax.swing.JCheckBox p44_chk_pulido;
    private javax.swing.JCheckBox p45_chk_nodiferenciado;
    private javax.swing.JComboBox<String> p46_cbx_mantenimiento;
    private javax.swing.JComboBox<String> p47_cbx_corteza;
    private javax.swing.JTextArea p48_txta_observaciones;
    private javax.swing.JComboBox<String> p4_cbx_subgrupo;
    private javax.swing.JComboBox<String> p5_cbx_forma_punta;
    private javax.swing.JComboBox<String> p6_cbx_forma_limbo;
    private javax.swing.JTextField p7_txt_limbo_angulo_medido;
    private javax.swing.JTextField p8_txt_limbo_angulo_estimado;
    private javax.swing.JCheckBox p9_ckh_no_es_posible_medir_angulo;
    // End of variables declaration//GEN-END:variables
}
