/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.cobi.kgg.ui.dialog;

import java.awt.BorderLayout;
import java.io.File;
import java.io.IOException;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JComboBox;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JProgressBar;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.filechooser.FileNameExtensionFilter;
import org.cobi.kgg.business.entity.PlinkDataset;
import org.cobi.kgg.business.simu.*;
import org.cobi.kgg.ui.ArrayListStringArrayTableModel;
import org.cobi.kgg.ui.GlobalManager;
import org.cobi.kgg.ui.LinkLabel;
import org.cobi.util.net.URLOpener;
import org.cobi.util.text.LocalExcelFile;
import org.cobi.util.text.LocalFile;
import org.jfree.chart.ChartPanel;
import org.jfree.chart.JFreeChart;
import org.openide.ErrorManager;
import org.openide.util.Exceptions;
import org.openide.util.ImageUtilities;
import org.rosuda.REngine.Rserve.RserveException;

/**
 *
 * @author Jiang Li
 */
public class PowerSimulationFrame extends javax.swing.JFrame {

    /**
     * Creates new form PowerSimulationDialog
     */
    public ArrayListStringArrayTableModel aomSNPModel = null;
    public ArrayListStringArrayTableModel aomGeneModel = null;
    public String strSNPTitle[] = {"ID", "Odds Ratio", "Frequence", "Number of Risk Allele", "LD", "Powers"};
    public String strGeneTitle[] = {"ID", "Odds Ratio", "Frequence", "Number of Risk Allele", "LD", "GATES", "ScaChi", "HYST", "SKAT"};
    public final List<String[]> lstSNPPower = new ArrayList<String[]>();
    public final List<String[]> lstGenePower = new ArrayList<String[]>();
    public Simulator simulatorOne;
    public static SimulationParameter simpOne = new SimulationParameter();
    public int intActiveTable = 0;
    public DrawPowerChart dpcOne = null;
    public DefaultComboBoxModel<Double> dcbmMAF = null;
    public DefaultComboBoxModel<Double> dcbmLD = null;
    public boolean boolMAFChanged = false;
    public boolean boolLDChanged = false;
    public boolean boolSKAT = false;
    public SKAT skatOne = null;
    public PlinkDataset plinkSet;

    public PowerSimulationFrame(java.awt.Frame parent, boolean modal) {

        aomSNPModel = new ArrayListStringArrayTableModel();
        aomGeneModel = new ArrayListStringArrayTableModel();
        aomSNPModel.setTitle(strSNPTitle);
        aomSNPModel.setDataList(lstSNPPower);
        aomGeneModel.setTitle(strGeneTitle);
        aomGeneModel.setDataList(lstGenePower);

        dcbmMAF = new DefaultComboBoxModel<Double>();
        dcbmLD = new DefaultComboBoxModel<Double>();

        initComponents();
        numStudyTextField.setVisible(false);
        numStudyLabel.setVisible(false);
        jCheckBox1.setVisible(false);

        //jLabel33.setVisible(false);
        //jLabel34.setVisible(false);
        //jLabel35.setVisible(false);
        //jTextField23.setVisible(false);
        //jTextField24.setVisible(false);
        //jTextField25.setVisible(false);
        jComboBox2.setEnabled(false);
        jComboBox3.setEnabled(false);
        jTextField18.setVisible(false);
        jLabel19.setVisible(false);
        setIconImage(ImageUtilities.loadImage("org/cobi/kgg/ui/png/16x16/logo1.png"));
    }

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

        buttonGroup1 = new javax.swing.ButtonGroup();
        buttonGroup2 = new javax.swing.ButtonGroup();
        buttonGroup3 = new javax.swing.ButtonGroup();
        jPopupMenu1 = new javax.swing.JPopupMenu();
        jPopupMenu2 = new javax.swing.JPopupMenu();
        jMenuItem1 = new javax.swing.JMenuItem();
        jMenuItem2 = new javax.swing.JMenuItem();
        jMenuItem3 = new javax.swing.JMenuItem();
        jMenuItem4 = new javax.swing.JMenuItem();
        jTabbedPane2 = new javax.swing.JTabbedPane();
        jPanel6 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jTextField1 = new javax.swing.JTextField();
        jLabel19 = new javax.swing.JLabel();
        jTextField18 = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        jTextField2 = new javax.swing.JTextField();
        jLabel17 = new javax.swing.JLabel();
        jTextField16 = new javax.swing.JTextField();
        jLabel18 = new javax.swing.JLabel();
        jTextField17 = new javax.swing.JTextField();
        jLabel20 = new javax.swing.JLabel();
        jRadioButton1 = new javax.swing.JRadioButton();
        jRadioButton2 = new javax.swing.JRadioButton();
        jLabel33 = new javax.swing.JLabel();
        jTextField23 = new javax.swing.JTextField();
        jLabel34 = new javax.swing.JLabel();
        jTextField24 = new javax.swing.JTextField();
        jLabel35 = new javax.swing.JLabel();
        jTextField25 = new javax.swing.JTextField();
        jLabel11 = new javax.swing.JLabel();
        jTextField10 = new javax.swing.JTextField();
        jScrollPane3 = new javax.swing.JScrollPane();
        jTextAreaRef = new javax.swing.JTextArea();
        jPanel9 = new javax.swing.JPanel();
        jLabel32 = new javax.swing.JLabel();
        pedigreeFilePathTextField = new javax.swing.JTextField();
        jButton11 = new javax.swing.JButton();
        jLabel36 = new javax.swing.JLabel();
        mapFilePathTextField = new javax.swing.JTextField();
        jButton12 = new javax.swing.JButton();
        jButton13 = new javax.swing.JButton();
        bedFilePathTextField = new javax.swing.JTextField();
        jLabel37 = new javax.swing.JLabel();
        jLabel38 = new javax.swing.JLabel();
        jTextField26 = new javax.swing.JTextField();
        jLabel39 = new javax.swing.JLabel();
        jTextField27 = new javax.swing.JTextField();
        jLabel40 = new javax.swing.JLabel();
        jRadioButton3 = new javax.swing.JRadioButton();
        jRadioButton4 = new javax.swing.JRadioButton();
        jLabel41 = new javax.swing.JLabel();
        jPanel10 = new javax.swing.JPanel();
        jLabel42 = new javax.swing.JLabel();
        vcfFilePathTextField = new javax.swing.JTextField();
        jButton14 = new javax.swing.JButton();
        jLabel43 = new javax.swing.JLabel();
        jTextField28 = new javax.swing.JTextField();
        jLabel44 = new javax.swing.JLabel();
        jLabel45 = new javax.swing.JLabel();
        jTextField29 = new javax.swing.JTextField();
        jLabel46 = new javax.swing.JLabel();
        jRadioButton5 = new javax.swing.JRadioButton();
        jRadioButton6 = new javax.swing.JRadioButton();
        jPanel11 = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        jTextField3 = new javax.swing.JTextField();
        jLabel15 = new javax.swing.JLabel();
        jTextField14 = new javax.swing.JTextField();
        jLabel16 = new javax.swing.JLabel();
        jTextField15 = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        jTextField4 = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        jTextField5 = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        jTextField6 = new javax.swing.JTextField();
        jLabel7 = new javax.swing.JLabel();
        jTextField7 = new javax.swing.JTextField();
        jLabel8 = new javax.swing.JLabel();
        jComboBox1 = new javax.swing.JComboBox();
        jLabel23 = new javax.swing.JLabel();
        jTextField20 = new javax.swing.JTextField();
        jPanel4 = new javax.swing.JPanel();
        jLabel10 = new javax.swing.JLabel();
        jTextField9 = new javax.swing.JTextField();
        jLabel13 = new javax.swing.JLabel();
        jTextField12 = new javax.swing.JTextField();
        jLabel14 = new javax.swing.JLabel();
        jTextField13 = new javax.swing.JTextField();
        jPanel5 = new javax.swing.JPanel();
        jLabel12 = new javax.swing.JLabel();
        jTextField11 = new javax.swing.JTextField();
        jLabel21 = new javax.swing.JLabel();
        metaAnaComboBox = new javax.swing.JComboBox();
        numStudyLabel = new javax.swing.JLabel();
        numStudyTextField = new javax.swing.JTextField();
        jLabel22 = new javax.swing.JLabel();
        jTextField8 = new javax.swing.JTextField();
        jCheckBox1 = new javax.swing.JCheckBox();
        jLabel9 = new javax.swing.JLabel();
        parellelRunNumTextField = new javax.swing.JTextField();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        jProgressBar1 = new javax.swing.JProgressBar();
        jSplitPane1 = new javax.swing.JSplitPane();
        jPanel7 = new javax.swing.JPanel();
        jPanel3 = new javax.swing.JPanel();
        jLabel25 = new javax.swing.JLabel();
        jComboBox2 = new javax.swing.JComboBox();
        jLabel26 = new javax.swing.JLabel();
        jComboBox3 = new javax.swing.JComboBox();
        jPanel1 = new javax.swing.JPanel();
        jPanel2 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();
        jScrollPane2 = new javax.swing.JScrollPane();
        jTable2 = new javax.swing.JTable();
        jPanel8 = new javax.swing.JPanel();
        jCheckBox2 = new javax.swing.JCheckBox();
        jLabel27 = new LinkLabel ("Download R", "http://www.r-project.org/");

