/*
 * 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 static arql2020.ARQL2020.ventana_para_cuadricula;
import java.awt.GraphicsConfiguration;
import java.awt.Insets;
import java.awt.Rectangle;
import java.awt.Toolkit;
import static arql2020.Internal_Formatizados.c32_txt_posicion_sust_adherida;
import static arql2020.Internal_estandard.s32_txt_parteactiva_posicion;
import static arql2020.Internal_estandard.s32_txt_partepasiva_posicion;

/**
 *
 * @author chuen
 */
public class cuadricula extends javax.swing.JFrame {

    /**
     * Creates new form cuadricula
     */
    public cuadricula() {
        initComponents();
                 GraphicsConfiguration config = this.getGraphicsConfiguration();
    Rectangle bounds = config.getBounds();
    Insets insets = Toolkit.getDefaultToolkit().getScreenInsets(config);

    int x = bounds.x + bounds.width - insets.right - this.getWidth();
    int y = bounds.y + insets.top;
  
        this.setLocation(x,y);
    }

    /**
     * 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() {

        jPanel1 = new javax.swing.JPanel();
        jLabel3 = new javax.swing.JLabel();
        btn_1 = new javax.swing.JToggleButton();
        btn_3 = new javax.swing.JToggleButton();
        btn_2 = new javax.swing.JToggleButton();
        btn_4 = new javax.swing.JToggleButton();
        btn_5 = new javax.swing.JToggleButton();
        btn_6 = new javax.swing.JToggleButton();
        btn_7 = new javax.swing.JToggleButton();
        btn_8 = new javax.swing.JToggleButton();
        jPanel2 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        btn_7b = new javax.swing.JToggleButton();
        btn_4b = new javax.swing.JToggleButton();
        btn_8b = new javax.swing.JToggleButton();
        btn_6b = new javax.swing.JToggleButton();
        btn_3b = new javax.swing.JToggleButton();
        btn_1b = new javax.swing.JToggleButton();
        btn_5b = new javax.swing.JToggleButton();
        btn_2b = new javax.swing.JToggleButton();
        jLabel2 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Cuadrícula");
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowOpened(java.awt.event.WindowEvent evt) {
                formWindowOpened(evt);
            }
        });

        jPanel1.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jLabel3.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        jLabel3.setText("A");

        btn_1.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        btn_1.setText("1");
        btn_1.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                btn_1ItemStateChanged(evt);
            }
        });

        btn_3.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        btn_3.setText("3");
        btn_3.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                btn_3ItemStateChanged(evt);
            }
        });

        btn_2.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        btn_2.setText("2");
        btn_2.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                btn_2ItemStateChanged(evt);
            }
        });

        btn_4.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        btn_4.setText("4");
        btn_4.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                btn_4ItemStateChanged(evt);
            }
        });

        btn_5.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        btn_5.setText("5");
        btn_5.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                btn_5ItemStateChanged(evt);
            }
        });

        btn_6.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        btn_6.setText("6");
        btn_6.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                btn_6ItemStateChanged(evt);
            }
        });

        btn_7.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        btn_7.setText("7");
        btn_7.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                btn_7ItemStateChanged(evt);
            }
        });

        btn_8.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        btn_8.setText("8");
        btn_8.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                btn_8ItemStateChanged(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(65, 65, 65)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                            .addComponent(btn_7, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(btn_8, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                                .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(8, 8, 8))))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addContainerGap()
                                .addComponent(btn_5, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addGroup(jPanel1Layout.createSequentialGroup()
                                    .addContainerGap()
                                    .addComponent(btn_1, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                                    .addContainerGap()
                                    .addComponent(btn_3, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE))))
                        .addGap(45, 45, 45)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                            .addComponent(btn_2, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(btn_4, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(btn_6, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel3)
                .addGap(15, 15, 15)
                .addComponent(btn_7, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btn_1, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btn_2, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btn_3, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btn_4, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btn_5, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btn_6, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btn_8, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel2.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jLabel1.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        jLabel1.setText("B");

        btn_7b.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        btn_7b.setText("7");
        btn_7b.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                btn_7bItemStateChanged(evt);
            }
        });

        btn_4b.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        btn_4b.setText("4");
        btn_4b.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                btn_4bItemStateChanged(evt);
            }
        });

        btn_8b.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        btn_8b.setText("8");
        btn_8b.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                btn_8bItemStateChanged(evt);
            }
        });

        btn_6b.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        btn_6b.setText("6");
        btn_6b.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                btn_6bItemStateChanged(evt);
            }
        });

        btn_3b.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        btn_3b.setText("3");
        btn_3b.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                btn_3bItemStateChanged(evt);
            }
        });

        btn_1b.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        btn_1b.setText("1");
        btn_1b.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                btn_1bItemStateChanged(evt);
            }
        });

        btn_5b.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        btn_5b.setText("5");
        btn_5b.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                btn_5bItemStateChanged(evt);
            }
        });

        btn_2b.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        btn_2b.setText("2");
        btn_2b.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                btn_2bItemStateChanged(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(btn_7b, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btn_8b, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(9, 9, 9)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                .addContainerGap(19, Short.MAX_VALUE)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btn_5b, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(btn_1b, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(btn_3b, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(42, 42, 42)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btn_6b, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btn_2b, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btn_4b, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(25, 25, 25))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(6, 6, 6)
                .addComponent(jLabel1)
                .addGap(18, 18, 18)
                .addComponent(btn_7b, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(btn_2b, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btn_4b, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btn_6b, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(btn_1b, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btn_3b, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btn_5b, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btn_8b, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jLabel2.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N
        jLabel2.setText("Seleccione...");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(28, 28, 28)
                        .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(18, 18, 18)
                .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents
private void registrarbotones(){
    String cuadricula = "";

if((btn_1.isSelected())||(btn_2.isSelected())||(btn_3.isSelected())||(btn_4.isSelected())||(btn_5.isSelected())||(btn_6.isSelected())||(btn_7.isSelected())||(btn_8.isSelected())){
  
}    
if(btn_8.isSelected()==true){
    cuadricula=cuadricula+"A8-";
}
if(btn_7.isSelected()==true){
    cuadricula=cuadricula+"A7-";
}
if(btn_6.isSelected()==true){
    cuadricula=cuadricula+"A6-";
}    
if(btn_5.isSelected()==true){
    cuadricula=cuadricula+"A5-";
}
if(btn_4.isSelected()==true){
    cuadricula=cuadricula+"A4-";
}
if(btn_3.isSelected()==true){
    cuadricula=cuadricula+"A3-";
}
if(btn_2.isSelected()==true){
    cuadricula=cuadricula+"A2-";
}

if(btn_1.isSelected()==true){
    cuadricula=cuadricula+"A1-";
}


if((btn_1b.isSelected())||(btn_2b.isSelected())||(btn_3b.isSelected())||(btn_4b.isSelected())||(btn_5b.isSelected())||(btn_6b.isSelected())||(btn_7b.isSelected())||(btn_8b.isSelected())){
    
}


if(btn_8b.isSelected()==true){
    cuadricula=cuadricula+"B8-";
}
if(btn_7b.isSelected()==true){
    cuadricula=cuadricula+"B7-";
}
if(btn_6b.isSelected()==true){
    cuadricula=cuadricula+"B6-";
}
if(btn_5b.isSelected()==true){
    cuadricula=cuadricula+"B5-";
}
if(btn_4b.isSelected()==true){
    cuadricula=cuadricula+"B4-";
}
if(btn_3b.isSelected()==true){
    cuadricula=cuadricula+"B3-";
}
if(btn_2b.isSelected()==true){
    cuadricula=cuadricula+"B2-";
}
if(btn_1b.isSelected()==true){
    cuadricula=cuadricula+"B1-";
}







if(ventana_para_cuadricula.equals("general")){
    c32_txt_posicion_sust_adherida.setText(cuadricula);
}if(ventana_para_cuadricula.equals("segmentalestandarpasiva")){
    s32_txt_partepasiva_posicion.setText(cuadricula);

}if(ventana_para_cuadricula.equals("segmentalestandaractiva")){
    s32_txt_parteactiva_posicion.setText(cuadricula);
}

}
    private void formWindowOpened(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowOpened
String botonespresionados="";

if(ventana_para_cuadricula.equals("general")){
    botonespresionados=c32_txt_posicion_sust_adherida.getText();
}
if(ventana_para_cuadricula.equals("segmentalestandarpasiva")){
     botonespresionados=s32_txt_partepasiva_posicion.getText();
}
if(ventana_para_cuadricula.equals("segmentalestandaractiva")){
     botonespresionados=s32_txt_parteactiva_posicion.getText();
}

String[] parts = botonespresionados.split("-");
for(String part : parts){
    if(part.equals("A1")){
        btn_1.setSelected(true);
    }
    if(part.equals("A2")){
        btn_2.setSelected(true);
    }
    if(part.equals("A3")){
        btn_3.setSelected(true);
    }
    if(part.equals("A4")){
        btn_4.setSelected(true);
    }
    if(part.equals("A5")){
        btn_5.setSelected(true);
    }
    if(part.equals("A6")){
        btn_6.setSelected(true);
    }
    if(part.equals("A7")){
        btn_7.setSelected(true);
    }
    if(part.equals("A8")){
        btn_8.setSelected(true);
    }
    if(part.equals("B1")){
        btn_1b.setSelected(true);
    }
    if(part.equals("B2")){
        btn_2b.setSelected(true);
    }
    if(part.equals("B3")){
        btn_3b.setSelected(true);
    }
    if(part.equals("B4")){
        btn_4b.setSelected(true);
    }
    if(part.equals("B5")){
        btn_5b.setSelected(true);
    }
    if(part.equals("B6")){
        btn_6b.setSelected(true);
    }
    if(part.equals("B7")){
        btn_7b.setSelected(true);
    }
    if(part.equals("B8")){
        btn_8b.setSelected(true);
    }
    

    
    
    
}
    }//GEN-LAST:event_formWindowOpened

    private void btn_1ItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_btn_1ItemStateChanged
registrarbotones();
    }//GEN-LAST:event_btn_1ItemStateChanged

    private void btn_2ItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_btn_2ItemStateChanged
registrarbotones();
    }//GEN-LAST:event_btn_2ItemStateChanged

    private void btn_3ItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_btn_3ItemStateChanged
registrarbotones();
    }//GEN-LAST:event_btn_3ItemStateChanged

    private void btn_4ItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_btn_4ItemStateChanged
registrarbotones();
    }//GEN-LAST:event_btn_4ItemStateChanged

    private void btn_5ItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_btn_5ItemStateChanged
registrarbotones();
    }//GEN-LAST:event_btn_5ItemStateChanged

    private void btn_6ItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_btn_6ItemStateChanged
registrarbotones();
    }//GEN-LAST:event_btn_6ItemStateChanged

    private void btn_7ItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_btn_7ItemStateChanged
registrarbotones();
    }//GEN-LAST:event_btn_7ItemStateChanged

    private void btn_8ItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_btn_8ItemStateChanged
registrarbotones();
    }//GEN-LAST:event_btn_8ItemStateChanged

    private void btn_1bItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_btn_1bItemStateChanged
registrarbotones();
    }//GEN-LAST:event_btn_1bItemStateChanged

    private void btn_2bItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_btn_2bItemStateChanged
registrarbotones();
    }//GEN-LAST:event_btn_2bItemStateChanged

    private void btn_3bItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_btn_3bItemStateChanged
registrarbotones();
    }//GEN-LAST:event_btn_3bItemStateChanged

    private void btn_4bItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_btn_4bItemStateChanged
registrarbotones();
    }//GEN-LAST:event_btn_4bItemStateChanged

    private void btn_5bItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_btn_5bItemStateChanged
registrarbotones();
    }//GEN-LAST:event_btn_5bItemStateChanged

    private void btn_6bItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_btn_6bItemStateChanged
registrarbotones();
    }//GEN-LAST:event_btn_6bItemStateChanged

    private void btn_7bItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_btn_7bItemStateChanged
registrarbotones();
    }//GEN-LAST:event_btn_7bItemStateChanged

    private void btn_8bItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_btn_8bItemStateChanged
registrarbotones();
    }//GEN-LAST:event_btn_8bItemStateChanged

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(cuadricula.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(cuadricula.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(cuadricula.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(cuadricula.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new cuadricula().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JToggleButton btn_1;
    private javax.swing.JToggleButton btn_1b;
    private javax.swing.JToggleButton btn_2;
    private javax.swing.JToggleButton btn_2b;
    private javax.swing.JToggleButton btn_3;
    private javax.swing.JToggleButton btn_3b;
    private javax.swing.JToggleButton btn_4;
    private javax.swing.JToggleButton btn_4b;
    private javax.swing.JToggleButton btn_5;
    private javax.swing.JToggleButton btn_5b;
    private javax.swing.JToggleButton btn_6;
    private javax.swing.JToggleButton btn_6b;
    private javax.swing.JToggleButton btn_7;
    private javax.swing.JToggleButton btn_7b;
    private javax.swing.JToggleButton btn_8;
    private javax.swing.JToggleButton btn_8b;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    // End of variables declaration//GEN-END:variables
}
