/*
 * 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 Calculos_automaticos;

import clases.Cargar_MP;
import java.awt.BorderLayout;
import java.awt.Color;
import java.beans.PropertyVetoException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartPanel;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.plot.CategoryPlot;
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.data.category.DefaultCategoryDataset;

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

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

    }

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

        botones1 = new javax.swing.ButtonGroup();
        botones2 = new javax.swing.ButtonGroup();
        jScrollPane1 = new javax.swing.JScrollPane();
        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        cbx_mp = new javax.swing.JComboBox<>();
        jpanel = new javax.swing.JPanel();
        fila = new javax.swing.JRadioButton();
        columna = new javax.swing.JRadioButton();
        jScrollPane5 = new javax.swing.JScrollPane();
        tbl_tamaños = new javax.swing.JTable();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jScrollPane6 = new javax.swing.JScrollPane();
        tbl_tamaños1 = new javax.swing.JTable();
        jPanel2 = new javax.swing.JPanel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        n_total = new javax.swing.JTextField();
        porcentaje_CT = new javax.swing.JTextField();
        porcentaje_ST = new javax.swing.JTextField();
        N_ST = new javax.swing.JTextField();
        N_CT = new javax.swing.JTextField();
        jButton1 = new javax.swing.JButton();

        setClosable(true);
        setMaximizable(true);
        setTitle("Desechos de talla");
        setToolTipText("");
        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);
            }
        });

        jLabel1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel1.setText("Materia prima ");

        cbx_mp.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        cbx_mp.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Cuarcita", "Basalto", "Etc." }));

        jpanel.setBackground(new java.awt.Color(204, 204, 204));
        jpanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jpanel.setLayout(new java.awt.BorderLayout());

        fila.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        fila.setText("Ordenar por fila");

        columna.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        columna.setText("Ordenar por columna");

        tbl_tamaños.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N
        tbl_tamaños.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {"Con talón", null, null, null, null, null, null},
                {"%", null, null, null, null, null, null}
            },
            new String [] {
                "PROCED.ALTERN", "TAMAÑO1", "TAMAÑO2", "TAMAÑO3", "TAMAÑO4", "N.D.", "CN"
            }
        ));
        tbl_tamaños.setRowHeight(25);
        tbl_tamaños.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tbl_tamañosMouseClicked(evt);
            }
        });
        jScrollPane5.setViewportView(tbl_tamaños);
        if (tbl_tamaños.getColumnModel().getColumnCount() > 0) {
            tbl_tamaños.getColumnModel().getColumn(3).setResizable(false);
        }

        jLabel2.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel2.setText("Tamaños");

        jLabel3.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel3.setText("Ancho talón");

        tbl_tamaños1.setFont(new java.awt.Font("Tahoma", 0, 16)); // NOI18N
        tbl_tamaños1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {"Con talón", null, null, null, null, null},
                {"Sin talón", null, null, null, null, null},
                {"%", null, null, null, null, null}
            },
            new String [] {
                "PROCED.ALTERN", "TAMAÑO1", "TAMAÑO2", "TAMAÑO3", "TAMAÑO4", "%"
            }
        ));
        tbl_tamaños1.setRowHeight(25);
        tbl_tamaños1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tbl_tamaños1MouseClicked(evt);
            }
        });
        jScrollPane6.setViewportView(tbl_tamaños1);
        if (tbl_tamaños1.getColumnModel().getColumnCount() > 0) {
            tbl_tamaños1.getColumnModel().getColumn(3).setResizable(false);
            tbl_tamaños1.getColumnModel().getColumn(5).setResizable(false);
            tbl_tamaños1.getColumnModel().getColumn(5).setHeaderValue("%");
        }

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Distribución de la muestra", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 14))); // NOI18N

        jLabel4.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel4.setText("%Con talón");

        jLabel5.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel5.setText("%Sin talón");

        jLabel6.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel6.setText("N (muestra seleccionada)");

        jLabel7.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel7.setText("N: con talón");

        jLabel8.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel8.setText("N: sin talón");

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

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

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

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

        N_CT.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        N_CT.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                N_CTActionPerformed(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()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel6)
                        .addGap(18, 18, 18)
                        .addComponent(n_total, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel4)
                            .addComponent(jLabel5))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(porcentaje_ST, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(porcentaje_CT, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(164, 164, 164)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel7)
                            .addComponent(jLabel8))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(N_ST, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(N_CT, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(77, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(n_total, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(21, 21, 21)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel4)
                            .addComponent(porcentaje_CT, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel5)
                            .addComponent(porcentaje_ST, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel7)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel8))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(N_CT, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(N_ST, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(29, Short.MAX_VALUE))
        );

        jButton1.setText("Árbol");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(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()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 486, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3)
                    .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 486, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel2))
                .addGap(59, 59, 59)
                .addComponent(jpanel, javax.swing.GroupLayout.PREFERRED_SIZE, 435, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(43, 43, 43))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(columna)
                .addGap(18, 18, 18)
                .addComponent(fila)
                .addGap(534, 534, 534))
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(19, 19, 19)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jButton1)
                        .addGap(966, 966, 966))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jLabel1)
                                .addGap(18, 18, 18)
                                .addComponent(cbx_mp, javax.swing.GroupLayout.PREFERRED_SIZE, 757, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(0, 0, Short.MAX_VALUE))))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(29, 29, 29)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(cbx_mp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(42, 42, 42)
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jLabel2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButton1)
                        .addGap(19, 19, 19)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(fila)
                            .addComponent(columna)))
                    .addComponent(jpanel, javax.swing.GroupLayout.PREFERRED_SIZE, 235, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(jLabel3)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(523, 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)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 686, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void tbl_tamañosMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tbl_tamañosMouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_tbl_tamañosMouseClicked

    private void tbl_tamaños1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tbl_tamaños1MouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_tbl_tamaños1MouseClicked

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

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

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

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

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

    private void formInternalFrameOpened(javax.swing.event.InternalFrameEvent evt) {//GEN-FIRST:event_formInternalFrameOpened
Cargar_MP cargartodasMP = new Cargar_MP();
cargartodasMP.cargar_todas_mp(cbx_mp);

CalculosBD c = new CalculosBD();
N_ST.setText(c.getCount("DT_SINTALON2", ""));
N_CT.setText(c.getCount("DT_CONTALON2", ""));

float aux = c.porcentajeDOSVALORES(N_CT.getText(), N_ST.getText());
porcentaje_CT.setText(String.valueOf(aux));

aux = c.porcentajeDOSVALORES(N_ST.getText(), N_CT.getText());
porcentaje_ST.setText(String.valueOf(aux));

float st = Float.parseFloat(N_ST.getText());
float ct = Float.parseFloat(N_CT.getText());
float suma = st+ct;

n_total.setText(String.valueOf(suma));

        DefaultTableModel dtm = (DefaultTableModel) tbl_tamaños.getModel();
        Object obj = c.getCount("DT_CONTALON2", "WHERE TAMAÑO='1'");
        dtm.setValueAt(obj, 0, 1);
        obj = c.porcentajeCIENPORCIENTO(String.valueOf(obj), N_CT.getText());
        dtm.setValueAt(obj, 1, 1);
        obj = c.getCount("DT_CONTALON2", "WHERE TAMAÑO='2'");
        dtm.setValueAt(obj, 0, 2);
        obj = c.porcentajeCIENPORCIENTO(String.valueOf(obj), N_CT.getText());
        dtm.setValueAt(obj, 1, 2);
        obj = c.getCount("DT_CONTALON2", "WHERE TAMAÑO='3'");
        dtm.setValueAt(obj, 0, 3);
        obj = c.porcentajeCIENPORCIENTO(String.valueOf(obj), N_CT.getText());
        dtm.setValueAt(obj, 1, 3);
        obj = c.getCount("DT_CONTALON2", "WHERE TAMAÑO='4'");
        dtm.setValueAt(obj, 0, 4);
        obj = c.porcentajeCIENPORCIENTO(String.valueOf(obj), N_CT.getText());
        dtm.setValueAt(obj, 1, 4);
        obj = c.getCount("DT_CONTALON2", "WHERE TAMAÑO='N.D.'");
        dtm.setValueAt(obj, 0, 5);
        obj = c.porcentajeCIENPORCIENTO(String.valueOf(obj), N_CT.getText());
        dtm.setValueAt(obj, 1, 5);
        obj = c.getCount("DT_CONTALON2", "WHERE TAMAÑO='CN'");
        dtm.setValueAt(obj, 0, 6);
        obj = c.porcentajeCIENPORCIENTO(String.valueOf(obj), N_CT.getText());
        dtm.setValueAt(obj, 1, 6);



    }//GEN-LAST:event_formInternalFrameOpened

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
Arbol ar = new Arbol();
ar.setVisible(true);
    }//GEN-LAST:event_jButton1ActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTextField N_CT;
    private javax.swing.JTextField N_ST;
    private javax.swing.ButtonGroup botones1;
    private javax.swing.ButtonGroup botones2;
    private javax.swing.JComboBox<String> cbx_mp;
    private javax.swing.JRadioButton columna;
    private javax.swing.JRadioButton fila;
    private javax.swing.JButton jButton1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JPanel jpanel;
    private javax.swing.JTextField n_total;
    private javax.swing.JTextField porcentaje_CT;
    private javax.swing.JTextField porcentaje_ST;
    private javax.swing.JTable tbl_tamaños;
    private javax.swing.JTable tbl_tamaños1;
    // End of variables declaration//GEN-END:variables
}