        org.openide.awt.Mnemonics.setLocalizedText(jMenuItem1, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jMenuItem1.text")); // NOI18N
        jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem1ActionPerformed(evt);
            }
        });

        org.openide.awt.Mnemonics.setLocalizedText(jMenuItem2, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jMenuItem2.text")); // NOI18N
        jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem2ActionPerformed(evt);
            }
        });

        org.openide.awt.Mnemonics.setLocalizedText(jMenuItem3, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jMenuItem3.text")); // NOI18N
        jMenuItem3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem3ActionPerformed(evt);
            }
        });

        org.openide.awt.Mnemonics.setLocalizedText(jMenuItem4, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jMenuItem4.text")); // NOI18N
        jMenuItem4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem4ActionPerformed(evt);
            }
        });

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.title")); // NOI18N
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosing(java.awt.event.WindowEvent evt) {
                formWindowClosing(evt);
            }
        });

        jTabbedPane2.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jTabbedPane2.border.title"))); // NOI18N
        jTabbedPane2.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                jTabbedPane2StateChanged(evt);
            }
        });

        org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel1.text")); // NOI18N

        jTextField1.setText(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jTextField1.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel19, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel19.text")); // NOI18N

        jTextField18.setText(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jTextField18.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel3, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel3.text")); // NOI18N

        jTextField2.setText(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jTextField2.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel17, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel17.text")); // NOI18N

        jTextField16.setText(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jTextField16.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel18, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel18.text")); // NOI18N

        jTextField17.setText(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jTextField17.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel20, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel20.text")); // NOI18N

        buttonGroup1.add(jRadioButton1);
        org.openide.awt.Mnemonics.setLocalizedText(jRadioButton1, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jRadioButton1.text")); // NOI18N
        jRadioButton1.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                jRadioButton1StateChanged(evt);
            }
        });

        buttonGroup1.add(jRadioButton2);
        jRadioButton2.setSelected(true);
        org.openide.awt.Mnemonics.setLocalizedText(jRadioButton2, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jRadioButton2.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel33, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel33.text")); // NOI18N

        jTextField23.setText(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jTextField23.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel34, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel34.text")); // NOI18N

        jTextField24.setText(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jTextField24.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel35, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel35.text")); // NOI18N

        jTextField25.setText(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jTextField25.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel11, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel11.text")); // NOI18N

        jTextField10.setText(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jTextField10.text")); // NOI18N

        jTextAreaRef.setEditable(false);
        jTextAreaRef.setColumns(20);
        jTextAreaRef.setFont(new java.awt.Font("Courier New", 0, 12)); // NOI18N
        jTextAreaRef.setRows(5);
        jTextAreaRef.setText(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jTextAreaRef.text")); // NOI18N
        jTextAreaRef.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jTextAreaRef.border.title"))); // NOI18N
        jScrollPane3.setViewportView(jTextAreaRef);

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addComponent(jLabel20)
                        .addGap(18, 18, 18)
                        .addComponent(jRadioButton1)
                        .addGap(18, 18, 18)
                        .addComponent(jRadioButton2))
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addComponent(jLabel1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel19)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextField18, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(12, 12, 12)
                        .addComponent(jLabel11)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextField10, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel6Layout.createSequentialGroup()
                                .addComponent(jLabel3)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel17)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTextField16, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel18))
                            .addGroup(jPanel6Layout.createSequentialGroup()
                                .addComponent(jLabel33, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTextField23, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel34)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTextField24, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel35)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jTextField25, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jTextField17, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addGap(21, 21, 21))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()
                .addComponent(jScrollPane3)
                .addContainerGap())
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel19)
                    .addComponent(jTextField18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel11)
                    .addComponent(jTextField10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel17)
                    .addComponent(jTextField16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel18)
                    .addComponent(jTextField17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE, false)
                    .addComponent(jLabel20, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jRadioButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jRadioButton2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel33, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextField23, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel34)
                    .addComponent(jTextField24, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel35)
                    .addComponent(jTextField25, 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(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        jTabbedPane2.addTab(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jPanel6.TabConstraints.tabTitle"), jPanel6); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel32, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel32.text")); // NOI18N

        jButton11.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/cobi/kgg/ui/png/16x16/Folder.png"))); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(jButton11, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jButton11.text")); // NOI18N
        jButton11.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton11ActionPerformed(evt);
            }
        });

        org.openide.awt.Mnemonics.setLocalizedText(jLabel36, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel36.text")); // NOI18N

        jButton12.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/cobi/kgg/ui/png/16x16/Folder.png"))); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(jButton12, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jButton12.text")); // NOI18N
        jButton12.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton12ActionPerformed(evt);
            }
        });

        jButton13.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/cobi/kgg/ui/png/16x16/Folder.png"))); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(jButton13, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jButton13.text")); // NOI18N
        jButton13.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton13ActionPerformed(evt);
            }
        });

        org.openide.awt.Mnemonics.setLocalizedText(jLabel37, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel37.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel38, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel38.text")); // NOI18N

        jTextField26.setText(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jTextField26.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel39, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel39.text")); // NOI18N

        jTextField27.setText(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jTextField27.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel40, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel40.text")); // NOI18N

        buttonGroup2.add(jRadioButton3);
        jRadioButton3.setSelected(true);
        org.openide.awt.Mnemonics.setLocalizedText(jRadioButton3, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jRadioButton3.text")); // NOI18N

        buttonGroup2.add(jRadioButton4);
        org.openide.awt.Mnemonics.setLocalizedText(jRadioButton4, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jRadioButton4.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel41, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel41.text")); // NOI18N

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel9Layout.createSequentialGroup()
                        .addGap(6, 6, 6)
                        .addComponent(jLabel36))
                    .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(jLabel32)
                        .addComponent(jLabel37)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(mapFilePathTextField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 319, Short.MAX_VALUE)
                    .addComponent(pedigreeFilePathTextField, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(bedFilePathTextField))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jButton11, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton12, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton13, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addGap(6, 6, 6)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel9Layout.createSequentialGroup()
                        .addComponent(jLabel40)
                        .addGap(18, 18, 18)
                        .addComponent(jRadioButton3)
                        .addGap(18, 18, 18)
                        .addComponent(jRadioButton4))
                    .addGroup(jPanel9Layout.createSequentialGroup()
                        .addComponent(jLabel38)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextField26, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel41)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel39)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextField27, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(0, 121, Short.MAX_VALUE))
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jLabel32)
                    .addComponent(pedigreeFilePathTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton11))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jLabel36)
                    .addComponent(jButton12)
                    .addComponent(mapFilePathTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jLabel37)
                    .addComponent(bedFilePathTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton13))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel38, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextField26, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel39)
                    .addComponent(jTextField27, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel41))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE, false)
                    .addComponent(jLabel40, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jRadioButton3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jRadioButton4))
                .addContainerGap())
        );

        jTabbedPane2.addTab(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jPanel9.TabConstraints.tabTitle"), jPanel9); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel42, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel42.text")); // NOI18N

        jButton14.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/cobi/kgg/ui/png/16x16/Folder.png"))); // NOI18N
        org.openide.awt.Mnemonics.setLocalizedText(jButton14, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jButton14.text")); // NOI18N
        jButton14.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton14ActionPerformed(evt);
            }
        });

        org.openide.awt.Mnemonics.setLocalizedText(jLabel43, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel43.text")); // NOI18N

        jTextField28.setText(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jTextField28.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel44, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel44.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel45, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel45.text")); // NOI18N

        jTextField29.setText(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jTextField29.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel46, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel46.text")); // NOI18N

        buttonGroup3.add(jRadioButton5);
        jRadioButton5.setSelected(true);
        org.openide.awt.Mnemonics.setLocalizedText(jRadioButton5, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jRadioButton5.text")); // NOI18N

        buttonGroup3.add(jRadioButton6);
        org.openide.awt.Mnemonics.setLocalizedText(jRadioButton6, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jRadioButton6.text")); // NOI18N

        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(jLabel46)
                        .addGap(18, 18, 18)
                        .addComponent(jRadioButton5)
                        .addGap(18, 18, 18)
                        .addComponent(jRadioButton6))
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addComponent(jLabel43)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextField28, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel44)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel45)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextField29, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addComponent(jLabel42)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(vcfFilePathTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 326, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jButton14, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 15, Short.MAX_VALUE))
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jLabel42)
                    .addComponent(vcfFilePathTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton14))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel43, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextField28, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel45)
                    .addComponent(jTextField29, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel44))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE, false)
                    .addComponent(jLabel46, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jRadioButton5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jRadioButton6))
                .addContainerGap())
        );

        jTabbedPane2.addTab(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jPanel10.TabConstraints.tabTitle"), jPanel10); // NOI18N

        jPanel11.setBorder(javax.swing.BorderFactory.createTitledBorder("Risk variants"));

        org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel2.text")); // NOI18N

        jTextField3.setText(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jTextField3.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel15, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel15.text")); // NOI18N

        jTextField14.setText(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jTextField14.text")); // NOI18N
        jTextField14.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                jTextField14FocusLost(evt);
            }
        });

        org.openide.awt.Mnemonics.setLocalizedText(jLabel16, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel16.text")); // NOI18N

        jTextField15.setText(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jTextField15.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel4, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel4.text")); // NOI18N

        jTextField4.setText(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jTextField4.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel5, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel5.text")); // NOI18N

        jTextField5.setText(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jTextField5.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel6, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel6.text")); // NOI18N

        jTextField6.setText(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jTextField6.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel7, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel7.text")); // NOI18N

        jTextField7.setText(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jTextField7.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel8, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel8.text")); // NOI18N

        jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Additive Model", "Multiplicative Model" }));

        org.openide.awt.Mnemonics.setLocalizedText(jLabel23, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel23.text")); // NOI18N

        jTextField20.setEditable(false);
        jTextField20.setText(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jTextField20.text")); // NOI18N

        javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
        jPanel11.setLayout(jPanel11Layout);
        jPanel11Layout.setHorizontalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addComponent(jLabel7)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTextField7)
                .addGap(14, 14, 14)
                .addComponent(jLabel8)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel11Layout.createSequentialGroup()
                        .addComponent(jLabel23)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextField20, javax.swing.GroupLayout.PREFERRED_SIZE, 216, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel11Layout.createSequentialGroup()
                        .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel11Layout.createSequentialGroup()
                                .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel5)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jLabel6)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel11Layout.createSequentialGroup()
                                .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel15)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTextField14, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel16)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTextField15, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                .addGap(0, 0, Short.MAX_VALUE))
        );
        jPanel11Layout.setVerticalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel15)
                    .addComponent(jTextField14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel16)
                    .addComponent(jTextField15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel5)
                    .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel6)
                    .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel23, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextField20, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(20, 20, 20))
        );

        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jPanel4.border.title"))); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel10, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel10.text")); // NOI18N

        jTextField9.setText(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jTextField9.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel13, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel13.text")); // NOI18N

        jTextField12.setText(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jTextField12.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel14, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel14.text")); // NOI18N

        jTextField13.setText(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jTextField13.text")); // NOI18N

        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)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(jLabel10)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextField9, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(jLabel13)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextField12, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(44, 44, 44)
                        .addComponent(jLabel14)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextField13, javax.swing.GroupLayout.PREFERRED_SIZE, 40, 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()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextField9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel13, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jTextField12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextField13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );

        jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jPanel5.border.title"))); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel12, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel12.text")); // NOI18N

        jTextField11.setText(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jTextField11.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel21, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel21.text")); // NOI18N

        metaAnaComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "No", "At variants", "At sets" }));
        metaAnaComboBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                metaAnaComboBoxActionPerformed(evt);
            }
        });

        org.openide.awt.Mnemonics.setLocalizedText(numStudyLabel, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.numStudyLabel.text")); // NOI18N

        numStudyTextField.setText(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.numStudyTextField.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel22, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel22.text")); // NOI18N

        jTextField8.setText(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jTextField8.text")); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jCheckBox1, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jCheckBox1.text")); // NOI18N
        jCheckBox1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox1ActionPerformed(evt);
            }
        });

        org.openide.awt.Mnemonics.setLocalizedText(jLabel9, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel9.text_1")); // NOI18N

        parellelRunNumTextField.setText(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.parellelRunNumTextField.text")); // NOI18N

        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.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addGroup(jPanel5Layout.createSequentialGroup()
                            .addComponent(jLabel21)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(metaAnaComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(18, 18, 18)
                            .addComponent(numStudyLabel)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(numStudyTextField))
                        .addComponent(jCheckBox1)
                        .addGroup(jPanel5Layout.createSequentialGroup()
                            .addComponent(jLabel12)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jTextField11, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(16, 16, 16)
                            .addComponent(jLabel22)
                            .addGap(40, 40, 40)
                            .addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(jLabel9)
                        .addGap(13, 13, 13)
                        .addComponent(parellelRunNumTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 45, 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()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextField11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel22)
                    .addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jLabel9)
                    .addComponent(parellelRunNumTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel21)
                    .addComponent(metaAnaComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(numStudyLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(numStudyTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jCheckBox1)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel5Layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {jLabel21, metaAnaComboBox, numStudyLabel, numStudyTextField});

        org.openide.awt.Mnemonics.setLocalizedText(jButton1, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jButton1.text")); // NOI18N
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        org.openide.awt.Mnemonics.setLocalizedText(jButton2, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jButton2.text")); // NOI18N
        jButton2.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton2MouseClicked(evt);
            }
        });

        jProgressBar1.setString(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jProgressBar1.string")); // NOI18N
        jProgressBar1.setStringPainted(true);

        jSplitPane1.setDividerLocation(300);
        jSplitPane1.setDividerSize(10);
        jSplitPane1.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
        jSplitPane1.setMinimumSize(new java.awt.Dimension(4, 6));

        jPanel7.setPreferredSize(new java.awt.Dimension(820, 160));

        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(null, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jPanel3.border.title"), javax.swing.border.TitledBorder.RIGHT, javax.swing.border.TitledBorder.DEFAULT_POSITION)); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jLabel25, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel25.text")); // NOI18N

        jComboBox2.setModel(dcbmMAF);
        jComboBox2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jComboBox2ActionPerformed(evt);
            }
        });

        org.openide.awt.Mnemonics.setLocalizedText(jLabel26, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel26.text")); // NOI18N

        jComboBox3.setModel(dcbmLD);
        jComboBox3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jComboBox3ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addComponent(jLabel26)
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jComboBox3, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabel25, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jComboBox2, javax.swing.GroupLayout.Alignment.TRAILING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addContainerGap())))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel25, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel26, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jComboBox3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(227, Short.MAX_VALUE))
        );

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jPanel1.border.title"), javax.swing.border.TitledBorder.RIGHT, javax.swing.border.TitledBorder.DEFAULT_POSITION)); // NOI18N
        jPanel1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jPanel1MouseClicked(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel1, 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))
                .addContainerGap())
        );

        jSplitPane1.setBottomComponent(jPanel7);

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jPanel2.border.title"))); // NOI18N
        jPanel2.setPreferredSize(new java.awt.Dimension(824, 250));

        jScrollPane1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jScrollPane1.border.title"), javax.swing.border.TitledBorder.RIGHT, javax.swing.border.TitledBorder.DEFAULT_POSITION)); // NOI18N
        jScrollPane1.setToolTipText(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jScrollPane1.toolTipText")); // NOI18N
        jScrollPane1.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);

        jTable1.setAutoCreateRowSorter(true);
        jTable1.setModel(aomSNPModel);
        jTable1.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        jTable1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTable1MouseClicked(evt);
            }
        });
        jScrollPane1.setViewportView(jTable1);

        jScrollPane2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jScrollPane2.border.title"), javax.swing.border.TitledBorder.RIGHT, javax.swing.border.TitledBorder.DEFAULT_POSITION)); // NOI18N
        jScrollPane2.setToolTipText(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jScrollPane2.toolTipText")); // NOI18N
        jScrollPane2.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);

        jTable2.setModel(aomGeneModel);
        jTable2.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTable2MouseClicked(evt);
            }
        });
        jScrollPane2.setViewportView(jTable2);

        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)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 792, Short.MAX_VALUE)
                    .addComponent(jScrollPane1))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(6, 6, 6)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 124, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 124, Short.MAX_VALUE)
                .addContainerGap())
        );

        jSplitPane1.setTopComponent(jPanel2);

        jPanel8.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jPanel8.border.title"))); // NOI18N

        org.openide.awt.Mnemonics.setLocalizedText(jCheckBox2, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jCheckBox2.text")); // NOI18N
        jCheckBox2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox2ActionPerformed(evt);
            }
        });

        org.openide.awt.Mnemonics.setLocalizedText(jLabel27, org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jLabel27.text")); // NOI18N

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jCheckBox2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel27, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jCheckBox2)
                    .addComponent(jLabel27, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(0, 0, Short.MAX_VALUE))
        );

        jCheckBox2.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(PowerSimulationFrame.class, "PowerSimulationFrame.jCheckBox2.AccessibleContext.accessibleName")); // NOI18N

        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, false)
                    .addComponent(jTabbedPane2)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(28, 28, 28)
                        .addComponent(jButton1)
                        .addGap(39, 39, 39)
                        .addComponent(jButton2)
                        .addGap(52, 52, 52)
                        .addComponent(jProgressBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 172, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel4, 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(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSplitPane1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGap(6, 6, 6))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jSplitPane1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jTabbedPane2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jPanel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jProgressBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jButton1)
                                .addComponent(jButton2)))))
                .addContainerGap())
        );

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


    private void jButton2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton2MouseClicked

        String infor = "Are you sure to stop the running simulation?";
        Object[] options = {"Yes", "No"};
        int response = JOptionPane.showOptionDialog(this, infor, "Message", JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE,
                null, options, options[1]);
        if (response == 0) {
            simulatorOne.cancel(true);
            jProgressBar1.setIndeterminate(false);
            jProgressBar1.setValue(0);
        }


    }//GEN-LAST:event_jButton2MouseClicked

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

        int intApplicationMark = jTabbedPane2.getSelectedIndex();
        DecimalFormat df = new DecimalFormat("###.000");

        //Lock the chart. 
        jComboBox2.setEnabled(false);
        jComboBox3.setEnabled(false);
        boolMAFChanged = false;
        boolLDChanged = false;        

        //All Variants
        if (intApplicationMark == -1) {
            return;
        } else if (intApplicationMark == 0) {
            //Initialize Self-define
            simpOne.intTotalSNP = Integer.parseInt(jTextField1.getText().trim());
            simpOne.intBlockNum = Integer.parseInt(jTextField18.getText().trim());
            simpOne.intRR1 = Integer.parseInt(jTextField10.getText().trim());

            simpOne.dblMAFStart = Double.parseDouble(jTextField2.getText().trim());
            simpOne.dblMAFEnd = Double.parseDouble(jTextField16.getText().trim());
            simpOne.dblMAFStep = Double.parseDouble(jTextField17.getText().trim());

            dcbmMAF.removeAllElements();
            for (double i = simpOne.dblMAFStart; i <= simpOne.dblMAFEnd; i += simpOne.dblMAFStep) {
                dcbmMAF.addElement(Double.parseDouble(df.format(i)));
            }

            dcbmLD.removeAllElements();
            dcbmLD.addElement(Double.parseDouble(df.format(0)));

            simpOne.boolSNPIndependenceFlag1 = jRadioButton1.isSelected();
            if (!simpOne.boolSNPIndependenceFlag1) {
                simpOne.dblLDStart = Double.parseDouble(jTextField23.getText().trim());
                simpOne.dblLDEnd = Double.parseDouble(jTextField24.getText().trim());
                simpOne.dblLDStep = Double.parseDouble(jTextField25.getText().trim());

                dcbmLD.removeAllElements();
                for (double j = simpOne.dblLDStart; j <= simpOne.dblLDEnd; j += simpOne.dblLDStep) {
                    dcbmLD.addElement(Double.parseDouble(df.format(j)));
                }
            }
        } else if (intApplicationMark == 1) {
            //Initialize data-plink
            simpOne.strFamilyFile = pedigreeFilePathTextField.getText().trim();
            simpOne.strMapFile = mapFilePathTextField.getText().trim();
            simpOne.strBEDFile = bedFilePathTextField.getText().trim();

            simpOne.intVariant2 = Integer.parseInt(jTextField26.getText().trim());
            simpOne.intRR2 = Integer.parseInt(jTextField27.getText().trim());
            simpOne.boolSNPIndependenceFlag2 = jRadioButton3.isSelected();

            //Set ComboBox. 
            dcbmMAF.removeAllElements();
            dcbmMAF.addElement(Double.parseDouble(df.format(0)));
            dcbmLD.removeAllElements();
            dcbmLD.addElement(Double.parseDouble(df.format(0)));

        } else {
            //Initialize data-vcf
            simpOne.strVCFFile = vcfFilePathTextField.getText().trim();

            simpOne.intVariant3 = Integer.parseInt(jTextField28.getText().trim());
            simpOne.intRR3 = Integer.parseInt(jTextField29.getText().trim());
            simpOne.boolSNPIndependenceFlag3 = jRadioButton5.isSelected();

            //Set ComboBox. 
            dcbmMAF.removeAllElements();
            dcbmMAF.addElement(Double.parseDouble(df.format(0)));
            dcbmLD.removeAllElements();
            dcbmLD.addElement(Double.parseDouble(df.format(0)));
        }

        //Risk Variants
        simpOne.intRiskSNPStart = Integer.parseInt(jTextField3.getText().trim());
        simpOne.intRiskSNPEnd = Integer.parseInt(jTextField14.getText().trim());
        simpOne.intRiskSNPStep = Integer.parseInt(jTextField15.getText().trim());

        simpOne.dblOddsStart = Double.parseDouble(jTextField4.getText().trim());
        simpOne.dblOddsEnd = Double.parseDouble(jTextField5.getText().trim());
        simpOne.dblOddsStep = Double.parseDouble(jTextField6.getText().trim());

        simpOne.dblDiseasePrevalence = Double.parseDouble(jTextField7.getText().trim());
        simpOne.intGeneticModel = jComboBox1.getSelectedIndex();
        
        //Postpone to produce the positions. 
//        String strTemp = jTextField20.getText().trim();
//        if (strTemp == null | "".equals(strTemp)) {
//            jButton5ActionPerformed(null);
//        }
//        strTemp = jTextField20.getText().trim();
//        String[] strElements = strTemp.split(", *| +|; *");
//        simpOne.altRiskSNPPosition = new ArrayList();
//        for (String strElement : strElements) {
//            simpOne.altRiskSNPPosition.add(Integer.parseInt(strElement));
//        }

        //Population & Sample        
        simpOne.intPopulation = Integer.parseInt(jTextField9.getText().trim());
        simpOne.intCase = Integer.parseInt(jTextField12.getText().trim());
        simpOne.intControl = Integer.parseInt(jTextField13.getText().trim());

        //Simulation & Test
        simpOne.intSimulationTimes = 1;
        simpOne.intSamplingTimes = Integer.parseInt(jTextField11.getText().trim());
        simpOne.dblPValueThreshold = Double.parseDouble(jTextField8.getText().trim());

        if (metaAnaComboBox.getSelectedIndex() != 0) {
            int intNumOfStudies = Integer.parseInt(numStudyTextField.getText().trim());
            if (intNumOfStudies <= 0) {
                return;
            }
            int intCase = (int) (simpOne.intPopulation * simpOne.dblDiseasePrevalence / intNumOfStudies);
            if (intCase <= simpOne.intCase) {
                int population = (int) (simpOne.intCase * intNumOfStudies / simpOne.dblDiseasePrevalence);
                simpOne.intPopulation = population;
                jTextField9.setText(Integer.toString(population));
            }
        }
        simpOne.parellelRunNum = Integer.parseInt(parellelRunNumTextField.getText().trim().trim());
        simpOne.intMetaAnalysis = metaAnaComboBox.getSelectedIndex();
        simpOne.intNumOfStudies = Integer.parseInt(numStudyTextField.getText().trim());
        simpOne.boolShuffle = jCheckBox1.isSelected();

        //SKAT
        simpOne.boolSKAT = boolSKAT;
        simpOne.skatOne = skatOne;
        if(boolSKAT)    {
            skatOne.setPhenotype(simpOne.intCase, simpOne.intControl);
            simpOne.intParallel=Integer.parseInt(parellelRunNumTextField.getText().trim().trim());
            simpOne.parellelRunNum=1;
            skatOne.startRServe(simpOne.intParallel);
        }
        //Others
        simpOne.intApplicationFlag = intApplicationMark;
        simpOne.jdOne = this;
        jProgressBar1.setValue(0);

        //Clear power list
        lstSNPPower.clear();
        lstGenePower.clear();
        simulatorOne = new Simulator(simpOne);
        simulatorOne.execute();
    }//GEN-LAST:event_jButton1ActionPerformed

    private void jButton11ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton11ActionPerformed
        String path;
        JFileChooser fDialog;
        if ((GlobalManager.lastAccessedPath != null) && (GlobalManager.lastAccessedPath.trim().length() > 0)) {
            fDialog = new JFileChooser(GlobalManager.lastAccessedPath);
        } else {
            fDialog = new JFileChooser();
        }
        fDialog.setDialogTitle("Choose a Pedigree File with Genotypes");
        
        int result = fDialog.showOpenDialog(this);
        if (result == JFileChooser.APPROVE_OPTION) {
            GlobalManager.lastAccessedPath = fDialog.getSelectedFile().getPath();
            GlobalManager.lastAccessedPath = GlobalManager.lastAccessedPath.substring(0, GlobalManager.lastAccessedPath.lastIndexOf(File.separator) + 1);

            try {
                File file = fDialog.getSelectedFile();
                path = file.getCanonicalPath();
                pedigreeFilePathTextField.setText(path);
                if (mapFilePathTextField.getText().trim().trim().length() == 0) {
                    int extPos = path.lastIndexOf(".");
                    String prefixName = "";
                    if (extPos >= 0) {
                        prefixName = path.substring(0, extPos);
                    }
                    File tmpFile = new File(prefixName + ".bim");
                    if (tmpFile.exists()) {
                        mapFilePathTextField.setText(prefixName + ".bim");
                    }
                }
                if (bedFilePathTextField.getText().trim().trim().length() == 0) {
                    int extPos = path.lastIndexOf(".");
                    String prefixName = "";
                    if (extPos >= 0) {
                        prefixName = path.substring(0, extPos);
                    }
                    File tmpFile = new File(prefixName + ".bed");
                    if (tmpFile.exists()) {
                        bedFilePathTextField.setText(prefixName + ".bed");
                    }
                }

            } catch (Exception ex) {
                ErrorManager.getDefault().notify(ex);
            }

        } else {
            // JOptionPane.showMessageDialog(this, FILE_OPEN_CANCELLED, "Message", JOptionPane.INFORMATION_MESSAGE);
        }
    }//GEN-LAST:event_jButton11ActionPerformed

    private void jButton12ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton12ActionPerformed
        // TODO add your handling code here:
        String path;
        JFileChooser fDialog;
        if ((GlobalManager.lastAccessedPath != null) && (GlobalManager.lastAccessedPath.trim().length() > 0)) {
            fDialog = new JFileChooser(GlobalManager.lastAccessedPath);
        } else {
            fDialog = new JFileChooser();
        }
        fDialog.setDialogTitle("Choose a Map File for SNPs in the Pedigree File");

        int result = fDialog.showOpenDialog(this);
        if (result == JFileChooser.APPROVE_OPTION) {
            GlobalManager.lastAccessedPath = fDialog.getSelectedFile().getPath();
            GlobalManager.lastAccessedPath = GlobalManager.lastAccessedPath.substring(0, GlobalManager.lastAccessedPath.lastIndexOf(File.separator) + 1);

            try {
                File file = fDialog.getSelectedFile();
                path = file.getCanonicalPath();
                mapFilePathTextField.setText(path);

                if (pedigreeFilePathTextField.getText().trim().trim().length() == 0) {
                    int extPos = path.lastIndexOf(".");
                    String prefixName = "";
                    if (extPos >= 0) {
                        prefixName = path.substring(0, extPos);
                    }
                    File tmpFile = new File(prefixName + ".fam");
                    if (tmpFile.exists()) {
                        pedigreeFilePathTextField.setText(prefixName + ".fam");
                    }
                }
                if (bedFilePathTextField.getText().trim().trim().length() == 0) {
                    int extPos = path.lastIndexOf(".");
                    String prefixName = "";
                    if (extPos >= 0) {
                        prefixName = path.substring(0, extPos);
                    }
                    File tmpFile = new File(prefixName + ".bed");
                    if (tmpFile.exists()) {
                        bedFilePathTextField.setText(prefixName + ".bed");
                    }
                }

                //JOptionPane.showMessageDialog(this, FILE_OPEN_APPROVED, "Message", JOptionPane.INFORMATION_MESSAGE);
            } catch (Exception ex) {
                ErrorManager.getDefault().notify(ex);
            }
        } else {
            //JOptionPane.showMessageDialog(this, FILE_OPEN_CANCELLED, "Message", JOptionPane.INFORMATION_MESSAGE);
        }
    }//GEN-LAST:event_jButton12ActionPerformed

    private void jButton13ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton13ActionPerformed
        // TODO add your handling code here:
        String path;
        JFileChooser fDialog;
        if ((GlobalManager.lastAccessedPath != null) && (GlobalManager.lastAccessedPath.trim().length() > 0)) {
            fDialog = new JFileChooser(GlobalManager.lastAccessedPath);
        } else {
            fDialog = new JFileChooser();
        }
        fDialog.setDialogTitle("Choose a Pedigree File with Genotypes");

        int result = fDialog.showOpenDialog(this);
        if (result == JFileChooser.APPROVE_OPTION) {
            GlobalManager.lastAccessedPath = fDialog.getSelectedFile().getPath();
            GlobalManager.lastAccessedPath = GlobalManager.lastAccessedPath.substring(0, GlobalManager.lastAccessedPath.lastIndexOf(File.separator) + 1);

            try {
                File file = fDialog.getSelectedFile();
                path = file.getCanonicalPath();
                bedFilePathTextField.setText(path);
                if (mapFilePathTextField.getText().trim().trim().length() == 0) {
                    int extPos = path.lastIndexOf(".");
                    String prefixName = "";
                    if (extPos >= 0) {
                        prefixName = path.substring(0, extPos);
                    }
                    File tmpFile = new File(prefixName + ".bim");
                    if (tmpFile.exists()) {
                        mapFilePathTextField.setText(prefixName + ".bim");
                    }
                }
                if (pedigreeFilePathTextField.getText().trim().trim().length() == 0) {
                    int extPos = path.lastIndexOf(".");
                    String prefixName = "";
                    if (extPos >= 0) {
                        prefixName = path.substring(0, extPos);
                    }
                    File tmpFile = new File(prefixName + ".fam");
                    if (tmpFile.exists()) {
                        pedigreeFilePathTextField.setText(prefixName + ".fam");
                    }
                }
            } catch (Exception ex) {
                ErrorManager.getDefault().notify(ex);
            }

        } else {
            // JOptionPane.showMessageDialog(this, FILE_OPEN_CANCELLED, "Message", JOptionPane.INFORMATION_MESSAGE);
        }
    }//GEN-LAST:event_jButton13ActionPerformed

    private void jButton14ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton14ActionPerformed
        String path;
        JFileChooser fDialog;
        if ((GlobalManager.lastAccessedPath != null) && (GlobalManager.lastAccessedPath.trim().length() > 0)) {
            fDialog = new JFileChooser(GlobalManager.lastAccessedPath);
        } else {
            fDialog = new JFileChooser();
        }
        fDialog.setDialogTitle("Choose a vcf File!");

        int result = fDialog.showOpenDialog(this);
        if (result == JFileChooser.APPROVE_OPTION) {
            try {
                GlobalManager.lastAccessedPath = fDialog.getSelectedFile().getPath();
                GlobalManager.lastAccessedPath = GlobalManager.lastAccessedPath.substring(0, GlobalManager.lastAccessedPath.lastIndexOf(File.separator) + 1);
                File file = fDialog.getSelectedFile();
                path = file.getCanonicalPath();
                vcfFilePathTextField.setText(path);
            } catch (IOException ex) {
                Exceptions.printStackTrace(ex);
            }
        }
    }//GEN-LAST:event_jButton14ActionPerformed

    private void metaAnaComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_metaAnaComboBoxActionPerformed
        if (metaAnaComboBox.getSelectedIndex() == 0) {
            numStudyTextField.setVisible(false);
            numStudyLabel.setVisible(false);
            jCheckBox1.setVisible(false);
            numStudyTextField.setText("1");
            jCheckBox1.setSelected(false);
            jCheckBox1ActionPerformed(null);
        } else {
            numStudyTextField.setVisible(true);
            numStudyTextField.setText("3");
            numStudyLabel.setVisible(true);
            jCheckBox1.setVisible(true);
            jCheckBox1ActionPerformed(null);
        }
    }//GEN-LAST:event_metaAnaComboBoxActionPerformed

    private void jRadioButton1StateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jRadioButton1StateChanged
        if (!jRadioButton1.isSelected()) {
            jLabel33.setVisible(true);
            jLabel34.setVisible(true);
            jLabel35.setVisible(true);
            jTextField23.setVisible(true);
            jTextField24.setVisible(true);
            jTextField25.setVisible(true);
            jTextField18.setVisible(true);
            jLabel19.setVisible(true);
        } else {
            jLabel33.setVisible(false);
            jLabel34.setVisible(false);
            jLabel35.setVisible(false);
            jTextField23.setVisible(false);
            jTextField24.setVisible(false);
            jTextField25.setVisible(false);
            jTextField18.setVisible(false);
            jLabel19.setVisible(false);
        }
    }//GEN-LAST:event_jRadioButton1StateChanged

    private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
        // TODO add your handling code here:
        JFileChooser jfcSave = null;
        if ((GlobalManager.lastAccessedPath != null) && (GlobalManager.lastAccessedPath.trim().length() > 0)) {
            jfcSave = new JFileChooser(GlobalManager.lastAccessedPath);
        } else {
            jfcSave = new JFileChooser();
        }
        FileNameExtensionFilter fnefFilter = new FileNameExtensionFilter("*.xls", "xls");
        jfcSave.setFileFilter(fnefFilter);
        int intResult = jfcSave.showSaveDialog(this);

        File fleFile = jfcSave.getSelectedFile();
        if (!fleFile.getPath().endsWith("xls")) {
            fleFile = new File(fleFile.getPath() + ".xls");
        }

        if (intResult == JFileChooser.APPROVE_OPTION) {
            try {
                if (intActiveTable == 1) {
                    List<String[]> lstTemp = new ArrayList<String[]>(aomSNPModel.getDataList());
                    lstTemp.add(0, aomSNPModel.getTitle());
                    LocalExcelFile.writeArray2ExcelFile(fleFile.getCanonicalPath(), aomSNPModel.getTitle(), lstTemp);
                } else if (intActiveTable == 2) {
                    List<String[]> lstTemp = new ArrayList<String[]>(aomGeneModel.getDataList());
                    lstTemp.add(0, aomGeneModel.getTitle());
                    LocalExcelFile.writeArray2ExcelFile(fleFile.getCanonicalPath(), aomGeneModel.getTitle(), lstTemp);
                } else {
                    return;
                }
            } catch (Exception ex) {
                ex.printStackTrace();
            }
        }
    }//GEN-LAST:event_jMenuItem1ActionPerformed

    private void jTable2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTable2MouseClicked
        // TODO add your handling code here:
        if (evt.getButton() == java.awt.event.MouseEvent.BUTTON3) {
            intActiveTable = 2;
            jPopupMenu1.add(jMenuItem1);
            jPopupMenu1.add(jMenuItem2);
            jPopupMenu1.add(jMenuItem3);
            jPopupMenu1.show(jTable2, evt.getX(), evt.getY());
        }
    }//GEN-LAST:event_jTable2MouseClicked

    private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
        // TODO add your handling code here:
        JFileChooser jfcSave = null;
        if ((GlobalManager.lastAccessedPath != null) && (GlobalManager.lastAccessedPath.trim().length() > 0)) {
            jfcSave = new JFileChooser(GlobalManager.lastAccessedPath);
        } else {
            jfcSave = new JFileChooser();
        }
        FileNameExtensionFilter fnefFilter = new FileNameExtensionFilter("*.xlsx", "xlsx");
        jfcSave.setFileFilter(fnefFilter);
        int intResult = jfcSave.showSaveDialog(this);

        File fleFile = jfcSave.getSelectedFile();
        if (!fleFile.getPath().endsWith("xlsx")) {
            fleFile = new File(fleFile.getPath() + ".xlsx");
        }

        if (intResult == JFileChooser.APPROVE_OPTION) {
            try {
                if (intActiveTable == 1) {
                    List<String[]> lstTemp = new ArrayList<String[]>(aomSNPModel.getDataList());
                    lstTemp.add(0, aomSNPModel.getTitle());
                    LocalExcelFile.WriteArray2XLSXFile(fleFile.getCanonicalPath(), aomSNPModel.getTitle(), lstTemp);
                } else if (intActiveTable == 2) {
                    List<String[]> lstTemp = new ArrayList<String[]>(aomGeneModel.getDataList());
                    lstTemp.add(0, aomGeneModel.getTitle());
                    LocalExcelFile.WriteArray2XLSXFile(fleFile.getCanonicalPath(), aomGeneModel.getTitle(), lstTemp);
                } else {
                    return;
                }
            } catch (Exception ex) {
                ex.printStackTrace();
            }
        }
    }//GEN-LAST:event_jMenuItem2ActionPerformed

    private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem3ActionPerformed
        // TODO add your handling code here:
        JFileChooser jfcSave = null;
        if ((GlobalManager.lastAccessedPath != null) && (GlobalManager.lastAccessedPath.trim().length() > 0)) {
            jfcSave = new JFileChooser(GlobalManager.lastAccessedPath);
        } else {
            jfcSave = new JFileChooser();
        }
        FileNameExtensionFilter fnefFilter = new FileNameExtensionFilter("*.txt", "txt");
        jfcSave.setFileFilter(fnefFilter);
        int intResult = jfcSave.showSaveDialog(this);

        File fleFile = jfcSave.getSelectedFile();
        if (!fleFile.getPath().endsWith("txt")) {
            fleFile = new File(fleFile.getPath() + ".txt");
        }

        if (intResult == JFileChooser.APPROVE_OPTION) {
            try {
                if (intActiveTable == 1) {
                    List<String[]> altTemp = aomSNPModel.getDataList();
                    altTemp.add(0, aomSNPModel.getTitle());
                    LocalFile.writeData(fleFile.getCanonicalPath(), altTemp, "\t", false);
                } else if (intActiveTable == 2) {
                    List<String[]> altTemp = aomGeneModel.getDataList();
                    altTemp.add(0, aomGeneModel.getTitle());
                    LocalFile.writeData(fleFile.getCanonicalPath(), altTemp, "\t", false);
                } else {
                    return;
                }
            } catch (Exception ex) {
                ex.printStackTrace();
            }
        }
    }//GEN-LAST:event_jMenuItem3ActionPerformed

    private void jTable1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTable1MouseClicked
        // TODO add your handling code here:
        if (evt.getButton() == java.awt.event.MouseEvent.BUTTON3) {
            intActiveTable = 1;
            jPopupMenu1.add(jMenuItem1);
            jPopupMenu1.add(jMenuItem2);
            jPopupMenu1.add(jMenuItem3);
            jPopupMenu1.show(jTable1, evt.getX(), evt.getY());
        }
    }//GEN-LAST:event_jTable1MouseClicked

    private void jTextField14FocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jTextField14FocusLost
        // TODO add your handling code here:
        String strTemp = jTextField14.getText().trim();
        if (strTemp.isEmpty() | strTemp.equals("")) {
            jTextField14.setText(jTextField3.getText().trim());
        }
        //jButton5ActionPerformed(null);
    }//GEN-LAST:event_jTextField14FocusLost

    private void jComboBox2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBox2ActionPerformed
        // TODO add your handling code here:
        if (dcbmMAF.getSize() <= 1) {
            return;
        }

        int intSelectedMAF = jComboBox2.getSelectedIndex();
        int intSelectedLD = jComboBox3.getSelectedIndex();
        double dblSelectedMAF = dcbmMAF.getElementAt(intSelectedMAF);
        double dblSelectedLD = dcbmLD.getElementAt(intSelectedLD);

        this.dpcOne.setMAFandLD(dblSelectedMAF, dblSelectedLD);
        this.dpcOne.createDataSet(boolSKAT);
        this.dpcOne.createChart(boolSKAT);

        JFreeChart jfcPlot = this.dpcOne.getJfreechart();
        ChartPanel cplCanvas = new ChartPanel(jfcPlot);
        this.getjPanel1().removeAll();
        this.getjPanel1().setLayout(new java.awt.BorderLayout());
        this.getjPanel1().add(cplCanvas, BorderLayout.CENTER);
        this.getjPanel1().validate();

    }//GEN-LAST:event_jComboBox2ActionPerformed

    private void jTabbedPane2StateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jTabbedPane2StateChanged
        // TODO add your handling code here:
        int intSelectedTab = jTabbedPane2.getSelectedIndex();
        if (intSelectedTab == 0) {
            jComboBox2.setEnabled(true);
            jComboBox3.setEnabled(true);
        } else {
            jComboBox2.setEnabled(false);
            jComboBox3.setEnabled(false);
        }
    }//GEN-LAST:event_jTabbedPane2StateChanged

    private void jComboBox3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBox3ActionPerformed
        // TODO add your handling code here:
        if (dcbmLD.getSize() <= 1) {
            return;
        }

        int intSelectedMAF = jComboBox2.getSelectedIndex();
        int intSelectedLD = jComboBox3.getSelectedIndex();
        double dblSelectedMAF = dcbmMAF.getElementAt(intSelectedMAF);
        double dblSelectedLD = dcbmLD.getElementAt(intSelectedLD);

        this.dpcOne.setMAFandLD(dblSelectedMAF, dblSelectedLD);
        this.dpcOne.createDataSet(boolSKAT);
        this.dpcOne.createChart(boolSKAT);

        JFreeChart jfcPlot = this.dpcOne.getJfreechart();
        ChartPanel cplCanvas = new ChartPanel(jfcPlot);
        this.getjPanel1().removeAll();
        this.getjPanel1().setLayout(new java.awt.BorderLayout());
        this.getjPanel1().add(cplCanvas, BorderLayout.CENTER);
        this.getjPanel1().validate();
    }//GEN-LAST:event_jComboBox3ActionPerformed

    private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox1ActionPerformed
        if (jCheckBox1.isSelected()) {
            jLabel23.setEnabled(false);
            jTextField20.setEnabled(false);
            //jButton5.setEnabled(false);
            //jLabel24.setEnabled(false);
        } else {
            jLabel23.setEnabled(true);
            jTextField20.setEnabled(true);
            //jButton5.setEnabled(true);
            //jLabel24.setEnabled(true);
        }

    }//GEN-LAST:event_jCheckBox1ActionPerformed

    private void jPanel1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jPanel1MouseClicked
        // TODO add your handling code here:
//        if (evt.getButton() == java.awt.event.MouseEvent.BUTTON3) {
//            jPopupMenu2.add(jMenuItem4);
//            jPopupMenu2.show(jPanel1, evt.getX(), evt.getY());
//        }        
    }//GEN-LAST:event_jPanel1MouseClicked

    private void jMenuItem4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem4ActionPerformed
        // TODO add your handling code here:
//        JFileChooser jfcSave = null;
//        if ((GlobalManager.lastAccessedPath != null) && (GlobalManager.lastAccessedPath.trim().length() > 0)) {
//            jfcSave = new JFileChooser(GlobalManager.lastAccessedPath);
//        } else {
//            jfcSave = new JFileChooser();
//        }
//        FileNameExtensionFilter fnefFilter = new FileNameExtensionFilter("*.jpg", "jpg");
//        jfcSave.setFileFilter(fnefFilter);
//        int intResult = jfcSave.showSaveDialog(this);
//
//        File fleFile = jfcSave.getSelectedFile();
//        if (!fleFile.getPath().endsWith("jpg")) {
//            fleFile = new File(fleFile.getPath() + ".jpg");
//        } 
//
//         if (intResult == JFileChooser.APPROVE_OPTION) {
//            try {
//                saveAsFile(this.dpcOne.getJfreechart(),fleFile.getCanonicalPath(),jPanel1.getBounds().width,jPanel1.getBounds().height);
//            } catch (Exception ex) {
//                ex.printStackTrace();
//            }
//        }       
    }//GEN-LAST:event_jMenuItem4ActionPerformed

    private void formWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosing
        if (simulatorOne != null && !simulatorOne.isDone()) {
            String infor = "Do you want to stop the running simulation?";
            Object[] options = {"Yes", "No"};
            int response = JOptionPane.showOptionDialog(this, infor, "Message", JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE,
                    null, options, options[1]);
            if (response == 0) {
                simulatorOne.cancel(true);
                jProgressBar1.setIndeterminate(false);
                jProgressBar1.setValue(0);
            }
        }
    }//GEN-LAST:event_formWindowClosing

    private void jCheckBox2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox2ActionPerformed
        // TODO add your handling code here:

        if (jCheckBox2.isSelected()) {
            boolSKAT = true;
            try {
                JOptionPane.showMessageDialog(this, "The speed will decrease dramatically when SKAT added. Please be patient to wait for the response!","Tip Message", JOptionPane.WARNING_MESSAGE);
                skatOne = new SKAT();
            } catch (RserveException ex) {
                if (ex.getMessage().contains("Cannot connect")) {
                    // System.out.println(ex.getMessage() + "\t" + ex.getRequestReturnCode() + "\t" + ex.getRequestErrorDescription());
                    String infor = "Please open your R and type the following commands to allow kgg to use it:\npack=\"Rserve\";\n"
                            + "if (!require(pack,character.only = TRUE))   { install.packages(pack,dep=TRUE,repos=\'http://cran.us.r-project.org\');   if(!require(pack,character.only = TRUE)) stop(\"Package not found\")   }\n"
                            + "library(\"Rserve\");\nRserve(debug = FALSE, port = 6311, args = NULL)\n";
                    FormatShowingDialog dialog = new FormatShowingDialog(this, false, "Rserve connection!", infor);
                    dialog.setLocationRelativeTo(this);
                    dialog.setVisible(true);
                    // java.util.logging.Logger.getLogger(infor);
                };
            }
            if (skatOne == null) {
                jCheckBox2.setSelected(false);
                boolSKAT = false;
            }
        }else{
            boolSKAT=false;
            skatOne=null;
        }


    }//GEN-LAST:event_jCheckBox2ActionPerformed

    /**
     * @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(PowerSimulationFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(PowerSimulationFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(PowerSimulationFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(PowerSimulationFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the dialog */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                PowerSimulationFrame dialog = new PowerSimulationFrame(new javax.swing.JFrame(), true);
                dialog.addWindowListener(new java.awt.event.WindowAdapter() {
                    @Override
                    public void windowClosing(java.awt.event.WindowEvent e) {
                        System.exit(0);
                    }
                });
                dialog.setVisible(true);
            }
        });
    }

    public JPanel getjPanel1() {
        return jPanel1;
    }

    public JComboBox getjComboBox2() {
        return jComboBox2;
    }

    public JComboBox getjComboBox3() {
        return jComboBox3;
    }

    public JProgressBar getjProgressBar1() {
        return jProgressBar1;
    }

    public DefaultComboBoxModel<Double> getDcbmMAF() {
        return dcbmMAF;
    }

    public DefaultComboBoxModel<Double> getDcbmLD() {
        return dcbmLD;
    }

    public JTable getjTable1() {
        return jTable1;
    }

    public JTable getjTable2() {
        return jTable2;
    }

    public JTextField getjTextField20() {
        return jTextField20;
    }

//    public void saveAsFile(JFreeChart chart, String outputPath, int weight, int height){
//        try {
//            FileOutputStream fosWrite = new FileOutputStream(outputPath);
//            ChartUtilities.writeChartAsJPEG(fosWrite, chart, weight, height);
//            fosWrite.flush();
//            fosWrite.close();
//        } catch (FileNotFoundException ex) {
//            Exceptions.printStackTrace(ex);
//        } catch (IOException ex) {
//            Exceptions.printStackTrace(ex);
//        }
//    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTextField bedFilePathTextField;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.ButtonGroup buttonGroup2;
    private javax.swing.ButtonGroup buttonGroup3;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton11;
    private javax.swing.JButton jButton12;
    private javax.swing.JButton jButton13;
    private javax.swing.JButton jButton14;
    private javax.swing.JButton jButton2;
    private javax.swing.JCheckBox jCheckBox1;
    private javax.swing.JCheckBox jCheckBox2;
    private javax.swing.JComboBox jComboBox1;
    private javax.swing.JComboBox jComboBox2;
    private javax.swing.JComboBox jComboBox3;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    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 jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel41;
    private javax.swing.JLabel jLabel42;
    private javax.swing.JLabel jLabel43;
    private javax.swing.JLabel jLabel44;
    private javax.swing.JLabel jLabel45;
    private javax.swing.JLabel jLabel46;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem2;
    private javax.swing.JMenuItem jMenuItem3;
    private javax.swing.JMenuItem jMenuItem4;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    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.JPopupMenu jPopupMenu1;
    private javax.swing.JPopupMenu jPopupMenu2;
    private javax.swing.JProgressBar jProgressBar1;
    private javax.swing.JRadioButton jRadioButton1;
    private javax.swing.JRadioButton jRadioButton2;
    private javax.swing.JRadioButton jRadioButton3;
    private javax.swing.JRadioButton jRadioButton4;
    private javax.swing.JRadioButton jRadioButton5;
    private javax.swing.JRadioButton jRadioButton6;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JSplitPane jSplitPane1;
    private javax.swing.JTabbedPane jTabbedPane2;
    private javax.swing.JTable jTable1;
    private javax.swing.JTable jTable2;
    private javax.swing.JTextArea jTextAreaRef;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JTextField jTextField10;
    private javax.swing.JTextField jTextField11;
    private javax.swing.JTextField jTextField12;
    private javax.swing.JTextField jTextField13;
    private javax.swing.JTextField jTextField14;
    private javax.swing.JTextField jTextField15;
    private javax.swing.JTextField jTextField16;
    private javax.swing.JTextField jTextField17;
    private javax.swing.JTextField jTextField18;
    private javax.swing.JTextField jTextField2;
    private javax.swing.JTextField jTextField20;
    private javax.swing.JTextField jTextField23;
    private javax.swing.JTextField jTextField24;
    private javax.swing.JTextField jTextField25;
    private javax.swing.JTextField jTextField26;
    private javax.swing.JTextField jTextField27;
    private javax.swing.JTextField jTextField28;
    private javax.swing.JTextField jTextField29;
    private javax.swing.JTextField jTextField3;
    private javax.swing.JTextField jTextField4;
    private javax.swing.JTextField jTextField5;
    private javax.swing.JTextField jTextField6;
    private javax.swing.JTextField jTextField7;
    private javax.swing.JTextField jTextField8;
    private javax.swing.JTextField jTextField9;
    private javax.swing.JTextField mapFilePathTextField;
    private javax.swing.JComboBox metaAnaComboBox;
    private javax.swing.JLabel numStudyLabel;
    private javax.swing.JTextField numStudyTextField;
    private javax.swing.JTextField parellelRunNumTextField;
    private javax.swing.JTextField pedigreeFilePathTextField;
    private javax.swing.JTextField vcfFilePathTextField;
    // End of variables declaration//GEN-END:variables
}
