You are on page 1of 260

Simple Al © 2011

Part 1
of the
Program
Class Name: MainCom.java
/*

* To change this template, choose Tools | Templates

* and open the template in the editor.

*/

/*

* MainCom.java

* Created on 03 25, 11, 10:11:37 PM

*/

/**

* @author Al-Ahmadgaid B. Asaad

*/

public class MainCom extends javax.swing.JFrame {

/** Creates new form MainCom */

public MainCom() {

initComponents();

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

jInternalFrame1 = new javax.swing.JInternalFrame();

jLabel1 = new javax.swing.JLabel();

jLabel2 = new javax.swing.JLabel();

equal = new javax.swing.JButton();

unequal = new javax.swing.JButton();

setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

setTitle("More Options");

setResizable(false);

jInternalFrame1.setTitle("Variance");

jInternalFrame1.setToolTipText("Other options available");

jInternalFrame1.setFrameIcon(null);

jInternalFrame1.setVisible(true);

jLabel1.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N

jLabel1.setText("The Sample Size you entered is less");

jLabel2.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N


jLabel2.setText("than 30, please specify your variance.");

equal.setFont(new java.awt.Font("Century Gothic", 1, 11));

equal.setText("equal");

equal.setToolTipText("equal variance");

equal.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED,
new java.awt.Color(255, 0, 102), new java.awt.Color(255, 0, 0), new java.awt.Color(0, 0, 255), new
java.awt.Color(0, 0, 255)));

equal.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

equalActionPerformed(evt);

});

unequal.setFont(new java.awt.Font("Century Gothic", 1, 11));

unequal.setText("unequal");

unequal.setToolTipText("unequal variance");

unequal.setBorder(new
javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED, new java.awt.Color(255, 0,
102), new java.awt.Color(255, 0, 0), new java.awt.Color(0, 0, 255), new java.awt.Color(0, 0, 255)));

unequal.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

unequalActionPerformed(evt);

});
javax.swing.GroupLayout jInternalFrame1Layout = new
javax.swing.GroupLayout(jInternalFrame1.getContentPane());

jInternalFrame1.getContentPane().setLayout(jInternalFrame1Layout);

jInternalFrame1Layout.setHorizontalGroup(

jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jInternalFrame1Layout.createSequentialGroup()

.addGap(33, 33, 33)

.addComponent(equal, javax.swing.GroupLayout.PREFERRED_SIZE, 70,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 34,
Short.MAX_VALUE)

.addComponent(unequal, javax.swing.GroupLayout.PREFERRED_SIZE, 70,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(35, 35, 35))

.addGroup(jInternalFrame1Layout.createSequentialGroup()

.addGap(18, 18, 18)

.addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jInternalFrame1Layout.createSequentialGroup()

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 8,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel1)

.addGap(11, 11, 11))

.addComponent(jLabel2))

.addContainerGap(18, Short.MAX_VALUE))

);

jInternalFrame1Layout.setVerticalGroup(
jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jInternalFrame1Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jLabel1)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jLabel2)

.addGap(26, 26, 26)

.addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(unequal, javax.swing.GroupLayout.PREFERRED_SIZE, 24,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(equal, javax.swing.GroupLayout.PREFERRED_SIZE, 24,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addContainerGap(19, Short.MAX_VALUE))

);

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()

.addComponent(jInternalFrame1)

.addContainerGap())

);

layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()

.addContainerGap()

.addComponent(jInternalFrame1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);

pack();

}// </editor-fold>//GEN-END:initComponents

private void equalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_equalActionPerformed

MainProgD an = new MainProgD();

an.setVisible(true);

}//GEN-LAST:event_equalActionPerformed

private void unequalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_unequalActionPerformed

MainProgE in = new MainProgE();

in.setVisible(true);

}//GEN-LAST:event_unequalActionPerformed

/**

* @param args the command line arguments

*/

public static void main(String args[]) {

java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {

new MainCom().setVisible(true);

});

// Variables declaration - do not modify//GEN-BEGIN:variables

private javax.swing.JButton equal;

private javax.swing.JInternalFrame jInternalFrame1;

private javax.swing.JLabel jLabel1;

private javax.swing.JLabel jLabel2;

private javax.swing.JButton unequal;

// End of variables declaration//GEN-END:variables

}
Part 2
of the
Program
Class Name: MainComA.java
import javax.swing.JOptionPane;

/*

* To change this template, choose Tools | Templates

* and open the template in the editor.

*/

/*

* MainComA.java

* Created on 03 25, 11, 10:26:32 PM

*/

/**

* @author Al-Ahmadgaid B. Asaad

*/

public class MainComA extends javax.swing.JFrame {

/** Creates new form MainComA */

public MainComA() {

initComponents();

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

jInternalFrame1 = new javax.swing.JInternalFrame();

jPanel1 = new javax.swing.JPanel();

insam = new javax.swing.JTextField();

insam1 = new javax.swing.JTextField();

ok = new javax.swing.JButton();

jLabel2 = new javax.swing.JLabel();

jLabel3 = new javax.swing.JLabel();

jMenuBar1 = new javax.swing.JMenuBar();

jMenu1 = new javax.swing.JMenu();

Helpcom = new javax.swing.JMenuItem();

jMenuItem2 = new javax.swing.JMenuItem();

setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

setTitle("Sample Size");

setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

setResizable(false);
jInternalFrame1.setTitle("Specify your Sample Size");

jInternalFrame1.setToolTipText("");

jInternalFrame1.setFrameIcon(null);

jInternalFrame1.setVisible(true);

ok.setFont(new java.awt.Font("Century Gothic", 1, 11));

ok.setText("OK");

ok.setToolTipText("Sure?");

ok.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED,
new java.awt.Color(255, 0, 102), new java.awt.Color(255, 0, 0), new java.awt.Color(0, 0, 255), new
java.awt.Color(0, 0, 255)));

ok.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

okActionPerformed(evt);

});

javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);

jPanel1.setLayout(jPanel1Layout);

jPanel1Layout.setHorizontalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel1Layout.createSequentialGroup()

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addComponent(insam, javax.swing.GroupLayout.PREFERRED_SIZE, 102,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)


.addComponent(insam1, javax.swing.GroupLayout.PREFERRED_SIZE, 102,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addComponent(ok, javax.swing.GroupLayout.PREFERRED_SIZE, 40,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(21, 21, 21))

);

jPanel1Layout.setVerticalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addContainerGap()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(ok, javax.swing.GroupLayout.PREFERRED_SIZE, 24,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(insam1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(insam, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);

jLabel2.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel2.setText("if you're computing for one population, just put your");

jLabel3.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N

jLabel3.setText("sample size in both text field.");


javax.swing.GroupLayout jInternalFrame1Layout = new
javax.swing.GroupLayout(jInternalFrame1.getContentPane());

jInternalFrame1.getContentPane().setLayout(jInternalFrame1Layout);

jInternalFrame1Layout.setHorizontalGroup(

jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jInternalFrame1Layout.createSequentialGroup()

.addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jInternalFrame1Layout.createSequentialGroup()

.addGap(43, 43, 43)

.addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jInternalFrame1Layout.createSequentialGroup()

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 22,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel2))

.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))

.addGroup(jInternalFrame1Layout.createSequentialGroup()

.addGap(20, 20, 20)

.addComponent(jLabel3)))

.addContainerGap())

);

jInternalFrame1Layout.setVerticalGroup(

jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jInternalFrame1Layout.createSequentialGroup()

.addContainerGap()
.addComponent(jLabel2)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jLabel3)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 22,
Short.MAX_VALUE)

.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap())

);

jMenuBar1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

jMenu1.setText("Options");

jMenu1.setToolTipText("Click for more options");

jMenu1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

Helpcom.setText("Help");

Helpcom.setToolTipText("");

Helpcom.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

Helpcom.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

HelpcomActionPerformed(evt);

});

jMenu1.add(Helpcom);
jMenuItem2.setText("Switch to AlStat.06 Turbo");

jMenuItem2.setToolTipText("Go!");

jMenuItem2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

jMenuItem2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem2ActionPerformed(evt);

});

jMenu1.add(jMenuItem2);

jMenuBar1.add(jMenu1);

setJMenuBar(jMenuBar1);

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()

.addComponent(jInternalFrame1)

.addContainerGap())

);

layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addComponent(jInternalFrame1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap())

);

pack();

}// </editor-fold>//GEN-END:initComponents

private void okActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_okActionPerformed

double sam = 0; double sam1 = 0;

try{

sam = Double.parseDouble(this.insam.getText());

sam1 = Double.parseDouble(this.insam1.getText());

if(sam >= 30 && sam1 >=30){

MainProgB in = new MainProgB();

in.setVisible(true);

else if((sam>=30 && sam1<=30)||(sam<=30 && sam1>=30)){

JOptionPane.showMessageDialog(this, "Please check your sample size again",

"Error", JOptionPane.ERROR_MESSAGE);
}else{

MainCom an = new MainCom();

an.setVisible(true);

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Careful typing, please re-enter your sample size",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

}//GEN-LAST:event_okActionPerformed

private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jMenuItem2ActionPerformed

TurboProg2 al = new TurboProg2();

al.setVisible(true);

}//GEN-LAST:event_jMenuItem2ActionPerformed

private void HelpcomActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_HelpcomActionPerformed

How al = new How();

al.setVisible(true);

}//GEN-LAST:event_HelpcomActionPerformed

/**
* @param args the command line arguments

*/

public static void main(String args[]) {

java.awt.EventQueue.invokeLater(new Runnable() {

public void run() {

new MainComA().setVisible(true);

});

// Variables declaration - do not modify//GEN-BEGIN:variables

private javax.swing.JMenuItem Helpcom;

private javax.swing.JTextField insam;

private javax.swing.JTextField insam1;

private javax.swing.JInternalFrame jInternalFrame1;

private javax.swing.JLabel jLabel2;

private javax.swing.JLabel jLabel3;

private javax.swing.JMenu jMenu1;

private javax.swing.JMenuBar jMenuBar1;

private javax.swing.JMenuItem jMenuItem2;

private javax.swing.JPanel jPanel1;

private javax.swing.JButton ok;

// End of variables declaration//GEN-END:variables

}
Part 3
of the
Program
Class Name: WelcomeProgA.java
/*

* To change this template, choose Tools | Templates

* and open the template in the editor.

*/

/*

* WelcomeProgA.java

* Created on 03 25, 11, 11:29:36 PM

*/

/**

* @author Al-Ahmadgaid B. Asaad

*/

public class WelcomeProgA extends javax.swing.JFrame {

/** Creates new form WelcomeProgA */

public WelcomeProgA() {

initComponents();

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

jInternalFrame1 = new javax.swing.JInternalFrame();

jLabel6 = new javax.swing.JLabel();

unknown = new javax.swing.JButton();

jLabel4 = new javax.swing.JLabel();

known = new javax.swing.JButton();

jLabel5 = new javax.swing.JLabel();

jLabel2 = new javax.swing.JLabel();

jLabel3 = new javax.swing.JLabel();

jLabel1 = new javax.swing.JLabel();

jLabel7 = new javax.swing.JLabel();

jLabel8 = new javax.swing.JLabel();

jLabel9 = new javax.swing.JLabel();

jLabel10 = new javax.swing.JLabel();

jMenuBar1 = new javax.swing.JMenuBar();

jMenu\1 = new javax.swing.JMenu();

jMenuItem1 = new javax.swing.JMenuItem();

about = new javax.swing.JMenuItem();

setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setTitle("AlStat.06");

setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

setResizable(false);

jInternalFrame1.setTitle("Welcome");

jInternalFrame1.setToolTipText("Welcome to Al's program");

jInternalFrame1.setFrameIcon(null);

jInternalFrame1.setVisible(true);

jLabel6.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel6.setText("included on some case.");

unknown.setFont(new java.awt.Font("Century Gothic", 1, 11));

unknown.setText("Unknown Variance");

unknown.setToolTipText("Click to proceed");

unknown.setBorder(new
javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED, new java.awt.Color(255, 0,
102), new java.awt.Color(255, 0, 0), new java.awt.Color(0, 0, 255), new java.awt.Color(0, 0, 255)));

unknown.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

unknownActionPerformed(evt);

});

jLabel4.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel4.setText("Includes second, third and fourth case of");


known.setFont(new java.awt.Font("Century Gothic", 1, 11));

known.setText("Known Variance");

known.setToolTipText("Click to proceed");

known.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED,
new java.awt.Color(255, 0, 102), new java.awt.Color(255, 0, 0), new java.awt.Color(0, 0, 255), new
java.awt.Color(0, 0, 255)));

known.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

knownActionPerformed(evt);

});

jLabel5.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel5.setText("confidence interval. Test statistics is also");

jLabel2.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel2.setText("please specify your variance.");

jLabel3.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel3.setText("First case confidence interval");

jLabel1.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel1.setText("One or Two Population Means Confidence Interval compose of different cases,");

javax.swing.GroupLayout jInternalFrame1Layout = new


javax.swing.GroupLayout(jInternalFrame1.getContentPane());
jInternalFrame1.getContentPane().setLayout(jInternalFrame1Layout);

jInternalFrame1Layout.setHorizontalGroup(

jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jInternalFrame1Layout.createSequentialGroup()

.addContainerGap()

.addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel1)

.addGroup(jInternalFrame1Layout.createSequentialGroup()

.addGap(114, 114, 114)

.addComponent(jLabel2))

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jInternalFrame1Layout.createSequentialGroup()

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 39,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jInternalFrame1Layout.createSequentialGroup()

.addComponent(known, javax.swing.GroupLayout.PREFERRED_SIZE, 120,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addComponent(jLabel3))

.addGroup(jInternalFrame1Layout.createSequentialGroup()

.addComponent(unknown, javax.swing.GroupLayout.PREFERRED_SIZE, 120,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel4)

.addComponent(jLabel5)

.addComponent(jLabel6))))

.addGap(38, 38, 38)))

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);

jInternalFrame1Layout.setVerticalGroup(

jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jInternalFrame1Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jLabel1)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jLabel2)

.addGap(18, 18, 18)

.addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(known, javax.swing.GroupLayout.PREFERRED_SIZE, 24,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel3))

.addGap(18, 18, 18)

.addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jLabel4)

.addComponent(unknown, javax.swing.GroupLayout.PREFERRED_SIZE, 24,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(1, 1, 1)

.addComponent(jLabel5)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jLabel6)

.addContainerGap(23, Short.MAX_VALUE))

);

jLabel7.setFont(new java.awt.Font("Copperplate Gothic Bold", 0, 24));

jLabel7.setForeground(new java.awt.Color(255, 0, 0));

jLabel7.setText("Stat.06");

jLabel7.setToolTipText("AlStat.06");

jLabel8.setFont(new java.awt.Font("Old English Text MT", 0, 36));

jLabel8.setText("A");

jLabel9.setBackground(new java.awt.Color(0, 0, 255));

jLabel9.setFont(new java.awt.Font("Matura MT Script Capitals", 0, 50));

jLabel9.setForeground(new java.awt.Color(51, 51, 255));

jLabel9.setText("Al");

jLabel9.setToolTipText("AlStat.06");

jLabel10.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel10.setText("CONFIDENCE INTERVAL");

jMenuBar1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

jMenu1.setText("Options");
jMenu1.setToolTipText("Click for more options");

jMenu1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

jMenuItem1.setText("Switch to AlStat.06 Turbo");

jMenuItem1.setToolTipText("Go!");

jMenuItem1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

jMenuItem1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem1ActionPerformed(evt);

});

jMenu1.add(jMenuItem1);

about.setText("About");

about.setToolTipText("About the program");

about.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

about.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

aboutActionPerformed(evt);

});

jMenu1.add(about);

jMenuBar1.add(jMenu1);
setJMenuBar(jMenuBar1);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());

getContentPane().setLayout(layout);

layout.setHorizontalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addGap(131, 131, 131)

.addComponent(jLabel8)

.addContainerGap())

.addGroup(layout.createSequentialGroup()

.addContainerGap()

.addComponent(jLabel9)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jLabel7)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 137,
Short.MAX_VALUE)

.addComponent(jLabel10)

.addGap(25, 25, 25))

.addGroup(layout.createSequentialGroup()

.addContainerGap()

.addComponent(jInternalFrame1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);

layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 48,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 20,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel10))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 0,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addComponent(jInternalFrame1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap())

);

jInternalFrame1.getAccessibleContext().setAccessibleDescription("Welcome to AlStat.06");

pack();

}// </editor-fold>//GEN-END:initComponents

private void unknownActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_unknownActionPerformed

MainComA a = new MainComA();

a.setVisible(true);

}//GEN-LAST:event_unknownActionPerformed
private void knownActionPerformed(java.awt.event.ActionEvent evt) {//GEN-
FIRST:event_knownActionPerformed

MainProgC b = new MainProgC();

b.setVisible(true);

}//GEN-LAST:event_knownActionPerformed

private void aboutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_aboutActionPerformed

WelAbout al = new WelAbout();

al.setVisible(true);

}//GEN-LAST:event_aboutActionPerformed

private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jMenuItem1ActionPerformed

TurboProg2 al = new TurboProg2();

al.setVisible(true);

}//GEN-LAST:event_jMenuItem1ActionPerformed

/**

* @param args the command line arguments

*/

public static void main(String args[]) {

java.awt.EventQueue.invokeLater(new Runnable() {

public void run() {

new WelcomeProgA().setVisible(true);

}
});

// Variables declaration - do not modify//GEN-BEGIN:variables

private javax.swing.JMenuItem about;

private javax.swing.JInternalFrame jInternalFrame1;

private javax.swing.JLabel jLabel1;

private javax.swing.JLabel jLabel10;

private javax.swing.JLabel jLabel2;

private javax.swing.JLabel jLabel3;

private javax.swing.JLabel jLabel4;

private javax.swing.JLabel jLabel5;

private javax.swing.JLabel jLabel6;

private javax.swing.JLabel jLabel7;

private javax.swing.JLabel jLabel8;

private javax.swing.JLabel jLabel9;

private javax.swing.JMenu jMenu1;

private javax.swing.JMenuBar jMenuBar1;

private javax.swing.JMenuItem jMenuItem1;

private javax.swing.JButton known;

private javax.swing.JButton unknown;

// End of variables declaration//GEN-END:variables

}
Part 4
of the
Program
Class Name: WelAbout.java
/*

* To change this template, choose Tools | Templates

* and open the template in the editor.

*/

/*

* WelAbout.java

* Created on 03 27, 11, 8:46:05 PM

*/

/**

* @author Al-Ahmadgaid B. Asaad

*/

public class WelAbout extends javax.swing.JFrame {

/** Creates new form WelAbout */

public WelAbout() {

initComponents();

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

jComboBox1 = new javax.swing.JComboBox();

jInternalFrame1 = new javax.swing.JInternalFrame();

jLabel1 = new javax.swing.JLabel();

jLabel2 = new javax.swing.JLabel();

jLabel3 = new javax.swing.JLabel();

jLabel4 = new javax.swing.JLabel();

jLabel5 = new javax.swing.JLabel();

jLabel15 = new javax.swing.JLabel();

jLabel14 = new javax.swing.JLabel();

jLabel18 = new javax.swing.JLabel();

jLabel6 = new javax.swing.JLabel();

jLabel7 = new javax.swing.JLabel();

jLabel8 = new javax.swing.JLabel();

jLabel9 = new javax.swing.JLabel();

jLabel10 = new javax.swing.JLabel();

jLabel11 = new javax.swing.JLabel();

jLabel12 = new javax.swing.JLabel();

jLabel13 = new javax.swing.JLabel();

jLabel16 = new javax.swing.JLabel();


jLabel17 = new javax.swing.JLabel();

jLabel19 = new javax.swing.JLabel();

jLabel20 = new javax.swing.JLabel();

jLabel21 = new javax.swing.JLabel();

jLabel22 = new javax.swing.JLabel();

jLabel23 = new javax.swing.JLabel();

jLabel24 = new javax.swing.JLabel();

jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2",


"Item 3", "Item 4" }));

setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

setTitle("About");

setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

setResizable(false);

jInternalFrame1.setToolTipText("About the program");

jInternalFrame1.setFrameIcon(null);

jInternalFrame1.setVisible(true);

jLabel1.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N

jLabel1.setText("Software use for Programming :");

jLabel2.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N

jLabel2.setText("Java Compiler :");


jLabel3.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N

jLabel3.setText("Program Size :");

jLabel4.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N

jLabel4.setText("NetBeans IDE 7.0 Beta 2");

jLabel5.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N

jLabel5.setText("jdk1.6.0_06");

jLabel15.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N

jLabel15.setText("2010-2011 Second Semester");

jLabel14.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N

jLabel14.setText("Math 108 (Java Programming) Final Project");

jLabel18.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N

jLabel18.setText("Instructor : ");

jLabel6.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N

jLabel6.setText("is a program that computes confidence interval");

jLabel7.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N

jLabel7.setText("of one and two population means. Test statistics is also");

jLabel8.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N


jLabel8.setText("included on some cases.");

jLabel9.setFont(new java.awt.Font("Century Gothic", 1, 11)); // NOI18N

jLabel9.setText("INFORMATION");

jLabel10.setFont(new java.awt.Font("Century Gothic", 1, 11)); // NOI18N

jLabel10.setText("ALStat.06");

jLabel11.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N

jLabel11.setText("Author :");

jLabel12.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N

jLabel12.setText("Asaad, Al-Ahmadgaid B.");

jLabel13.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N

jLabel13.setText(" Liwanag, John Alfred Manalo");

jLabel16.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N

jLabel16.setText("More information about this program or help and");

jLabel17.setFont(new java.awt.Font("Century Gothic", 2, 11)); // NOI18N

jLabel17.setText("http://www.gaidasaad.co.cc");

jLabel19.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N

jLabel19.setText("codes");
jLabel20.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N

jLabel20.setText("of this program is also available there.");

jLabel21.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N

jLabel21.setText("suggestions visit");

jLabel22.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N

jLabel22.setText("290,640 bytes");

jLabel23.setBackground(new java.awt.Color(0, 0, 255));

jLabel23.setFont(new java.awt.Font("Matura MT Script Capitals", 0, 50)); // NOI18N

jLabel23.setForeground(new java.awt.Color(51, 51, 255));

jLabel23.setText("Al");

jLabel23.setToolTipText("AlStat.06");

jLabel24.setFont(new java.awt.Font("Copperplate Gothic Bold", 0, 24)); // NOI18N

jLabel24.setForeground(new java.awt.Color(255, 0, 0));

jLabel24.setText("Stat.06");

jLabel24.setToolTipText("AlStat.06");

javax.swing.GroupLayout jInternalFrame1Layout = new


javax.swing.GroupLayout(jInternalFrame1.getContentPane());

jInternalFrame1.getContentPane().setLayout(jInternalFrame1Layout);

jInternalFrame1Layout.setHorizontalGroup(

jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jInternalFrame1Layout.createSequentialGroup()

.addGap(63, 63, 63)

.addComponent(jLabel23)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jLabel24)

.addGap(83, 83, 83))

.addGroup(jInternalFrame1Layout.createSequentialGroup()

.addContainerGap()

.addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addGroup(javax.swing.GroupLayout.Alignment.LEADING,
jInternalFrame1Layout.createSequentialGroup()

.addComponent(jLabel21, javax.swing.GroupLayout.PREFERRED_SIZE, 85,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jLabel17)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jLabel19))

.addComponent(jLabel20, javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel15, javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel14, javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel16, javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel7, javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel8, javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel9, javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jInternalFrame1Layout.createSequentialGroup()

.addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jLabel3, javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel2, javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel18, javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel11, javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 64,
Short.MAX_VALUE)

.addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jLabel13)

.addComponent(jLabel12)

.addComponent(jLabel5)

.addComponent(jLabel22)))

.addGroup(javax.swing.GroupLayout.Alignment.LEADING,
jInternalFrame1Layout.createSequentialGroup()

.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 168,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 21,
Short.MAX_VALUE)

.addComponent(jLabel4))

.addGroup(javax.swing.GroupLayout.Alignment.LEADING,
jInternalFrame1Layout.createSequentialGroup()

.addComponent(jLabel10)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jLabel6)))
.addContainerGap())

);

jInternalFrame1Layout.setVerticalGroup(

jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jInternalFrame1Layout.createSequentialGroup()

.addContainerGap()

.addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jLabel23, javax.swing.GroupLayout.PREFERRED_SIZE, 48,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel24, javax.swing.GroupLayout.PREFERRED_SIZE, 20,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jInternalFrame1Layout.createSequentialGroup()

.addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jLabel10)

.addComponent(jLabel6))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jLabel7)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jLabel8)

.addGap(23, 23, 23)

.addComponent(jLabel9)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jLabel1)

.addComponent(jLabel4))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jLabel2)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jLabel3)

.addGap(33, 33, 33)

.addComponent(jLabel14)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jInternalFrame1Layout.createSequentialGroup()

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 122,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel5)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jLabel22)

.addGap(54, 54, 54)))

.addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jLabel18)

.addComponent(jLabel13))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jLabel11)
.addComponent(jLabel12))

.addGap(32, 32, 32)

.addComponent(jLabel16)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jLabel21)

.addComponent(jLabel17, javax.swing.GroupLayout.PREFERRED_SIZE, 15,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel19, javax.swing.GroupLayout.PREFERRED_SIZE, 15,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jLabel20)

.addGap(29, 29, 29)

.addComponent(jLabel15)

.addContainerGap(23, Short.MAX_VALUE))

);

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()

.addComponent(jInternalFrame1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);

layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addComponent(jInternalFrame1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap())

);

pack();

}// </editor-fold>//GEN-END:initComponents

/**

* @param args the command line arguments

*/

public static void main(String args[]) {

java.awt.EventQueue.invokeLater(new Runnable() {

public void run() {

new WelAbout().setVisible(true);

});

// Variables declaration - do not modify//GEN-BEGIN:variables

private javax.swing.JComboBox jComboBox1;

private javax.swing.JInternalFrame jInternalFrame1;

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 jLabel24;

private javax.swing.JLabel jLabel3;

private javax.swing.JLabel jLabel4;

private javax.swing.JLabel jLabel5;

private javax.swing.JLabel jLabel6;

private javax.swing.JLabel jLabel7;

private javax.swing.JLabel jLabel8;

private javax.swing.JLabel jLabel9;

// End of variables declaration//GEN-END:variables

}
Part 5
of the
Program
Class Name: WhatTurbo.java
/*

* To change this template, choose Tools | Templates

* and open the template in the editor.

*/

/*

* WhatTurbo.java

* Created on 03 27, 11, 10:52:00 PM

*/

/**

* @author Al-Ahmadgaid B. Asaad

*/

public class WhatTurbo extends javax.swing.JFrame {

/** Creates new form WhatTurbo */

public WhatTurbo() {

initComponents();

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

jInternalFrame1 = new javax.swing.JInternalFrame();

jLabel2 = new javax.swing.JLabel();

jLabel1 = new javax.swing.JLabel();

jLabel3 = new javax.swing.JLabel();

setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

setTitle("What is AlStat.06 Turbo");

setResizable(false);

jInternalFrame1.setToolTipText("What is AlStat.06 Turbo");

jInternalFrame1.setFrameIcon(null);

jInternalFrame1.setVisible(true);

jLabel2.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N

jLabel2.setText("AlStat.06 Turbo is an advance setting which allows users use");

jLabel1.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N

jLabel1.setText("single window that’s able to solve different cases excluding");


jLabel3.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N

jLabel3.setText("the known variance.");

javax.swing.GroupLayout jInternalFrame1Layout = new


javax.swing.GroupLayout(jInternalFrame1.getContentPane());

jInternalFrame1.getContentPane().setLayout(jInternalFrame1Layout);

jInternalFrame1Layout.setHorizontalGroup(

jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jInternalFrame1Layout.createSequentialGroup()

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel2)

.addComponent(jLabel1)

.addComponent(jLabel3))

.addContainerGap())

);

jInternalFrame1Layout.setVerticalGroup(

jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jInternalFrame1Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jLabel2)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jLabel1)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jLabel3)
.addContainerGap(15, Short.MAX_VALUE))

);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());

getContentPane().setLayout(layout);

layout.setHorizontalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addComponent(jInternalFrame1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap())

);

layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()

.addContainerGap()

.addComponent(jInternalFrame1)

.addContainerGap())

);

pack();

}// </editor-fold>//GEN-END:initComponents

/**

* @param args the command line arguments


*/

public static void main(String args[]) {

java.awt.EventQueue.invokeLater(new Runnable() {

public void run() {

new WhatTurbo().setVisible(true);

});

// Variables declaration - do not modify//GEN-BEGIN:variables

private javax.swing.JInternalFrame jInternalFrame1;

private javax.swing.JLabel jLabel1;

private javax.swing.JLabel jLabel2;

private javax.swing.JLabel jLabel3;

// End of variables declaration//GEN-END:variables

}
Part 6
of the
Program
Class Name: MainProgE.java
import javax.swing.JOptionPane;

/*

* To change this template, choose Tools | Templates

* and open the template in the editor.

*/

/*

* MainProgE.java

* Created on 03 25, 11, 11:21:00 PM

*/

/**

* @author Al-Ahmadgaid B. Asaad

*/

public class MainProgE extends javax.swing.JFrame {

/** Creates new form MainProgE */

public MainProgE() {

initComponents();

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

jInternalFrame1 = new javax.swing.JInternalFrame();

jPanel2 = new javax.swing.JPanel();

jLabel4 = new javax.swing.JLabel();

invar = new javax.swing.JTextField();

invar1 = new javax.swing.JTextField();

jLabel3 = new javax.swing.JLabel();

jLabel2 = new javax.swing.JLabel();

inmea = new javax.swing.JTextField();

inmea1 = new javax.swing.JTextField();

jLabel1 = new javax.swing.JLabel();

insam = new javax.swing.JTextField();

insam1 = new javax.swing.JTextField();

jLabel5 = new javax.swing.JLabel();

jLabel12 = new javax.swing.JLabel();

jPanel1 = new javax.swing.JPanel();

tsided = new javax.swing.JButton();

jLabel6 = new javax.swing.JLabel();


incon = new javax.swing.JTextField();

inout3 = new javax.swing.JTextField();

inout4 = new javax.swing.JTextField();

jInternalFrame2 = new javax.swing.JInternalFrame();

jPanel5 = new javax.swing.JPanel();

jLabel14 = new javax.swing.JLabel();

inoutt = new javax.swing.JTextField();

jLabel15 = new javax.swing.JLabel();

outtput = new javax.swing.JTextField();

jButton3 = new javax.swing.JButton();

jLabel20 = new javax.swing.JLabel();

jPanel3 = new javax.swing.JPanel();

indeg = new javax.swing.JTextField();

degfree = new javax.swing.JButton();

Clear = new javax.swing.JButton();

jMenuBar1 = new javax.swing.JMenuBar();

jMenu1 = new javax.swing.JMenu();

menuKv = new javax.swing.JMenuItem();

menuSs = new javax.swing.JMenuItem();

menuEv = new javax.swing.JMenuItem();

jSeparator1 = new javax.swing.JPopupMenu.Separator();

jMenuItem4 = new javax.swing.JMenuItem();

jMenuItem5 = new javax.swing.JMenuItem();

setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setTitle("Confidence Interval of Unknown Unequal Variance (n<30)");

setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

setResizable(false);

jInternalFrame1.setTitle("Confidence Interval");

jInternalFrame1.setToolTipText("Confidence Interval of two population means");

jInternalFrame1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

jInternalFrame1.setFrameIcon(null);

jInternalFrame1.setVisible(true);

jLabel4.setText("Col A");

jLabel3.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel3.setText("Std Deviation");

jLabel2.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel2.setText("Sam Mean");

jLabel1.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel1.setText("Sam Size");

jLabel5.setText("Col B");

jLabel12.setFont(new java.awt.Font("Papyrus", 1, 12));

jLabel12.setText("Given:");
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.TRAILING)

.addComponent(jLabel2)

.addComponent(jLabel3)

.addComponent(jLabel1))

.addGap(18, 18, 18)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(invar, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(inmea, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(insam, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(inmea1, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(insam1, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(invar1, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addContainerGap())
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel2Layout.createSequentialGroup()

.addContainerGap(153, Short.MAX_VALUE)

.addComponent(jLabel4)

.addGap(116, 116, 116)

.addComponent(jLabel5)

.addGap(89, 89, 89))

.addGroup(jPanel2Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jLabel12)

.addContainerGap(356, Short.MAX_VALUE))

);

jPanel2Layout.setVerticalGroup(

jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel2Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jLabel12)

.addGap(12, 12, 12)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jLabel4)

.addComponent(jLabel5))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(insam, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(insam1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel1))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(inmea, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(inmea1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel2))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(invar, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(invar1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel3))

.addContainerGap())

);

tsided.setFont(new java.awt.Font("Century Gothic", 1, 11));

tsided.setText("2 sided");

tsided.setToolTipText("Solve for M1-M2 Confidence Interval");

tsided.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED,
new java.awt.Color(255, 0, 102), new java.awt.Color(255, 0, 0), new java.awt.Color(0, 0, 255), new
java.awt.Color(0, 0, 255)));

tsided.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

tsidedActionPerformed(evt);
}

});

jLabel6.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel6.setText("Conf Interval");

inout3.setBackground(new java.awt.Color(255, 255, 51));

inout3.setEditable(false);

inout4.setBackground(new java.awt.Color(255, 255, 51));

inout4.setEditable(false);

javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);

jPanel1.setLayout(jPanel1Layout);

jPanel1Layout.setHorizontalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel1Layout.createSequentialGroup()

.addContainerGap()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jLabel6)

.addComponent(tsided, javax.swing.GroupLayout.PREFERRED_SIZE, 70,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(18, 18, 18)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(inout3, javax.swing.GroupLayout.PREFERRED_SIZE, 135,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(inout4, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addComponent(incon, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(41, 41, 41))

);

jPanel1Layout.setVerticalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addContainerGap()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jLabel6)

.addComponent(incon, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(tsided, javax.swing.GroupLayout.PREFERRED_SIZE, 24,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(inout3, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(inout4, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);
jInternalFrame2.setTitle("Test Statistics");

jInternalFrame2.setToolTipText("Test Statistics of t-Test of two population means");

jInternalFrame2.setFrameIcon(null);

jInternalFrame2.setVisible(true);

jLabel14.setFont(new java.awt.Font("Papyrus", 1, 12)); // NOI18N

jLabel14.setText("t-Test of two Population Means");

jLabel15.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel15.setText("H0 and H1 Mean(d)");

outtput.setBackground(new java.awt.Color(255, 255, 51));

outtput.setEditable(false);

outtput.setCaretColor(new java.awt.Color(255, 204, 51));

outtput.setDisabledTextColor(new java.awt.Color(204, 255, 102));

jButton3.setFont(new java.awt.Font("Century Gothic", 1, 11));

jButton3.setText("t-Test value");

jButton3.setToolTipText("Solve for t-test value of two population mean");

jButton3.setBorder(new
javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED, new java.awt.Color(255, 0,
102), new java.awt.Color(255, 0, 0), new java.awt.Color(0, 0, 255), new java.awt.Color(0, 0, 255)));

jButton3.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton3ActionPerformed(evt);

}
});

jLabel20.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel20.setText("Given from Col A and Col B");

javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);

jPanel5.setLayout(jPanel5Layout);

jPanel5Layout.setHorizontalGroup(

jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel5Layout.createSequentialGroup()

.addContainerGap()

.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel5Layout.createSequentialGroup()

.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 70,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel15))

.addGap(21, 21, 21)

.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)

.addComponent(outtput)

.addComponent(inoutt, javax.swing.GroupLayout.DEFAULT_SIZE, 142,


Short.MAX_VALUE)))

.addComponent(jLabel20)

.addComponent(jLabel14))

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);

jPanel5Layout.setVerticalGroup(

jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel5Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jLabel14)

.addGap(15, 15, 15)

.addComponent(jLabel20)

.addGap(38, 38, 38)

.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(inoutt, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel15))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 24,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(outtput, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))

.addContainerGap(27, Short.MAX_VALUE))

);

javax.swing.GroupLayout jInternalFrame2Layout = new


javax.swing.GroupLayout(jInternalFrame2.getContentPane());

jInternalFrame2.getContentPane().setLayout(jInternalFrame2Layout);

jInternalFrame2Layout.setHorizontalGroup(

jInternalFrame2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jInternalFrame2Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(115, Short.MAX_VALUE))

);

jInternalFrame2Layout.setVerticalGroup(

jInternalFrame2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jInternalFrame2Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(31, Short.MAX_VALUE))

);

indeg.setBackground(new java.awt.Color(255, 255, 51));

indeg.setEditable(false);

degfree.setFont(new java.awt.Font("Century Gothic", 1, 11));

degfree.setText("Deg Freedom");

degfree.setToolTipText("Solve for degrees of freedom");

degfree.setBorder(new
javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED, new java.awt.Color(255, 0,
102), new java.awt.Color(255, 0, 0), new java.awt.Color(0, 0, 255), new java.awt.Color(0, 0, 255)));

degfree.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

degfreeActionPerformed(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()

.addGap(22, 22, 22)

.addComponent(degfree, javax.swing.GroupLayout.PREFERRED_SIZE, 80,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addComponent(indeg, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(41, Short.MAX_VALUE))

);

jPanel3Layout.setVerticalGroup(

jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel3Layout.createSequentialGroup()

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(degfree, javax.swing.GroupLayout.PREFERRED_SIZE, 24,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(indeg, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))

.addContainerGap())
);

Clear.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N

Clear.setText("Clear");

Clear.setToolTipText("Clear all text field");

Clear.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED,
new java.awt.Color(255, 0, 102), new java.awt.Color(255, 0, 0), new java.awt.Color(0, 0, 255), new
java.awt.Color(0, 0, 255)));

Clear.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

ClearActionPerformed(evt);

});

javax.swing.GroupLayout jInternalFrame1Layout = new


javax.swing.GroupLayout(jInternalFrame1.getContentPane());

jInternalFrame1.getContentPane().setLayout(jInternalFrame1Layout);

jInternalFrame1Layout.setHorizontalGroup(

jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jInternalFrame1Layout.createSequentialGroup()

.addGap(28, 28, 28)

.addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 397,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(16, 16, 16))


.addGroup(jInternalFrame1Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(147, Short.MAX_VALUE))

.addGroup(jInternalFrame1Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jInternalFrame2)

.addContainerGap())

.addGroup(jInternalFrame1Layout.createSequentialGroup()

.addGap(39, 39, 39)

.addComponent(Clear, javax.swing.GroupLayout.PREFERRED_SIZE, 68,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(346, Short.MAX_VALUE))

);

jInternalFrame1Layout.setVerticalGroup(

jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jInternalFrame1Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jInternalFrame2, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(Clear, javax.swing.GroupLayout.PREFERRED_SIZE, 43,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(23, Short.MAX_VALUE))

);

jMenuBar1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

jMenu1.setText("Options");

jMenu1.setToolTipText("Click for more options");

jMenu1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

menuKv.setText("Known Variance");

menuKv.setToolTipText("Case 1");

menuKv.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

menuKv.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

menuKvActionPerformed(evt);

});

jMenu1.add(menuKv);

menuSs.setText("Sample Size >= 30");


menuSs.setToolTipText("Case 2");

menuSs.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

menuSs.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

menuSsActionPerformed(evt);

});

jMenu1.add(menuSs);

menuEv.setText("Equal Variance");

menuEv.setToolTipText("Case 3");

menuEv.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

menuEv.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

menuEvActionPerformed(evt);

});

jMenu1.add(menuEv);

jMenu1.add(jSeparator1);

jMenuItem4.setText("Switch to AlStat.06 Turbo");

jMenuItem4.setToolTipText("Go!");

jMenuItem4.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

jMenuItem4.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {


jMenuItem4ActionPerformed(evt);

});

jMenu1.add(jMenuItem4);

jMenuItem5.setText("About");

jMenuItem5.setToolTipText("About the program");

jMenuItem5.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

jMenuItem5.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem5ActionPerformed(evt);

});

jMenu1.add(jMenuItem5);

jMenuBar1.add(jMenu1);

setJMenuBar(jMenuBar1);

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()
.addComponent(jInternalFrame1)

.addContainerGap())

);

layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addComponent(jInternalFrame1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap())

);

pack();

}// </editor-fold>//GEN-END:initComponents

private void tsidedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_tsidedActionPerformed

double sam = 0; double sam1 = 0; double mea;

double mea1; double var; double var1;

double con;

try{

sam = Double.parseDouble(

this.insam.getText());

if(sam>29){

JOptionPane.showMessageDialog(this, "The Sample Size of Col A must be less than 30",


"Invalid Input", JOptionPane.ERROR_MESSAGE);

}else{

sam = Double.parseDouble(

this.insam.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Size of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

sam1 = Double.parseDouble(

this.insam1.getText());

if(sam1>29){

JOptionPane.showMessageDialog(this, "The Sample Size of Col B must be less than 30",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

}else{

sam1 = Double.parseDouble(

this.insam1.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Size of Col B",


"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

mea = Double.parseDouble(

this.inmea.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

mea1 = Double.parseDouble(

this.inmea1.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col B",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

var = Double.parseDouble(

this.invar.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Standard Deviation of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);


return;

try{

var1 = Double.parseDouble(

this.invar1.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Standard Deviation of Col B",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

con = Double.parseDouble(

this.incon.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Confidence Interval",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

}if(sam>29){

this.inout3.setText("");

this.inout4.setText("");

}else if(sam1>29){

this.inout3.setText("");

this.inout4.setText("");

}else if((sam>29)&&(sam1>29)){

this.inout3.setText("");
this.inout4.setText("");

}else{

double out3 = (mea-mea1)-con*Math.sqrt((Math.pow(var,2)/sam)+(Math.pow(var1,2)/sam1));

this.inout3.setText(" "+out3);

double out4 = (mea-mea1)+con*Math.sqrt((Math.pow(var,2)/sam)+(Math.pow(var1,2)/sam1));

this.inout4.setText(" "+out4);

}//GEN-LAST:event_tsidedActionPerformed

private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jButton3ActionPerformed

double sam; double sam1; double mea;

double mea1; double var; double var1;

double con; double outt;

try{

sam = Double.parseDouble(

this.insam.getText());

if(sam>29){

JOptionPane.showMessageDialog(this, "The Sample Size of Col A must be less than 30",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

}else{

sam = Double.parseDouble(

this.insam.getText());
}

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Size of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

sam1 = Double.parseDouble(

this.insam1.getText());

if(sam1>29){

JOptionPane.showMessageDialog(this, "The Sample Size of Col B must be less than 30",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

}else{

sam1 = Double.parseDouble(

this.insam1.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Size of Col B",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{
mea = Double.parseDouble(

this.inmea.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

mea1 = Double.parseDouble(

this.inmea1.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col B",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

var = Double.parseDouble(

this.invar.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Standard Deviation of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

var1 = Double.parseDouble(
this.invar1.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Standard Deviation of Col B",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

outt = Double.parseDouble(

this.inoutt.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter H0 and H1 Mean(d)",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

}if(sam>29){

this.outtput.setText("");

}else if(sam1>29){

this.outtput.setText("");

}else if((sam>29) && (sam1>29)){

this.outtput.setText("");

}else{

double outputt = ((mea-mea1)-outt)/Math.sqrt((Math.pow(var,2)/sam)+(Math.pow(var1,2)/sam1));

this.outtput.setText(" "+outputt);

}//GEN-LAST:event_jButton3ActionPerformed
private void degfreeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-
FIRST:event_degfreeActionPerformed

double sam = 0; double sam1 = 0; double mea;

double mea1; double var; double var1;

double con;

try{

sam = Double.parseDouble(

this.insam.getText());

if(sam>29){

JOptionPane.showMessageDialog(this, "The Sample Size of Col A must be less than 30",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

}else{

sam = Double.parseDouble(

this.insam.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Size of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

sam1 = Double.parseDouble(

this.insam1.getText());
if(sam1>29){

JOptionPane.showMessageDialog(this, "The Sample Size of Col B must be less than 30",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

}else{

sam1 = Double.parseDouble(

this.insam1.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Size of Col B",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

mea = Double.parseDouble(

this.inmea.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

mea1 = Double.parseDouble(

this.inmea1.getText());

} catch(Exception e){
JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col B",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

var = Double.parseDouble(

this.invar.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Standard Deviation of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

var1 = Double.parseDouble(

this.invar1.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Standard Deviation of Col B",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

if(sam>29){

this.indeg.setText("");

}else{
double deg =
(Math.pow(((Math.pow(var,2)/sam)+(Math.pow(var1,2)/sam1)),2))/(Math.pow((Math.pow(var,2)/sam),
2)/(sam-1))+

(Math.pow((Math.pow(var1,2)/sam1),2)/(sam1-1));

this.indeg.setText(" "+deg);

}//GEN-LAST:event_degfreeActionPerformed

private void ClearActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_ClearActionPerformed

this.insam.setText("");

this.insam1.setText("");

this.invar.setText("");

this.invar1.setText("");

this.inmea.setText("");

this.inmea1.setText("");

this.incon.setText("");

this.inout3.setText("");

this.inout4.setText("");

this.indeg.setText("");

this.inoutt.setText("");

this.outtput.setText("");

}//GEN-LAST:event_ClearActionPerformed

private void menuKvActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_menuKvActionPerformed

MainProgC al = new MainProgC();


al.setVisible(true);

}//GEN-LAST:event_menuKvActionPerformed

private void menuSsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_menuSsActionPerformed

MainProgB al = new MainProgB();

al.setVisible(true);

}//GEN-LAST:event_menuSsActionPerformed

private void menuEvActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_menuEvActionPerformed

MainProgD al = new MainProgD();

al.setVisible(true);

}//GEN-LAST:event_menuEvActionPerformed

private void jMenuItem4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jMenuItem4ActionPerformed

TurboProg2 al = new TurboProg2();

al.setVisible(true);

}//GEN-LAST:event_jMenuItem4ActionPerformed

private void jMenuItem5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jMenuItem5ActionPerformed

WelAbout al = new WelAbout();

al.setVisible(true);

}//GEN-LAST:event_jMenuItem5ActionPerformed
/**

* @param args the command line arguments

*/

public static void main(String args[]) {

java.awt.EventQueue.invokeLater(new Runnable() {

public void run() {

new MainProgE().setVisible(true);

});

// Variables declaration - do not modify//GEN-BEGIN:variables

private javax.swing.JButton Clear;

private javax.swing.JButton degfree;

private javax.swing.JTextField incon;

private javax.swing.JTextField indeg;

private javax.swing.JTextField inmea;

private javax.swing.JTextField inmea1;

private javax.swing.JTextField inout3;

private javax.swing.JTextField inout4;

private javax.swing.JTextField inoutt;

private javax.swing.JTextField insam;

private javax.swing.JTextField insam1;

private javax.swing.JTextField invar;

private javax.swing.JTextField invar1;


private javax.swing.JButton jButton3;

private javax.swing.JInternalFrame jInternalFrame1;

private javax.swing.JInternalFrame jInternalFrame2;

private javax.swing.JLabel jLabel1;

private javax.swing.JLabel jLabel12;

private javax.swing.JLabel jLabel14;

private javax.swing.JLabel jLabel15;

private javax.swing.JLabel jLabel2;

private javax.swing.JLabel jLabel20;

private javax.swing.JLabel jLabel3;

private javax.swing.JLabel jLabel4;

private javax.swing.JLabel jLabel5;

private javax.swing.JLabel jLabel6;

private javax.swing.JMenu jMenu1;

private javax.swing.JMenuBar jMenuBar1;

private javax.swing.JMenuItem jMenuItem4;

private javax.swing.JMenuItem jMenuItem5;

private javax.swing.JPanel jPanel1;

private javax.swing.JPanel jPanel2;

private javax.swing.JPanel jPanel3;

private javax.swing.JPanel jPanel5;

private javax.swing.JPopupMenu.Separator jSeparator1;

private javax.swing.JMenuItem menuEv;

private javax.swing.JMenuItem menuKv;

private javax.swing.JMenuItem menuSs;


private javax.swing.JTextField outtput;

private javax.swing.JButton tsided;

// End of variables declaration//GEN-END:variables

}
Part 7
of the
Program
Class Name: MainProgC.java
import javax.swing.JOptionPane;

/*

* To change this template, choose Tools | Templates

* and open the template in the editor.

*/

/*

* MainProgC.java

* Created on 03 25, 11, 10:56:17 PM

*/

/**

* @author Al-Ahmadgaid B. Asaad

*/

public class MainProgC extends javax.swing.JFrame {

/** Creates new form MainProgC */

public MainProgC() {

initComponents();

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

jInternalFrame1 = new javax.swing.JInternalFrame();

jPanel2 = new javax.swing.JPanel();

jLabel4 = new javax.swing.JLabel();

invar = new javax.swing.JTextField();

invar1 = new javax.swing.JTextField();

jLabel3 = new javax.swing.JLabel();

jLabel2 = new javax.swing.JLabel();

inmea = new javax.swing.JTextField();

inmea1 = new javax.swing.JTextField();

jLabel1 = new javax.swing.JLabel();

insam = new javax.swing.JTextField();

insam1 = new javax.swing.JTextField();

jLabel5 = new javax.swing.JLabel();

jLabel12 = new javax.swing.JLabel();

jPanel1 = new javax.swing.JPanel();

tsided = new javax.swing.JButton();

jLabel6 = new javax.swing.JLabel();


incon = new javax.swing.JTextField();

inout3 = new javax.swing.JTextField();

inout4 = new javax.swing.JTextField();

jPanel4 = new javax.swing.JPanel();

jButton2 = new javax.swing.JButton();

inoout = new javax.swing.JTextField();

inoout1 = new javax.swing.JTextField();

jLabel13 = new javax.swing.JLabel();

Clear = new javax.swing.JButton();

jMenuBar1 = new javax.swing.JMenuBar();

jMenu1 = new javax.swing.JMenu();

menusam = new javax.swing.JMenuItem();

menuEv = new javax.swing.JMenuItem();

menuUv = new javax.swing.JMenuItem();

jSeparator1 = new javax.swing.JPopupMenu.Separator();

jMenuItem1 = new javax.swing.JMenuItem();

jMenuItem5 = new javax.swing.JMenuItem();

setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

setTitle("Confidence Interval of Known Variance");

setResizable(false);

jInternalFrame1.setTitle("Confidence Interval");

jInternalFrame1.setToolTipText("Confidence Interval of one and two population means");

jInternalFrame1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
jInternalFrame1.setFrameIcon(null);

jInternalFrame1.setVisible(true);

jLabel4.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel4.setText("Col A");

jLabel3.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel3.setText("Variance");

jLabel2.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel2.setText("Sam Mean");

jLabel1.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel1.setText("Sam Size");

jLabel5.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel5.setText("Col B");

jLabel12.setFont(new java.awt.Font("Papyrus", 1, 12));

jLabel12.setText("Given:");

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.TRAILING)

.addGroup(jPanel2Layout.createSequentialGroup()

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addGroup(jPanel2Layout.createSequentialGroup()

.addComponent(jLabel12)

.addGap(44, 44, 44))

.addGroup(jPanel2Layout.createSequentialGroup()

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jLabel2)

.addComponent(jLabel1)

.addComponent(jLabel3))

.addGap(18, 18, 18)))

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(invar, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(insam, javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(inmea, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)

.addComponent(invar1, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(inmea1, javax.swing.GroupLayout.PREFERRED_SIZE, 135,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(insam1, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE)))

.addGroup(jPanel2Layout.createSequentialGroup()

.addComponent(jLabel4)

.addGap(113, 113, 113)

.addComponent(jLabel5)

.addGap(54, 54, 54)))

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);

jPanel2Layout.setVerticalGroup(

jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel2Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jLabel12)

.addGap(12, 12, 12)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jLabel4)

.addComponent(jLabel5))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(insam1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(insam, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel1))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(inmea1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(inmea, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel2))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(invar1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(invar, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel3))

.addContainerGap())

);

tsided.setFont(new java.awt.Font("Century Gothic", 1, 11)); // NOI18N

tsided.setText("2 sided");

tsided.setToolTipText("Solve for M1-M2 Confidence Interval");

tsided.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED,
new java.awt.Color(255, 0, 102), new java.awt.Color(255, 0, 0), new java.awt.Color(0, 0, 255), new
java.awt.Color(0, 0, 255)));

tsided.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

tsidedActionPerformed(evt);

}
});

jLabel6.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel6.setText("Conf Interval");

inout3.setBackground(new java.awt.Color(255, 255, 51));

inout3.setEditable(false);

inout4.setBackground(new java.awt.Color(255, 255, 51));

inout4.setEditable(false);

javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);

jPanel1.setLayout(jPanel1Layout);

jPanel1Layout.setHorizontalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(15, 15, 15)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jLabel6)

.addComponent(tsided, javax.swing.GroupLayout.PREFERRED_SIZE, 70,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(18, 18, 18)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(inout3, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(incon, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(inout4, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap())

);

jPanel1Layout.setVerticalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel1Layout.createSequentialGroup()

.addContainerGap()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(incon, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel6))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(inout3, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(inout4, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(tsided, javax.swing.GroupLayout.PREFERRED_SIZE, 24,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addContainerGap())

);

jButton2.setFont(new java.awt.Font("Century Gothic", 1, 11)); // NOI18N

jButton2.setText("1 sided");
jButton2.setToolTipText("Solve for M1 Confidence Interval");

jButton2.setBorder(new
javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED, new java.awt.Color(255, 0,
102), new java.awt.Color(255, 0, 0), new java.awt.Color(0, 0, 255), new java.awt.Color(0, 0, 255)));

jButton2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton2ActionPerformed(evt);

});

inoout.setBackground(new java.awt.Color(255, 255, 51));

inoout.setEditable(false);

inoout1.setBackground(new java.awt.Color(255, 255, 51));

inoout1.setEditable(false);

jLabel13.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel13.setText("One Sided (Enter given in Col A)");

javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);

jPanel4.setLayout(jPanel4Layout);

jPanel4Layout.setHorizontalGroup(

jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel4Layout.createSequentialGroup()

.addGap(17, 17, 17)

.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 70,


javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)

.addComponent(inoout, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(inoout1, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap())

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel4Layout.createSequentialGroup()

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addComponent(jLabel13)

.addGap(707, 707, 707))

);

jPanel4Layout.setVerticalGroup(

jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel4Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jLabel13)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 15,
Short.MAX_VALUE)

.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(inoout, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(inoout1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 24,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(11, 11, 11))


);

javax.swing.GroupLayout jInternalFrame1Layout = new


javax.swing.GroupLayout(jInternalFrame1.getContentPane());

jInternalFrame1.getContentPane().setLayout(jInternalFrame1Layout);

jInternalFrame1Layout.setHorizontalGroup(

jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jInternalFrame1Layout.createSequentialGroup()

.addContainerGap()

.addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, 391,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jPanel2, javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))

.addContainerGap())

);

jInternalFrame1Layout.setVerticalGroup(

jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jInternalFrame1Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)

.addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(23, Short.MAX_VALUE))

);

Clear.setFont(new java.awt.Font("Century Gothic", 1, 11)); // NOI18N

Clear.setText("Clear");

Clear.setToolTipText("Clear all text field");

Clear.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED,
new java.awt.Color(255, 0, 102), new java.awt.Color(255, 0, 0), new java.awt.Color(0, 0, 255), new
java.awt.Color(0, 0, 255)));

Clear.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

Clear.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

ClearActionPerformed(evt);

});

jMenuBar1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

jMenu1.setText("Options");

jMenu1.setToolTipText("Click for more options");

jMenu1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

menusam.setText("Sample Size >=30");

menusam.setToolTipText("Case 2");
menusam.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

menusam.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

menusamActionPerformed(evt);

});

jMenu1.add(menusam);

menuEv.setText("Equal Variance");

menuEv.setToolTipText("Case 3");

menuEv.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

menuEv.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

menuEvActionPerformed(evt);

});

jMenu1.add(menuEv);

menuUv.setText("Unequal Variance");

menuUv.setToolTipText("Case 4");

menuUv.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

menuUv.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

menuUvActionPerformed(evt);

}
});

jMenu1.add(menuUv);

jMenu1.add(jSeparator1);

jMenuItem1.setText("Switch to AlStat.06 Turbo");

jMenuItem1.setToolTipText("Go!");

jMenuItem1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

jMenuItem1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem1ActionPerformed(evt);

});

jMenu1.add(jMenuItem1);

jMenuItem5.setText("About");

jMenuItem5.setToolTipText("About the program");

jMenuItem5.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

jMenuItem5.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem5ActionPerformed(evt);

});

jMenu1.add(jMenuItem5);

jMenuBar1.add(jMenu1);
setJMenuBar(jMenuBar1);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());

getContentPane().setLayout(layout);

layout.setHorizontalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addGap(44, 44, 44)

.addComponent(Clear, javax.swing.GroupLayout.PREFERRED_SIZE, 68,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(layout.createSequentialGroup()

.addContainerGap()

.addComponent(jInternalFrame1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);

layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addComponent(jInternalFrame1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(Clear, javax.swing.GroupLayout.PREFERRED_SIZE, 43,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap())

);

pack();

}// </editor-fold>//GEN-END:initComponents

private void tsidedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_tsidedActionPerformed

double sam ; double sam1; double mea;

double mea1; double var; double var1;

double con;

try{

sam = Double.parseDouble(

this.insam.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Size of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{
sam1 = Double.parseDouble(

this.insam1.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Size of Col B",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

mea = Double.parseDouble(

this.inmea.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

mea1 = Double.parseDouble(

this.inmea1.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col B",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;
}

try{

var = Double.parseDouble(

this.invar.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Standard Deviation of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

var1 = Double.parseDouble(

this.invar1.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Standard Deviation of Col B",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

con = Double.parseDouble(

this.incon.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Confidence Interval",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

}
double out3 = (mea-mea1) - con*Math.sqrt(var/sam + var1/sam1);

this.inout3.setText(" "+out3);

double out4 = (mea-mea1) + con*Math.sqrt(var/sam + var1/sam1);

this.inout4.setText(" "+out4);

}//GEN-LAST:event_tsidedActionPerformed

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jButton2ActionPerformed

double sam = 0; double mea;

double var; double con;

try{

sam = Double.parseDouble(this.insam.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

mea = Double.parseDouble(

this.inmea.getText());

} catch(Exception e){
JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

var = Double.parseDouble(

this.invar.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Standard Deviation of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

con = Double.parseDouble(

this.incon.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Confidence Interval",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

double out = (mea)-con*var/Math.sqrt(sam);

this.inoout.setText(" "+out);

double out2 = (mea)+con*var/Math.sqrt(sam);

this.inoout1.setText(" "+out2);
}//GEN-LAST:event_jButton2ActionPerformed

private void ClearActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_ClearActionPerformed

this.insam.setText("");

this.insam1.setText("");

this.invar.setText("");

this.invar1.setText("");

this.inmea.setText("");

this.inmea1.setText("");

this.incon.setText("");

this.inout3.setText("");

this.inout4.setText("");

this.inoout.setText("");

this.inoout1.setText("");

}//GEN-LAST:event_ClearActionPerformed

private void menusamActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_menusamActionPerformed

MainProgB al = new MainProgB();

al.setVisible(true);

}//GEN-LAST:event_menusamActionPerformed

private void menuEvActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_menuEvActionPerformed

MainProgD al = new MainProgD();

al.setVisible(true);
}//GEN-LAST:event_menuEvActionPerformed

private void menuUvActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_menuUvActionPerformed

MainProgE al = new MainProgE();

al.setVisible(true);

}//GEN-LAST:event_menuUvActionPerformed

private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jMenuItem1ActionPerformed

TurboProg2 al = new TurboProg2();

al.setVisible(true);

}//GEN-LAST:event_jMenuItem1ActionPerformed

private void jMenuItem5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jMenuItem5ActionPerformed

WelAbout al = new WelAbout();

al.setVisible(true);

}//GEN-LAST:event_jMenuItem5ActionPerformed

/**

* @param args the command line arguments

*/

public static void main(String args[]) {

java.awt.EventQueue.invokeLater(new Runnable() {

public void run() {

new MainProgC().setVisible(true);
}

});

// Variables declaration - do not modify//GEN-BEGIN:variables

private javax.swing.JButton Clear;

private javax.swing.JTextField incon;

private javax.swing.JTextField inmea;

private javax.swing.JTextField inmea1;

private javax.swing.JTextField inoout;

private javax.swing.JTextField inoout1;

private javax.swing.JTextField inout3;

private javax.swing.JTextField inout4;

private javax.swing.JTextField insam;

private javax.swing.JTextField insam1;

private javax.swing.JTextField invar;

private javax.swing.JTextField invar1;

private javax.swing.JButton jButton2;

private javax.swing.JInternalFrame jInternalFrame1;

private javax.swing.JLabel jLabel1;

private javax.swing.JLabel jLabel12;

private javax.swing.JLabel jLabel13;

private javax.swing.JLabel jLabel2;

private javax.swing.JLabel jLabel3;

private javax.swing.JLabel jLabel4;


private javax.swing.JLabel jLabel5;

private javax.swing.JLabel jLabel6;

private javax.swing.JMenu jMenu1;

private javax.swing.JMenuBar jMenuBar1;

private javax.swing.JMenuItem jMenuItem1;

private javax.swing.JMenuItem jMenuItem5;

private javax.swing.JPanel jPanel1;

private javax.swing.JPanel jPanel2;

private javax.swing.JPanel jPanel4;

private javax.swing.JPopupMenu.Separator jSeparator1;

private javax.swing.JMenuItem menuEv;

private javax.swing.JMenuItem menuUv;

private javax.swing.JMenuItem menusam;

private javax.swing.JButton tsided;

// End of variables declaration//GEN-END:variables

}
Part 8
of the
Program
Class Name: MainProgD.java
import javax.swing.JOptionPane;

/*

* To change this template, choose Tools | Templates

* and open the template in the editor.

*/

/*

* MainProgD.java

* Created on 03 25, 11, 11:19:18 PM

*/

/**

* @author Al-Ahmadgaid B. Asaad

*/

public class MainProgD extends javax.swing.JFrame {

/** Creates new form MainProgD */

public MainProgD() {

initComponents();

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

jInternalFrame2 = new javax.swing.JInternalFrame();

jPanel3 = new javax.swing.JPanel();

jLabel7 = new javax.swing.JLabel();

jLabel9 = new javax.swing.JLabel();

inm = new javax.swing.JTextField();

jLabel10 = new javax.swing.JLabel();

outm = new javax.swing.JTextField();

jButton1 = new javax.swing.JButton();

jPanel5 = new javax.swing.JPanel();

jLabel14 = new javax.swing.JLabel();

inoutt = new javax.swing.JTextField();

jLabel15 = new javax.swing.JLabel();

outtput = new javax.swing.JTextField();

jButton3 = new javax.swing.JButton();

jLabel20 = new javax.swing.JLabel();

jInternalFrame1 = new javax.swing.JInternalFrame();

jPanel2 = new javax.swing.JPanel();


jLabel4 = new javax.swing.JLabel();

invar = new javax.swing.JTextField();

invar1 = new javax.swing.JTextField();

jLabel3 = new javax.swing.JLabel();

jLabel2 = new javax.swing.JLabel();

inmea = new javax.swing.JTextField();

inmea1 = new javax.swing.JTextField();

jLabel1 = new javax.swing.JLabel();

insam = new javax.swing.JTextField();

insam1 = new javax.swing.JTextField();

jLabel5 = new javax.swing.JLabel();

jLabel12 = new javax.swing.JLabel();

jPanel1 = new javax.swing.JPanel();

tsided = new javax.swing.JButton();

jLabel6 = new javax.swing.JLabel();

incon = new javax.swing.JTextField();

inout3 = new javax.swing.JTextField();

inout4 = new javax.swing.JTextField();

jPanel4 = new javax.swing.JPanel();

jButton2 = new javax.swing.JButton();

inoout = new javax.swing.JTextField();

inoout1 = new javax.swing.JTextField();

jLabel13 = new javax.swing.JLabel();

Clear = new javax.swing.JButton();

jMenuBar1 = new javax.swing.JMenuBar();


jMenu1 = new javax.swing.JMenu();

menuc1 = new javax.swing.JMenuItem();

jMenuItem2 = new javax.swing.JMenuItem();

jMenuItem3 = new javax.swing.JMenuItem();

jSeparator1 = new javax.swing.JPopupMenu.Separator();

jMenuItem4 = new javax.swing.JMenuItem();

jMenuItem1 = new javax.swing.JMenuItem();

setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

setTitle("Confidence Interval of Unknown Equal Variance");

setResizable(false);

jInternalFrame2.setTitle("Test Statistics");

jInternalFrame2.setToolTipText("Test Statistics of one and two population means");

jInternalFrame2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

jInternalFrame2.setFrameIcon(null);

jInternalFrame2.setVisible(true);

jLabel7.setFont(new java.awt.Font("Papyrus", 1, 12));

jLabel7.setText("t-Test of one Population Mean");

jLabel9.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel9.setText("Given from Col A");

jLabel10.setFont(new java.awt.Font("Century Gothic", 0, 11));


jLabel10.setText("H0 and H1 Mean(u)");

outm.setBackground(new java.awt.Color(255, 255, 51));

outm.setEditable(false);

jButton1.setFont(new java.awt.Font("Century Gothic", 1, 11));

jButton1.setText("t-Test value");

jButton1.setToolTipText("Solve for t-test value of one population mean");

jButton1.setBorder(new
javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED, new java.awt.Color(255, 0,
102), new java.awt.Color(255, 0, 0), new java.awt.Color(0, 0, 255), new java.awt.Color(0, 0, 255)));

jButton1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton1ActionPerformed(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)

.addComponent(jLabel9)

.addComponent(jLabel7)
.addGroup(jPanel3Layout.createSequentialGroup()

.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 70,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel10))

.addGap(19, 19, 19)

.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(inm, javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(outm, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE))))

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);

jPanel3Layout.setVerticalGroup(

jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel3Layout.createSequentialGroup()

.addGap(6, 6, 6)

.addComponent(jLabel7)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addComponent(jLabel9)

.addGap(44, 44, 44)

.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(inm, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel10))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 24,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(outm, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);

jLabel14.setFont(new java.awt.Font("Papyrus", 1, 12)); // NOI18N

jLabel14.setText("t-Test of two Population Means");

jLabel15.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel15.setText("H0 and H1 Mean(d)");

outtput.setBackground(new java.awt.Color(255, 255, 51));

outtput.setEditable(false);

outtput.setCaretColor(new java.awt.Color(255, 204, 51));

outtput.setDisabledTextColor(new java.awt.Color(204, 255, 102));

jButton3.setFont(new java.awt.Font("Century Gothic", 1, 11));

jButton3.setText("t-Test value");

jButton3.setToolTipText("Solve for t-test value of two population mean");

jButton3.setBorder(new
javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED, new java.awt.Color(255, 0,
102), new java.awt.Color(255, 0, 0), new java.awt.Color(0, 0, 204), new java.awt.Color(0, 0, 255)));

jButton3.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {


jButton3ActionPerformed(evt);

});

jLabel20.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel20.setText("Given from Col A and Col B");

javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);

jPanel5.setLayout(jPanel5Layout);

jPanel5Layout.setHorizontalGroup(

jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel5Layout.createSequentialGroup()

.addContainerGap()

.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel5Layout.createSequentialGroup()

.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 70,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel15))

.addGap(21, 21, 21)

.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(inoutt, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(outtput, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE)))
.addComponent(jLabel20)

.addComponent(jLabel14))

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);

jPanel5Layout.setVerticalGroup(

jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel5Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jLabel14)

.addGap(15, 15, 15)

.addComponent(jLabel20)

.addGap(38, 38, 38)

.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(inoutt, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel15))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 24,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(outtput, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))

.addContainerGap(27, Short.MAX_VALUE))

);

javax.swing.GroupLayout jInternalFrame2Layout = new


javax.swing.GroupLayout(jInternalFrame2.getContentPane());
jInternalFrame2.getContentPane().setLayout(jInternalFrame2Layout);

jInternalFrame2Layout.setHorizontalGroup(

jInternalFrame2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jInternalFrame2Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(25, Short.MAX_VALUE))

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jInternalFrame2Layout.createSequentialGroup()

.addContainerGap(22, Short.MAX_VALUE)

.addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap())

);

jInternalFrame2Layout.setVerticalGroup(

jInternalFrame2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jInternalFrame2Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(77, Short.MAX_VALUE))

);
jInternalFrame1.setTitle("Confidence Interval");

jInternalFrame1.setToolTipText("Confidence Interval of one and two population means");

jInternalFrame1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

jInternalFrame1.setFrameIcon(null);

jInternalFrame1.setVisible(true);

jLabel4.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel4.setText("Col A");

jLabel3.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel3.setText("Std Deviation");

jLabel2.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel2.setText("Sam Mean");

jLabel1.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel1.setText("Sam Size");

jLabel5.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel5.setText("Col B");

jLabel12.setFont(new java.awt.Font("Papyrus", 1, 12));

jLabel12.setText("Given:");

javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);


jPanel2.setLayout(jPanel2Layout);

jPanel2Layout.setHorizontalGroup(

jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel2Layout.createSequentialGroup()

.addGap(23, 23, 23)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addGroup(jPanel2Layout.createSequentialGroup()

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jLabel2)

.addComponent(jLabel1)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel12)

.addComponent(jLabel3)))

.addGap(18, 18, 18)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(insam, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(invar, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(inmea, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)

.addComponent(invar1, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(inmea1, javax.swing.GroupLayout.PREFERRED_SIZE, 135,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(insam1, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(328, 328, 328))

.addGroup(jPanel2Layout.createSequentialGroup()

.addComponent(jLabel4)

.addGap(100, 100, 100)

.addComponent(jLabel5)

.addGap(397, 397, 397)))

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);

jPanel2Layout.setVerticalGroup(

jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel2Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jLabel12)

.addGap(12, 12, 12)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jLabel5)

.addComponent(jLabel4))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel2Layout.createSequentialGroup()

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(insam, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel1))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(inmea, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel2))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(invar, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel3)))

.addGroup(jPanel2Layout.createSequentialGroup()

.addComponent(insam1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(inmea1, 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(invar1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))

.addContainerGap())

);
tsided.setFont(new java.awt.Font("Century Gothic", 1, 11));

tsided.setText("2 sided");

tsided.setToolTipText("Solve for M1-M2 Confidence Interval");

tsided.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED,
new java.awt.Color(255, 0, 102), new java.awt.Color(255, 0, 0), new java.awt.Color(0, 0, 255), new
java.awt.Color(0, 0, 255)));

tsided.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

tsidedActionPerformed(evt);

});

jLabel6.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel6.setText("Conf Interval");

inout3.setBackground(new java.awt.Color(255, 255, 51));

inout3.setEditable(false);

inout4.setBackground(new java.awt.Color(255, 255, 51));

inout4.setEditable(false);

javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);

jPanel1.setLayout(jPanel1Layout);

jPanel1Layout.setHorizontalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel1Layout.createSequentialGroup()
.addContainerGap(25, Short.MAX_VALUE)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jLabel6)

.addComponent(tsided, javax.swing.GroupLayout.PREFERRED_SIZE, 70,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(18, 18, 18)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(inout3, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(inout4, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addComponent(incon, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(19, 19, 19))

);

jPanel1Layout.setVerticalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addContainerGap()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(incon, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel6))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 7,
Short.MAX_VALUE)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(inout4, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(inout3, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(tsided, javax.swing.GroupLayout.PREFERRED_SIZE, 24,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addContainerGap())

);

jButton2.setFont(new java.awt.Font("Century Gothic", 1, 11));

jButton2.setText("1 sided");

jButton2.setToolTipText("Solve for M1 Confidence Interval");

jButton2.setBorder(new
javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED, new java.awt.Color(255, 0,
102), new java.awt.Color(255, 0, 0), new java.awt.Color(0, 0, 255), new java.awt.Color(0, 0, 255)));

jButton2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton2ActionPerformed(evt);

});

inoout.setBackground(new java.awt.Color(255, 255, 51));

inoout.setEditable(false);

inoout1.setBackground(new java.awt.Color(255, 255, 51));

inoout1.setEditable(false);
jLabel13.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel13.setText("One Sided (Enter given in Col A)");

javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);

jPanel4.setLayout(jPanel4Layout);

jPanel4Layout.setHorizontalGroup(

jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel4Layout.createSequentialGroup()

.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel4Layout.createSequentialGroup()

.addGap(29, 29, 29)

.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 70,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addComponent(inoout, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(inoout1, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(jPanel4Layout.createSequentialGroup()

.addGap(21, 21, 21)

.addComponent(jLabel13)))

.addContainerGap(17, Short.MAX_VALUE))

);

jPanel4Layout.setVerticalGroup(

jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel4Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jLabel13)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 15,
Short.MAX_VALUE)

.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(inoout1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(inoout, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 24,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(11, 11, 11))

);

javax.swing.GroupLayout jInternalFrame1Layout = new


javax.swing.GroupLayout(jInternalFrame1.getContentPane());

jInternalFrame1.getContentPane().setLayout(jInternalFrame1Layout);

jInternalFrame1Layout.setHorizontalGroup(

jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jInternalFrame1Layout.createSequentialGroup()

.addContainerGap()

.addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 411,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);

jInternalFrame1Layout.setVerticalGroup(

jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jInternalFrame1Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(47, Short.MAX_VALUE))

);

Clear.setFont(new java.awt.Font("Century Gothic", 1, 11)); // NOI18N

Clear.setText("Clear");

Clear.setToolTipText("Clear all the text field");

Clear.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED,
new java.awt.Color(255, 0, 102), new java.awt.Color(255, 0, 0), new java.awt.Color(0, 0, 255), new
java.awt.Color(0, 0, 255)));

Clear.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

Clear.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {


ClearActionPerformed(evt);

});

jMenu1.setText("Options");

jMenu1.setToolTipText("Click for more options");

jMenu1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

menuc1.setText("Known Variance");

menuc1.setToolTipText("Case 1");

menuc1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

menuc1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

menuc1ActionPerformed(evt);

});

jMenu1.add(menuc1);

jMenuItem2.setText("Sample Size >=30");

jMenuItem2.setToolTipText("Case 2");

jMenuItem2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

jMenuItem2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem2ActionPerformed(evt);

}
});

jMenu1.add(jMenuItem2);

jMenuItem3.setText("Unequal Variance");

jMenuItem3.setToolTipText("Case 4");

jMenuItem3.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

jMenuItem3.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem3ActionPerformed(evt);

});

jMenu1.add(jMenuItem3);

jMenu1.add(jSeparator1);

jMenuItem4.setText("Switch to AlStat.06 Turbo");

jMenuItem4.setToolTipText("Go!");

jMenuItem4.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

jMenuItem4.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem4ActionPerformed(evt);

});

jMenu1.add(jMenuItem4);

jMenuItem1.setText("About");
jMenuItem1.setToolTipText("About the program");

jMenuItem1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

jMenuItem1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem1ActionPerformed(evt);

});

jMenu1.add(jMenuItem1);

jMenuBar1.add(jMenu1);

setJMenuBar(jMenuBar1);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());

getContentPane().setLayout(layout);

layout.setHorizontalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addContainerGap()

.addComponent(jInternalFrame1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(layout.createSequentialGroup()

.addGap(57, 57, 57)


.addComponent(Clear, javax.swing.GroupLayout.PREFERRED_SIZE, 68,
javax.swing.GroupLayout.PREFERRED_SIZE)))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addComponent(jInternalFrame2, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);

layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addContainerGap()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jInternalFrame2)

.addGroup(layout.createSequentialGroup()

.addComponent(jInternalFrame1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(Clear, javax.swing.GroupLayout.PREFERRED_SIZE, 43,


javax.swing.GroupLayout.PREFERRED_SIZE)))

.addContainerGap())

);

pack();

}// </editor-fold>//GEN-END:initComponents

private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jButton3ActionPerformed
double sam; double sam1; double mea;

double mea1; double var; double var1;

double con; double outt;

try{

sam = Double.parseDouble(

this.insam.getText());

if(sam>29){

JOptionPane.showMessageDialog(this, "The Sample Size of Col A must be less than 30",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

}else{

sam = Double.parseDouble(

this.insam.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Size of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

sam1 = Double.parseDouble(

this.insam1.getText());

if(sam1>29){
JOptionPane.showMessageDialog(this, "The Sample Size of Col B must be less than 30",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

}else{

sam1 = Double.parseDouble(

this.insam1.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Size of Col B",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

mea = Double.parseDouble(

this.inmea.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

mea1 = Double.parseDouble(

this.inmea1.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col B",


"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

var = Double.parseDouble(

this.invar.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Standard Deviation of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

var1 = Double.parseDouble(

this.invar1.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Standard Deviation of Col B",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

outt = Double.parseDouble(

this.inoutt.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter H0 and H1 Mean(d)",

"Invalid Input", JOptionPane.ERROR_MESSAGE);


return;

}if(sam>29){

this.outm.setText("");

}else if(sam1>29){

this.outm.setText("");

}else if((sam>29) && (sam1>29)){

this.outm.setText("");

}else{

double outputt = ((mea-mea1)-outt)/((((Math.sqrt(((sam-1)*Math.pow(var,2)+(sam1-


1)*Math.pow(var1,2))/(sam+sam1-2)))*Math.sqrt((1/sam)+(1/sam1)))));

this.outtput.setText(" "+outputt);

}//GEN-LAST:event_jButton3ActionPerformed

private void ClearActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_ClearActionPerformed

this.insam.setText("");

this.insam1.setText("");

this.invar.setText("");

this.invar1.setText("");

this.inmea.setText("");

this.inmea1.setText("");

this.incon.setText("");

this.inout3.setText("");

this.inout4.setText("");

this.inoout.setText("");
this.inoout1.setText("");

this.inm.setText("");

this.outm.setText("");

this.inoutt.setText("");

this.outtput.setText("");

}//GEN-LAST:event_ClearActionPerformed

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


FIRST:event_jButton1ActionPerformed

double sam = 0; double mea;

double var; double m;

double con;

try{

sam = Double.parseDouble(

this.insam.getText());

if(sam>29){

JOptionPane.showMessageDialog(this, "The Sample Size of Col A must be less than 30",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

}else{

sam = Double.parseDouble(

this.insam.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Size of Col A",


"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

mea = Double.parseDouble(

this.inmea.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

var = Double.parseDouble(

this.invar.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Standard Deviation of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

m = Double.parseDouble(

this.inm.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter H0 and H1 Mean(u)",

"Invalid Input", JOptionPane.ERROR_MESSAGE);


return;

}if(sam>29){

this.outm.setText("");

}else{

double outmm = (mea - m)/(var/Math.sqrt(sam));

this.outm.setText(" "+outmm);

}//GEN-LAST:event_jButton1ActionPerformed

private void tsidedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_tsidedActionPerformed

double sam = 0; double sam1 = 0; double mea;

double mea1; double var; double var1;

double con;

try{

sam = Double.parseDouble(

this.insam.getText());

if(sam>29){

JOptionPane.showMessageDialog(this, "The Sample Size of Col A must be less than 30",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

}else{

sam = Double.parseDouble(

this.insam.getText());

}
} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Size of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

sam1 = Double.parseDouble(

this.insam1.getText());

if(sam1>29){

JOptionPane.showMessageDialog(this, "The Sample Size of Col B must be less than 30",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

}else{

sam1 = Double.parseDouble(

this.insam1.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Size of Col B",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

mea = Double.parseDouble(

this.inmea.getText());
} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

mea1 = Double.parseDouble(

this.inmea1.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col B",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

var = Double.parseDouble(

this.invar.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Standard Deviation of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

var1 = Double.parseDouble(

this.invar1.getText());

} catch(Exception e){
JOptionPane.showMessageDialog(this, "Re-enter Standard Deviation of Col B",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

con = Double.parseDouble(

this.incon.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Confidence Interval",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

}if(sam>29){

this.inout3.setText("");

this.inout4.setText("");

}else if(sam1>29){

this.inout3.setText("");

this.inout4.setText("");

}else if((sam>29)&&(sam1>29)){

this.inout3.setText("");

this.inout4.setText("");

}else{

double out3 = (mea-mea1) - con*(Math.sqrt(((sam-1)*Math.pow(var,2)+(sam1-


1)*Math.pow(var1,2))/(sam+sam1-2)))*Math.sqrt((1/sam)+(1/sam1));

this.inout3.setText(" "+out3);
double out4 = (mea-mea1) + con*(Math.sqrt(((sam-1)*Math.pow(var,2)+(sam1-
1)*Math.pow(var1,2))/(sam+sam1-2)))*Math.sqrt((1/sam)+(1/sam1));

this.inout4.setText(" "+out4);

}//GEN-LAST:event_tsidedActionPerformed

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jButton2ActionPerformed

double sam = 0; double mea;

double var; double con;

try{

sam = Double.parseDouble(this.insam.getText());

if(sam > 29){

JOptionPane.showMessageDialog(this, "The Sample Size of Col A must be less than 30",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

else{

sam = Double.parseDouble(this.insam.getText());

} catch(Exception e){
JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

mea = Double.parseDouble(

this.inmea.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

var = Double.parseDouble(

this.invar.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Standard Deviation of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

con = Double.parseDouble(

this.incon.getText());

} catch(Exception e){
JOptionPane.showMessageDialog(this, "Re-enter Confidence Interval",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

} if(sam>29){

this.inoout.setText("");

this.inoout1.setText("");

}else{

double out = (mea)-con*var/Math.sqrt(sam);

this.inoout.setText(" "+out);

double out2 = (mea)+con*var/Math.sqrt(sam);

this.inoout1.setText(" "+out2);

}//GEN-LAST:event_jButton2ActionPerformed

private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jMenuItem3ActionPerformed

MainProgE me = new MainProgE();

me.setVisible(true);

}//GEN-LAST:event_jMenuItem3ActionPerformed

private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jMenuItem2ActionPerformed

MainProgB al = new MainProgB();

al.setVisible(true);

}//GEN-LAST:event_jMenuItem2ActionPerformed
private void menuc1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-
FIRST:event_menuc1ActionPerformed

MainProgC al = new MainProgC();

al.setVisible(true);

}//GEN-LAST:event_menuc1ActionPerformed

private void jMenuItem4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jMenuItem4ActionPerformed

TurboProg2 al = new TurboProg2();

al.setVisible(true);

}//GEN-LAST:event_jMenuItem4ActionPerformed

private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jMenuItem1ActionPerformed

WelAbout al = new WelAbout();

al.setVisible(true);

}//GEN-LAST:event_jMenuItem1ActionPerformed

/**

* @param args the command line arguments

*/

public static void main(String args[]) {

java.awt.EventQueue.invokeLater(new Runnable() {

public void run() {

new MainProgD().setVisible(true);

}
});

// Variables declaration - do not modify//GEN-BEGIN:variables

private javax.swing.JButton Clear;

private javax.swing.JTextField incon;

private javax.swing.JTextField inm;

private javax.swing.JTextField inmea;

private javax.swing.JTextField inmea1;

private javax.swing.JTextField inoout;

private javax.swing.JTextField inoout1;

private javax.swing.JTextField inout3;

private javax.swing.JTextField inout4;

private javax.swing.JTextField inoutt;

private javax.swing.JTextField insam;

private javax.swing.JTextField insam1;

private javax.swing.JTextField invar;

private javax.swing.JTextField invar1;

private javax.swing.JButton jButton1;

private javax.swing.JButton jButton2;

private javax.swing.JButton jButton3;

private javax.swing.JInternalFrame jInternalFrame1;

private javax.swing.JInternalFrame jInternalFrame2;

private javax.swing.JLabel jLabel1;

private javax.swing.JLabel jLabel10;


private javax.swing.JLabel jLabel12;

private javax.swing.JLabel jLabel13;

private javax.swing.JLabel jLabel14;

private javax.swing.JLabel jLabel15;

private javax.swing.JLabel jLabel2;

private javax.swing.JLabel jLabel20;

private javax.swing.JLabel jLabel3;

private javax.swing.JLabel jLabel4;

private javax.swing.JLabel jLabel5;

private javax.swing.JLabel jLabel6;

private javax.swing.JLabel jLabel7;

private javax.swing.JLabel jLabel9;

private javax.swing.JMenu jMenu1;

private javax.swing.JMenuBar jMenuBar1;

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 jPanel2;

private javax.swing.JPanel jPanel3;

private javax.swing.JPanel jPanel4;

private javax.swing.JPanel jPanel5;

private javax.swing.JPopupMenu.Separator jSeparator1;

private javax.swing.JMenuItem menuc1;


private javax.swing.JTextField outm;

private javax.swing.JTextField outtput;

private javax.swing.JButton tsided;

// End of variables declaration//GEN-END:variables

}
Part 9
of the
Program
Class Name: MainProgB.java
import javax.swing.JOptionPane;

/*

* To change this template, choose Tools | Templates

* and open the template in the editor.

*/

/*

* MainProgB.java

* Created on 03 25, 11, 9:50:30 PM

*/

/**

* @author Al-Ahmadgaid B. Asaad

*/

public class MainProgB extends javax.swing.JFrame {

/** Creates new form MainProgB */

public MainProgB() {

initComponents();

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

jInternalFrame1 = new javax.swing.JInternalFrame();

jPanel2 = new javax.swing.JPanel();

jLabel4 = new javax.swing.JLabel();

invar = new javax.swing.JTextField();

invar1 = new javax.swing.JTextField();

jLabel3 = new javax.swing.JLabel();

jLabel2 = new javax.swing.JLabel();

inmea = new javax.swing.JTextField();

inmea1 = new javax.swing.JTextField();

jLabel1 = new javax.swing.JLabel();

insam = new javax.swing.JTextField();

insam1 = new javax.swing.JTextField();

jLabel5 = new javax.swing.JLabel();

jLabel12 = new javax.swing.JLabel();

jPanel1 = new javax.swing.JPanel();

tsided = new javax.swing.JButton();

incon = new javax.swing.JTextField();


inout3 = new javax.swing.JTextField();

inout4 = new javax.swing.JTextField();

jLabel6 = new javax.swing.JLabel();

jPanel4 = new javax.swing.JPanel();

jButton2 = new javax.swing.JButton();

inoout = new javax.swing.JTextField();

inoout1 = new javax.swing.JTextField();

jLabel13 = new javax.swing.JLabel();

Clear = new javax.swing.JButton();

jMenuBar1 = new javax.swing.JMenuBar();

jMenu1 = new javax.swing.JMenu();

menuKv = new javax.swing.JMenuItem();

menuEv = new javax.swing.JMenuItem();

menuUv = new javax.swing.JMenuItem();

jSeparator1 = new javax.swing.JPopupMenu.Separator();

jMenuItem4 = new javax.swing.JMenuItem();

jMenuItem5 = new javax.swing.JMenuItem();

setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

setTitle("Confidence Interval of Unknown Variance (n>=30)");

setResizable(false);

jInternalFrame1.setTitle("Confidence Interval");

jInternalFrame1.setToolTipText("Confidence Interval of one and two population means");

jInternalFrame1.setFrameIcon(null);
jInternalFrame1.setVisible(true);

jLabel4.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel4.setText("Col A");

jLabel3.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel3.setText("Std Deviation");

jLabel2.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel2.setText("Sam Mean");

jLabel1.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel1.setText("Sam Size");

jLabel5.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel5.setText("Col B");

jLabel12.setFont(new java.awt.Font("Papyrus", 1, 12));

jLabel12.setText("Given:");

javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);

jPanel2.setLayout(jPanel2Layout);

jPanel2Layout.setHorizontalGroup(

jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel2Layout.createSequentialGroup()
.addGap(23, 23, 23)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addGroup(jPanel2Layout.createSequentialGroup()

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addGroup(jPanel2Layout.createSequentialGroup()

.addComponent(jLabel12)

.addGap(44, 44, 44))

.addGroup(jPanel2Layout.createSequentialGroup()

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jLabel2)

.addComponent(jLabel3)

.addComponent(jLabel1))

.addGap(18, 18, 18)))

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(invar, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(insam, javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(inmea, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)

.addComponent(invar1, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(inmea1, javax.swing.GroupLayout.PREFERRED_SIZE, 135,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(insam1, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE)))

.addGroup(jPanel2Layout.createSequentialGroup()

.addComponent(jLabel4)

.addGap(130, 130, 130)

.addComponent(jLabel5)

.addGap(60, 60, 60)))

.addContainerGap())

);

jPanel2Layout.setVerticalGroup(

jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel2Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jLabel12)

.addGap(12, 12, 12)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jLabel5)

.addComponent(jLabel4))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(insam1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(insam, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel1))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(inmea1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(inmea, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel2))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(invar1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(invar, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel3))

.addContainerGap())

);

tsided.setFont(new java.awt.Font("Century Gothic", 1, 11));

tsided.setText("2 sided");

tsided.setToolTipText("Solve for M1-M2 Confidence Interval");

tsided.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED,
new java.awt.Color(255, 0, 102), new java.awt.Color(255, 0, 0), new java.awt.Color(0, 0, 255), new
java.awt.Color(0, 0, 255)));

tsided.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

tsidedActionPerformed(evt);

}
});

inout3.setBackground(new java.awt.Color(255, 255, 51));

inout3.setEditable(false);

inout4.setBackground(new java.awt.Color(255, 255, 51));

inout4.setEditable(false);

jLabel6.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel6.setText("Conf Interval");

javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);

jPanel1.setLayout(jPanel1Layout);

jPanel1Layout.setHorizontalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(25, 25, 25)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jLabel6)

.addComponent(tsided, javax.swing.GroupLayout.PREFERRED_SIZE, 70,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(18, 18, 18)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(incon, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(inout3, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(inout4, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);

jPanel1Layout.setVerticalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addContainerGap()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(incon, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel6))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(inout4, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(inout3, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(tsided, javax.swing.GroupLayout.PREFERRED_SIZE, 24,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);

jButton2.setFont(new java.awt.Font("Century Gothic", 1, 11));

jButton2.setText("1 sided");

jButton2.setToolTipText("Solve for M1 Confidence Interval");


jButton2.setBorder(new
javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED, new java.awt.Color(255, 0,
102), new java.awt.Color(255, 0, 0), new java.awt.Color(0, 0, 255), new java.awt.Color(0, 0, 255)));

jButton2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton2ActionPerformed(evt);

});

inoout.setBackground(new java.awt.Color(255, 255, 51));

inoout.setEditable(false);

inoout1.setBackground(new java.awt.Color(255, 255, 51));

inoout1.setEditable(false);

jLabel13.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel13.setText("One Sided (Enter given in Col A)");

javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);

jPanel4.setLayout(jPanel4Layout);

jPanel4Layout.setHorizontalGroup(

jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel4Layout.createSequentialGroup()

.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel4Layout.createSequentialGroup()

.addGap(29, 29, 29)


.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 70,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addComponent(inoout, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(inoout1, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(jPanel4Layout.createSequentialGroup()

.addGap(21, 21, 21)

.addComponent(jLabel13)))

.addContainerGap(8, Short.MAX_VALUE))

);

jPanel4Layout.setVerticalGroup(

jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel4Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jLabel13)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 15,
Short.MAX_VALUE)

.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(inoout1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(inoout, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 24,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(11, 11, 11))


);

javax.swing.GroupLayout jInternalFrame1Layout = new


javax.swing.GroupLayout(jInternalFrame1.getContentPane());

jInternalFrame1.getContentPane().setLayout(jInternalFrame1Layout);

jInternalFrame1Layout.setHorizontalGroup(

jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jInternalFrame1Layout.createSequentialGroup()

.addContainerGap()

.addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jInternalFrame1Layout.createSequentialGroup()

.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addGap(17, 17, 17))

.addGroup(jInternalFrame1Layout.createSequentialGroup()

.addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, 401,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(17, Short.MAX_VALUE))

.addGroup(jInternalFrame1Layout.createSequentialGroup()

.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(17, Short.MAX_VALUE))))

);

jInternalFrame1Layout.setVerticalGroup(

jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jInternalFrame1Layout.createSequentialGroup()
.addContainerGap()

.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(23, Short.MAX_VALUE))

);

Clear.setFont(new java.awt.Font("Century Gothic", 1, 11)); // NOI18N

Clear.setText("Clear");

Clear.setToolTipText("Clear all text field");

Clear.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED,
new java.awt.Color(255, 0, 102), new java.awt.Color(255, 0, 0), new java.awt.Color(0, 0, 255), new
java.awt.Color(0, 0, 255)));

Clear.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

ClearActionPerformed(evt);

});

jMenu1.setText("Options");

jMenu1.setToolTipText("Click for more options");

jMenu1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
menuKv.setText("Known Variance");

menuKv.setToolTipText("Case 1");

menuKv.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

menuKv.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

menuKvActionPerformed(evt);

});

jMenu1.add(menuKv);

menuEv.setText("Equal Variance");

menuEv.setToolTipText("Case 3");

menuEv.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

menuEv.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

menuEvActionPerformed(evt);

});

jMenu1.add(menuEv);

menuUv.setText("Unequal Variance");

menuUv.setToolTipText("Case 4");

menuUv.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

menuUv.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {

menuUvActionPerformed(evt);

});

jMenu1.add(menuUv);

jMenu1.add(jSeparator1);

jMenuItem4.setText("Switch to AlStat.06 Turbo");

jMenuItem4.setToolTipText("Go!");

jMenuItem4.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

jMenuItem4.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem4ActionPerformed(evt);

});

jMenu1.add(jMenuItem4);

jMenuItem5.setText("About");

jMenuItem5.setToolTipText("About the program");

jMenuItem5.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

jMenuItem5.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem5ActionPerformed(evt);

});
jMenu1.add(jMenuItem5);

jMenuBar1.add(jMenu1);

setJMenuBar(jMenuBar1);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());

getContentPane().setLayout(layout);

layout.setHorizontalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addGap(57, 57, 57)

.addComponent(Clear, javax.swing.GroupLayout.PREFERRED_SIZE, 68,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(layout.createSequentialGroup()

.addContainerGap()

.addComponent(jInternalFrame1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);

layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jInternalFrame1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(Clear, javax.swing.GroupLayout.PREFERRED_SIZE, 43,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap())

);

pack();

}// </editor-fold>//GEN-END:initComponents

private void menuKvActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_menuKvActionPerformed

MainProgC al = new MainProgC();

al.setVisible(true);

}//GEN-LAST:event_menuKvActionPerformed

private void menuEvActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_menuEvActionPerformed

MainProgD al = new MainProgD();

al.setVisible(true);

}//GEN-LAST:event_menuEvActionPerformed

private void menuUvActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_menuUvActionPerformed

MainProgE al = new MainProgE();

al.setVisible(true);
}//GEN-LAST:event_menuUvActionPerformed

private void ClearActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_ClearActionPerformed

this.insam.setText("");

this.insam1.setText("");

this.invar.setText("");

this.invar1.setText("");

this.inmea.setText("");

this.inmea1.setText("");

this.incon.setText("");

this.inout3.setText("");

this.inout4.setText("");

this.inoout.setText("");

this.inoout1.setText("");

}//GEN-LAST:event_ClearActionPerformed

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jButton2ActionPerformed

double sam = 0; double mea;

double var; double con;

try{

sam = Double.parseDouble(this.insam.getText());

if(sam <30){

JOptionPane.showMessageDialog(this, "The Sample Size of Col A must be greater than or equal


to 30",
"Invalid Input", JOptionPane.ERROR_MESSAGE);

else{

sam = Double.parseDouble(this.insam.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

mea = Double.parseDouble(

this.inmea.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

var = Double.parseDouble(

this.invar.getText());
} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Standard Deviation of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

con = Double.parseDouble(

this.incon.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Confidence Interval",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

} if(sam<30){

this.inoout.setText("");

this.inoout1.setText("");

}else{

double out = (mea)-con*var/Math.sqrt(sam);

this.inoout.setText(" "+out);

double out2 = (mea)+con*var/Math.sqrt(sam);

this.inoout1.setText(" "+out2);

}//GEN-LAST:event_jButton2ActionPerformed

private void tsidedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_tsidedActionPerformed
double sam = 0; double sam1 = 0; double mea;

double mea1; double var; double var1;

double con;

try{

sam = Double.parseDouble(

this.insam.getText());

if(sam<30){

JOptionPane.showMessageDialog(this, "The Sample Size of Col A must be greater than or equal


to 30",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

}else{

sam = Double.parseDouble(

this.insam.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Size of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

sam1 = Double.parseDouble(

this.insam1.getText());

if(sam1<30){
JOptionPane.showMessageDialog(this, "The Sample Size of Col B must be greater than or equal
to 30",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

}else{

sam1 = Double.parseDouble(

this.insam1.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Size of Col B",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

mea = Double.parseDouble(

this.inmea.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

mea1 = Double.parseDouble(

this.inmea1.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col B",


"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

var = Double.parseDouble(

this.invar.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Standard Deviation of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

var1 = Double.parseDouble(

this.invar1.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Standard Deviation of Col B",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

con = Double.parseDouble(

this.incon.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Confidence Interval",

"Invalid Input", JOptionPane.ERROR_MESSAGE);


return;

}if(sam<30){

this.inout3.setText("");

this.inout4.setText("");

}else if(sam1<30){

this.inout3.setText("");

this.inout4.setText("");

}else if((sam<30)&&(sam1<30)){

this.inout3.setText("");

this.inout4.setText("");

}else{

double out3 = (mea-mea1) - con*Math.sqrt(Math.pow(var,2)/sam + Math.pow(var1,2)/sam1);

this.inout3.setText(" "+out3);

double out4 = (mea-mea1) + con*Math.sqrt(Math.pow(var,2)/sam + Math.pow(var1,2)/sam1);

this.inout4.setText(" "+out4);

}//GEN-LAST:event_tsidedActionPerformed

private void jMenuItem4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jMenuItem4ActionPerformed

TurboProg2 al = new TurboProg2();

al.setVisible(true);

}//GEN-LAST:event_jMenuItem4ActionPerformed
private void jMenuItem5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-
FIRST:event_jMenuItem5ActionPerformed

WelAbout al = new WelAbout();

al.setVisible(true);

}//GEN-LAST:event_jMenuItem5ActionPerformed

/**

* @param args the command line arguments

*/

public static void main(String args[]) {

java.awt.EventQueue.invokeLater(new Runnable() {

public void run() {

new MainProgB().setVisible(true);

});

// Variables declaration - do not modify//GEN-BEGIN:variables

private javax.swing.JButton Clear;

private javax.swing.JTextField incon;

private javax.swing.JTextField inmea;

private javax.swing.JTextField inmea1;

private javax.swing.JTextField inoout;

private javax.swing.JTextField inoout1;

private javax.swing.JTextField inout3;

private javax.swing.JTextField inout4;


private javax.swing.JTextField insam;

private javax.swing.JTextField insam1;

private javax.swing.JTextField invar;

private javax.swing.JTextField invar1;

private javax.swing.JButton jButton2;

private javax.swing.JInternalFrame jInternalFrame1;

private javax.swing.JLabel jLabel1;

private javax.swing.JLabel jLabel12;

private javax.swing.JLabel jLabel13;

private javax.swing.JLabel jLabel2;

private javax.swing.JLabel jLabel3;

private javax.swing.JLabel jLabel4;

private javax.swing.JLabel jLabel5;

private javax.swing.JLabel jLabel6;

private javax.swing.JMenu jMenu1;

private javax.swing.JMenuBar jMenuBar1;

private javax.swing.JMenuItem jMenuItem4;

private javax.swing.JMenuItem jMenuItem5;

private javax.swing.JPanel jPanel1;

private javax.swing.JPanel jPanel2;

private javax.swing.JPanel jPanel4;

private javax.swing.JPopupMenu.Separator jSeparator1;

private javax.swing.JMenuItem menuEv;

private javax.swing.JMenuItem menuKv;

private javax.swing.JMenuItem menuUv;


private javax.swing.JButton tsided;

// End of variables declaration//GEN-END:variables

}
Part 10
of the
Program
Class Name: TurboProg2.java
import javax.swing.JOptionPane;

/*

* To change this template, choose Tools | Templates

* and open the template in the editor.

*/

/*

* TurboProg2.java

* Created on 03 27, 11, 3:05:37 PM

*/

/**

* @author Al-Ahmadgaid B. Asaad

*/

public class TurboProg2 extends javax.swing.JFrame {

/** Creates new form TurboProg2 */

public TurboProg2() {

initComponents();

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

jPopupMenu1 = new javax.swing.JPopupMenu();

jDialog1 = new javax.swing.JDialog();

jInternalFrame1 = new javax.swing.JInternalFrame();

jPanel2 = new javax.swing.JPanel();

jLabel4 = new javax.swing.JLabel();

invar = new javax.swing.JTextField();

invar1 = new javax.swing.JTextField();

jLabel3 = new javax.swing.JLabel();

jLabel2 = new javax.swing.JLabel();

inmea = new javax.swing.JTextField();

inmea1 = new javax.swing.JTextField();

jLabel1 = new javax.swing.JLabel();

insam = new javax.swing.JTextField();

insam1 = new javax.swing.JTextField();

jLabel5 = new javax.swing.JLabel();

jLabel18 = new javax.swing.JLabel();

jLabel6 = new javax.swing.JLabel();


incon = new javax.swing.JTextField();

jLabel13 = new javax.swing.JLabel();

jLabel14 = new javax.swing.JLabel();

jPanel7 = new javax.swing.JPanel();

jButton5 = new javax.swing.JButton();

inoout = new javax.swing.JTextField();

inoout1 = new javax.swing.JTextField();

jLabel19 = new javax.swing.JLabel();

jButton3 = new javax.swing.JButton();

jButton4 = new javax.swing.JButton();

jLabel22 = new javax.swing.JLabel();

jLabel7 = new javax.swing.JLabel();

jPanel1 = new javax.swing.JPanel();

tsided = new javax.swing.JButton();

inout3 = new javax.swing.JTextField();

inout4 = new javax.swing.JTextField();

equalvar = new javax.swing.JButton();

unequalvar = new javax.swing.JButton();

indeg = new javax.swing.JTextField();

deg = new javax.swing.JButton();

jLabel21 = new javax.swing.JLabel();

jLabel15 = new javax.swing.JLabel();

jInternalFrame2 = new javax.swing.JInternalFrame();

jPanel3 = new javax.swing.JPanel();

jLabel8 = new javax.swing.JLabel();


jLabel9 = new javax.swing.JLabel();

inm = new javax.swing.JTextField();

jLabel10 = new javax.swing.JLabel();

outm = new javax.swing.JTextField();

jButton1 = new javax.swing.JButton();

jButton2 = new javax.swing.JButton();

jPanel5 = new javax.swing.JPanel();

jLabel16 = new javax.swing.JLabel();

inoutt = new javax.swing.JTextField();

jLabel17 = new javax.swing.JLabel();

outtput = new javax.swing.JTextField();

jButton6 = new javax.swing.JButton();

jLabel20 = new javax.swing.JLabel();

jButton7 = new javax.swing.JButton();

Clear = new javax.swing.JButton();

jMenuBar1 = new javax.swing.JMenuBar();

jMenu1 = new javax.swing.JMenu();

jMenuItem1 = new javax.swing.JMenuItem();

jMenuItem2 = new javax.swing.JMenuItem();

javax.swing.GroupLayout jDialog1Layout = new


javax.swing.GroupLayout(jDialog1.getContentPane());

jDialog1.getContentPane().setLayout(jDialog1Layout);

jDialog1Layout.setHorizontalGroup(

jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGap(0, 400, Short.MAX_VALUE)


);

jDialog1Layout.setVerticalGroup(

jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGap(0, 300, Short.MAX_VALUE)

);

setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

setTitle("AlStat.06 Turbo");

setResizable(false);

jInternalFrame1.setTitle("Confidence Interval");

jInternalFrame1.setToolTipText("Confidence Interval of one and two population means");

jInternalFrame1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

jInternalFrame1.setFrameIcon(null);

jInternalFrame1.setVisible(true);

jLabel4.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel4.setText("Col A");

jLabel3.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel3.setText("Std Deviation");

jLabel2.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel2.setText("Sam Mean");
jLabel1.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel1.setText("Sam Size");

jLabel5.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel5.setText("Col B");

jLabel18.setFont(new java.awt.Font("Papyrus", 1, 12));

jLabel18.setText("Given:");

jLabel6.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel6.setText("Conf Interval");

jLabel13.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel13.setText("Col A");

jLabel14.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N

jLabel14.setText("Col B");

javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);

jPanel2.setLayout(jPanel2Layout);

jPanel2Layout.setHorizontalGroup(

jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel2Layout.createSequentialGroup()

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING,
false)
.addGroup(javax.swing.GroupLayout.Alignment.LEADING,
jPanel2Layout.createSequentialGroup()

.addGap(23, 23, 23)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addGroup(jPanel2Layout.createSequentialGroup()

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jLabel2)

.addComponent(jLabel1))

.addGap(18, 18, 18)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(insam, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(inmea, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)

.addComponent(inmea1, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(insam1, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE)))

.addGroup(jPanel2Layout.createSequentialGroup()

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jLabel6)
.addComponent(jLabel3))

.addGap(18, 18, 18)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel2Layout.createSequentialGroup()

.addComponent(invar, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(invar1, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addComponent(incon, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE))))

.addComponent(jLabel18))

.addGap(1040, 1040, 1040))

.addGroup(jPanel2Layout.createSequentialGroup()

.addGap(166, 166, 166)

.addComponent(jLabel13)

.addGap(112, 112, 112)

.addComponent(jLabel14)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addComponent(jLabel4)

.addGap(100, 100, 100)

.addComponent(jLabel5)

.addGap(397, 397, 397)))

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);
jPanel2Layout.setVerticalGroup(

jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel2Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jLabel18)

.addGap(12, 12, 12)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jLabel5)

.addComponent(jLabel4)

.addComponent(jLabel13)

.addComponent(jLabel14))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel2Layout.createSequentialGroup()

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(insam, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel1))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(inmea, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel2)))

.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(insam1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(inmea1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(invar, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel3))

.addComponent(invar1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jLabel6)

.addComponent(incon, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);

jButton5.setFont(new java.awt.Font("Century Gothic", 1, 11));

jButton5.setText("Case 1");

jButton5.setToolTipText("Confidence Interval of known variance");

jButton5.setBorder(new
javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED, new java.awt.Color(255, 0,
102), new java.awt.Color(255, 0, 0), new java.awt.Color(0, 0, 255), new java.awt.Color(0, 0, 255)));

jButton5.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton5ActionPerformed(evt);

});

inoout.setBackground(new java.awt.Color(255, 255, 51));

inoout.setEditable(false);

inoout1.setBackground(new java.awt.Color(255, 255, 51));

inoout1.setEditable(false);

jLabel19.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel19.setText("Output");

jButton3.setFont(new java.awt.Font("Century Gothic", 1, 11)); // NOI18N

jButton3.setText("Case 2");

jButton3.setToolTipText("Confidence Interval of unknown variance, n >= 30");

jButton3.setBorder(new
javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED, new java.awt.Color(255, 0,
0), new java.awt.Color(255, 0, 0), new java.awt.Color(0, 0, 255), new java.awt.Color(0, 0, 255)));

jButton3.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton3ActionPerformed(evt);

});
jButton4.setFont(new java.awt.Font("Century Gothic", 1, 11));

jButton4.setText("Case 3");

jButton4.setToolTipText("Confidence Interval of unknown variance, n < 30");

jButton4.setBorder(new
javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED, new java.awt.Color(255, 0,
0), new java.awt.Color(255, 0, 0), new java.awt.Color(0, 0, 255), new java.awt.Color(0, 0, 255)));

jButton4.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton4ActionPerformed(evt);

});

jLabel22.setFont(new java.awt.Font("Papyrus", 1, 12));

jLabel22.setText("One Sided");

jLabel7.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N

jLabel7.setText("Enter given in Col A");

javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);

jPanel7.setLayout(jPanel7Layout);

jPanel7Layout.setHorizontalGroup(

jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel7Layout.createSequentialGroup()

.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel7Layout.createSequentialGroup()

.addContainerGap(56, Short.MAX_VALUE)
.addComponent(jLabel19)

.addGap(18, 18, 18))

.addGroup(jPanel7Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jLabel22)

.addGap(29, 29, 29)))

.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)

.addGroup(jPanel7Layout.createSequentialGroup()

.addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 70,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 70,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(30, 30, 30)

.addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 70,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(jPanel7Layout.createSequentialGroup()

.addComponent(inoout, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(inoout1, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE)))

.addGroup(jPanel7Layout.createSequentialGroup()

.addGap(87, 87, 87)

.addComponent(jLabel7)))
.addGap(21, 21, 21))

);

jPanel7Layout.setVerticalGroup(

jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel7Layout.createSequentialGroup()

.addContainerGap()

.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jLabel22)

.addComponent(jLabel7))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 24,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 24,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 24,


javax.swing.GroupLayout.PREFERRED_SIZE)))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(inoout1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(inoout, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel19))

.addContainerGap())
);

tsided.setFont(new java.awt.Font("Century Gothic", 1, 11)); // NOI18N

tsided.setText("n >= 30");

tsided.setToolTipText("Sample size >= 30");

tsided.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED,
new java.awt.Color(255, 0, 102), new java.awt.Color(255, 0, 0), new java.awt.Color(0, 0, 255), new
java.awt.Color(0, 0, 255)));

tsided.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

tsidedActionPerformed(evt);

});

inout3.setBackground(new java.awt.Color(255, 255, 51));

inout3.setEditable(false);

inout4.setBackground(new java.awt.Color(255, 255, 51));

inout4.setEditable(false);

equalvar.setFont(new java.awt.Font("Century Gothic", 1, 11)); // NOI18N

equalvar.setText("equal var");

equalvar.setToolTipText("equal variance");

equalvar.setBorder(new
javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED, new java.awt.Color(255, 0,
0), new java.awt.Color(255, 0, 0), new java.awt.Color(0, 0, 255), new java.awt.Color(0, 0, 255)));

equalvar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {

equalvarActionPerformed(evt);

});

unequalvar.setFont(new java.awt.Font("Century Gothic", 1, 11)); // NOI18N

unequalvar.setText("unequal var");

unequalvar.setToolTipText("unequal variance");

unequalvar.setBorder(new
javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED, new java.awt.Color(255, 0,
102), new java.awt.Color(255, 0, 0), new java.awt.Color(0, 0, 255), new java.awt.Color(0, 0, 255)));

unequalvar.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

unequalvarActionPerformed(evt);

});

indeg.setBackground(new java.awt.Color(255, 255, 51));

indeg.setEditable(false);

deg.setFont(new java.awt.Font("Century Gothic", 1, 11));

deg.setText("Deg Freedom");

deg.setToolTipText("Available only for unequal variance");

deg.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED,
new java.awt.Color(255, 0, 0), new java.awt.Color(255, 0, 0), new java.awt.Color(0, 0, 255), new
java.awt.Color(0, 0, 255)));

deg.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {

degActionPerformed(evt);

});

jLabel21.setFont(new java.awt.Font("Papyrus", 1, 12));

jLabel21.setText("Two Sided");

jLabel15.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel15.setText("Output");

javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);

jPanel1.setLayout(jPanel1Layout);

jPanel1Layout.setHorizontalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel1Layout.createSequentialGroup()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jLabel21)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel1Layout.createSequentialGroup()

.addContainerGap(16, Short.MAX_VALUE)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(deg, javax.swing.GroupLayout.PREFERRED_SIZE, 80,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel15))

.addGap(18, 18, 18)))

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(indeg, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)

.addGroup(javax.swing.GroupLayout.Alignment.LEADING,
jPanel1Layout.createSequentialGroup()

.addComponent(tsided, javax.swing.GroupLayout.PREFERRED_SIZE, 70,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(35, 35, 35)

.addComponent(equalvar, javax.swing.GroupLayout.PREFERRED_SIZE, 70,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addComponent(unequalvar, javax.swing.GroupLayout.PREFERRED_SIZE, 70,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(javax.swing.GroupLayout.Alignment.LEADING,
jPanel1Layout.createSequentialGroup()

.addComponent(inout3, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(inout4, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE))))

.addGap(21, 21, 21))

);

jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jLabel21)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(equalvar, javax.swing.GroupLayout.PREFERRED_SIZE, 24,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(unequalvar, javax.swing.GroupLayout.PREFERRED_SIZE, 24,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(tsided, javax.swing.GroupLayout.PREFERRED_SIZE, 24,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(inout4, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(inout3, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel15))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(indeg, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(deg, javax.swing.GroupLayout.PREFERRED_SIZE, 24,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addContainerGap())

);
javax.swing.GroupLayout jInternalFrame1Layout = new
javax.swing.GroupLayout(jInternalFrame1.getContentPane());

jInternalFrame1.getContentPane().setLayout(jInternalFrame1Layout);

jInternalFrame1Layout.setHorizontalGroup(

jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jInternalFrame1Layout.createSequentialGroup()

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jPanel7, javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jPanel2, javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.PREFERRED_SIZE, 411, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jPanel1, javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)))

);

jInternalFrame1Layout.setVerticalGroup(

jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jInternalFrame1Layout.createSequentialGroup()

.addGap(11, 11, 11)

.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)


.addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(35, Short.MAX_VALUE))

);

jInternalFrame2.setTitle("Test Statistics");

jInternalFrame2.setToolTipText("Test Statistics of one and two population means");

jInternalFrame2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

jInternalFrame2.setFrameIcon(null);

jInternalFrame2.setVisible(true);

jLabel8.setFont(new java.awt.Font("Papyrus", 1, 12));

jLabel8.setText("t-Test of one Population Mean");

jLabel9.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel9.setText("Given from Col A");

jLabel10.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel10.setText("H0 and H1 Mean(u)");

outm.setBackground(new java.awt.Color(255, 255, 51));

outm.setEditable(false);

jButton1.setFont(new java.awt.Font("Century Gothic", 1, 11)); // NOI18N

jButton1.setText("unknown var");

jButton1.setToolTipText("unknown variance");
jButton1.setBorder(new
javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED, new java.awt.Color(255, 0,
102), new java.awt.Color(255, 0, 0), new java.awt.Color(0, 0, 255), new java.awt.Color(0, 0, 255)));

jButton1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton1ActionPerformed(evt);

});

jButton2.setFont(new java.awt.Font("Century Gothic", 1, 11)); // NOI18N

jButton2.setText("known var");

jButton2.setToolTipText("known variance");

jButton2.setBorder(new
javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED, new java.awt.Color(255, 0,
102), new java.awt.Color(255, 0, 0), new java.awt.Color(0, 0, 255), new java.awt.Color(0, 0, 255)));

jButton2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton2ActionPerformed(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)

.addComponent(jLabel9)

.addComponent(jLabel8)

.addGroup(jPanel3Layout.createSequentialGroup()

.addComponent(jLabel10)

.addGap(19, 19, 19)

.addComponent(inm, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(jPanel3Layout.createSequentialGroup()

.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 70,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(outm, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 70,


javax.swing.GroupLayout.PREFERRED_SIZE)))

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);

jPanel3Layout.setVerticalGroup(

jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel3Layout.createSequentialGroup()

.addGap(6, 6, 6)

.addComponent(jLabel8)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addComponent(jLabel9)

.addGap(44, 44, 44)


.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(inm, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel10))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(outm, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 24,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 24,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);

jLabel16.setFont(new java.awt.Font("Papyrus", 1, 12)); // NOI18N

jLabel16.setText("t-Test of two Population Means");

jLabel17.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel17.setText("H0 and H1 Mean(d)");

outtput.setBackground(new java.awt.Color(255, 255, 51));

outtput.setEditable(false);

outtput.setCaretColor(new java.awt.Color(255, 204, 51));

outtput.setDisabledTextColor(new java.awt.Color(204, 255, 102));

jButton6.setFont(new java.awt.Font("Century Gothic", 1, 11)); // NOI18N


jButton6.setText("equal var");

jButton6.setToolTipText("equal variance");

jButton6.setBorder(new
javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED, new java.awt.Color(255, 0,
102), new java.awt.Color(255, 0, 0), new java.awt.Color(0, 0, 204), new java.awt.Color(0, 0, 255)));

jButton6.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton6ActionPerformed(evt);

});

jLabel20.setFont(new java.awt.Font("Century Gothic", 0, 11));

jLabel20.setText("Given from Col A and Col B");

jButton7.setFont(new java.awt.Font("Century Gothic", 1, 11)); // NOI18N

jButton7.setText("unequal var");

jButton7.setToolTipText("unequal variance");

jButton7.setBorder(new
javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED, new java.awt.Color(255, 0,
102), new java.awt.Color(255, 0, 0), new java.awt.Color(0, 0, 204), new java.awt.Color(0, 0, 255)));

jButton7.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton7ActionPerformed(evt);

});

javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);


jPanel5.setLayout(jPanel5Layout);

jPanel5Layout.setHorizontalGroup(

jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel5Layout.createSequentialGroup()

.addContainerGap()

.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel5Layout.createSequentialGroup()

.addComponent(jLabel17)

.addGap(21, 21, 21)

.addComponent(inoutt, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addComponent(jLabel20)

.addComponent(jLabel16)

.addGroup(jPanel5Layout.createSequentialGroup()

.addComponent(jButton6, javax.swing.GroupLayout.PREFERRED_SIZE, 70,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(outtput, javax.swing.GroupLayout.PREFERRED_SIZE, 135,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addComponent(jButton7, javax.swing.GroupLayout.PREFERRED_SIZE, 70,


javax.swing.GroupLayout.PREFERRED_SIZE)))

.addContainerGap())

);

jPanel5Layout.setVerticalGroup(

jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jLabel16)

.addGap(15, 15, 15)

.addComponent(jLabel20)

.addGap(38, 38, 38)

.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(inoutt, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel17))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jButton6, javax.swing.GroupLayout.PREFERRED_SIZE, 24,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jButton7, javax.swing.GroupLayout.PREFERRED_SIZE, 24,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(outtput, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))

.addContainerGap(28, Short.MAX_VALUE))

);

Clear.setFont(new java.awt.Font("Century Gothic", 1, 11)); // NOI18N

Clear.setText("Clear");

Clear.setToolTipText("Clear all the text field");

Clear.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED,
new java.awt.Color(255, 0, 102), new java.awt.Color(255, 0, 0), new java.awt.Color(0, 0, 255), new
java.awt.Color(0, 0, 255)));

Clear.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
Clear.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

ClearActionPerformed(evt);

});

javax.swing.GroupLayout jInternalFrame2Layout = new


javax.swing.GroupLayout(jInternalFrame2.getContentPane());

jInternalFrame2.getContentPane().setLayout(jInternalFrame2Layout);

jInternalFrame2Layout.setHorizontalGroup(

jInternalFrame2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jInternalFrame2Layout.createSequentialGroup()

.addGroup(jInternalFrame2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jInternalFrame2Layout.createSequentialGroup()

.addContainerGap()

.addGroup(jInternalFrame2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jPanel5, javax.swing.GroupLayout.Alignment.TRAILING,
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)))

.addGroup(jInternalFrame2Layout.createSequentialGroup()

.addGap(22, 22, 22)

.addComponent(Clear, javax.swing.GroupLayout.PREFERRED_SIZE, 68,


javax.swing.GroupLayout.PREFERRED_SIZE)))

.addContainerGap())

);
jInternalFrame2Layout.setVerticalGroup(

jInternalFrame2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jInternalFrame2Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(30, 30, 30)

.addComponent(Clear, javax.swing.GroupLayout.PREFERRED_SIZE, 43,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(33, Short.MAX_VALUE))

);

jMenuBar1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

jMenu1.setText("Options");

jMenu1.setToolTipText("Click for more options");

jMenu1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

jMenuItem1.setText("What is AlStat.06 Turbo?");

jMenuItem1.setToolTipText("");

jMenuItem1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

jMenuItem1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem1ActionPerformed(evt);
}

});

jMenu1.add(jMenuItem1);

jMenuItem2.setText("About");

jMenuItem2.setToolTipText("About the program");

jMenuItem2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

jMenuItem2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem2ActionPerformed(evt);

});

jMenu1.add(jMenuItem2);

jMenuBar1.add(jMenu1);

setJMenuBar(jMenuBar1);

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()

.addComponent(jInternalFrame1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jInternalFrame2, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);

layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)

.addComponent(jInternalFrame2, javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jInternalFrame1, javax.swing.GroupLayout.Alignment.TRAILING))

.addContainerGap())

);

pack();

}// </editor-fold>//GEN-END:initComponents

private void ClearActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_ClearActionPerformed

this.insam.setText("");

this.insam1.setText("");

this.invar.setText("");

this.invar1.setText("");

this.inmea.setText("");

this.inmea1.setText("");
this.incon.setText("");

this.inout3.setText("");

this.inout4.setText("");

this.inoout.setText("");

this.inoout1.setText("");

this.indeg.setText("");

this.inm.setText("");

this.outm.setText("");

this.inoutt.setText("");

this.outtput.setText("");

}//GEN-LAST:event_ClearActionPerformed

private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jButton5ActionPerformed

double sam = 0; double mea;

double var; double con;

try{

sam = Double.parseDouble(this.insam.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

}
try{

mea = Double.parseDouble(

this.inmea.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

var = Double.parseDouble(

this.invar.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Standard Deviation of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

con = Double.parseDouble(

this.incon.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Confidence Interval",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

double out = (mea)-con*var/Math.sqrt(sam);


this.inoout.setText(" "+out);

double out2 = (mea)+con*var/Math.sqrt(sam);

this.inoout1.setText(" "+out2);

}//GEN-LAST:event_jButton5ActionPerformed

private void tsidedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_tsidedActionPerformed

double sam = 0; double sam1 = 0; double mea;

double mea1; double var; double var1;

double con;

try{

sam = Double.parseDouble(

this.insam.getText());

if(sam<30){

JOptionPane.showMessageDialog(this, "The Sample Size of Col A must be greater than\nor


equal to 30",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

}else{

sam = Double.parseDouble(

this.insam.getText());

} catch(Exception e){
JOptionPane.showMessageDialog(this, "Re-enter Sample Size of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

sam1 = Double.parseDouble(

this.insam1.getText());

if(sam1<30){

JOptionPane.showMessageDialog(this, "The Sample Size of Col B must be greater than\nor


equal to 30",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

}else{

sam1 = Double.parseDouble(

this.insam1.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Size of Col B",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

mea = Double.parseDouble(

this.inmea.getText());

} catch(Exception e){
JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

mea1 = Double.parseDouble(

this.inmea1.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col B",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

var = Double.parseDouble(

this.invar.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Standard Deviation of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

var1 = Double.parseDouble(

this.invar1.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Standard Deviation of Col B",


"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

con = Double.parseDouble(

this.incon.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Confidence Interval",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

}if(sam<30){

this.inout3.setText("");

this.inout4.setText("");

}else if(sam1<30){

this.inout3.setText("");

this.inout4.setText("");

}else if((sam<30)&&(sam1<30)){

this.inout3.setText("");

this.inout4.setText("");

}else{

double out3 = (mea-mea1) - con*Math.sqrt(Math.pow(var,2)/sam + Math.pow(var1,2)/sam1);

this.inout3.setText(" "+out3);

double out4 = (mea-mea1) + con*Math.sqrt(Math.pow(var,2)/sam + Math.pow(var1,2)/sam1);

this.inout4.setText(" "+out4);
}

}//GEN-LAST:event_tsidedActionPerformed

private void equalvarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_equalvarActionPerformed

double sam = 0; double sam1 = 0; double mea;

double mea1; double var; double var1;

double con;

try{

sam = Double.parseDouble(

this.insam.getText());

if(sam>29){

JOptionPane.showMessageDialog(this, "The Sample Size of Col A must be less than 30",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

}else{

sam = Double.parseDouble(

this.insam.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Size of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

}
try{

sam1 = Double.parseDouble(

this.insam1.getText());

if(sam1>29){

JOptionPane.showMessageDialog(this, "The Sample Size of Col B must be less than 30",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

}else{

sam1 = Double.parseDouble(

this.insam1.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Size of Col B",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

mea = Double.parseDouble(

this.inmea.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

}
try{

mea1 = Double.parseDouble(

this.inmea1.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col B",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

var = Double.parseDouble(

this.invar.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Standard Deviation of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

var1 = Double.parseDouble(

this.invar1.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Standard Deviation of Col B",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{
con = Double.parseDouble(

this.incon.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Confidence Interval",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

}if(sam>29){

this.inout3.setText("");

this.inout4.setText("");

}else if(sam1>29){

this.inout3.setText("");

this.inout4.setText("");

}else if((sam>29)&&(sam1>29)){

this.inout3.setText("");

this.inout4.setText("");

}else{

double out3 = (mea-mea1) - con*(Math.sqrt(((sam-1)*Math.pow(var,2)+(sam1-


1)*Math.pow(var1,2))/(sam+sam1-2)))*Math.sqrt((1/sam)+(1/sam1));

this.inout3.setText(" "+out3);

double out4 = (mea-mea1) + con*(Math.sqrt(((sam-1)*Math.pow(var,2)+(sam1-


1)*Math.pow(var1,2))/(sam+sam1-2)))*Math.sqrt((1/sam)+(1/sam1));

this.inout4.setText(" "+out4);

}//GEN-LAST:event_equalvarActionPerformed
private void unequalvarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-
FIRST:event_unequalvarActionPerformed

double sam = 0; double sam1 = 0; double mea;

double mea1; double var; double var1;

double con;

try{

sam = Double.parseDouble(

this.insam.getText());

if(sam>29){

JOptionPane.showMessageDialog(this, "The Sample Size of Col A must be less than 30",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

}else{

sam = Double.parseDouble(

this.insam.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Size of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

sam1 = Double.parseDouble(
this.insam1.getText());

if(sam1>29){

JOptionPane.showMessageDialog(this, "The Sample Size of Col B must be less than 30",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

}else{

sam1 = Double.parseDouble(

this.insam1.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Size of Col B",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

mea = Double.parseDouble(

this.inmea.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

mea1 = Double.parseDouble(

this.inmea1.getText());
} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col B",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

var = Double.parseDouble(

this.invar.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Standard Deviation of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

var1 = Double.parseDouble(

this.invar1.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Standard Deviation of Col B",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

con = Double.parseDouble(

this.incon.getText());

} catch(Exception e){
JOptionPane.showMessageDialog(this, "Re-enter Confidence Interval",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

}if(sam>29){

this.inout3.setText("");

this.inout4.setText("");

}else if(sam1>29){

this.inout3.setText("");

this.inout4.setText("");

}else{

double out3 = (mea-mea1)-con*Math.sqrt((Math.pow(var,2)/sam)+(Math.pow(var1,2)/sam1));

this.inout3.setText(" "+out3);

double out4 = (mea-mea1)+con*Math.sqrt((Math.pow(var,2)/sam)+(Math.pow(var1,2)/sam1));

this.inout4.setText(" "+out4);

}//GEN-LAST:event_unequalvarActionPerformed

private void degActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_degActionPerformed

double sam = 0; double sam1 = 0; double mea;

double mea1; double var; double var1;

double con;

try{
sam = Double.parseDouble(

this.insam.getText());

if(sam>29){

JOptionPane.showMessageDialog(this, "The Sample Size of Col A must be less than 30",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

}else{

sam = Double.parseDouble(

this.insam.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Size of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

sam1 = Double.parseDouble(

this.insam1.getText());

if(sam1>29){

JOptionPane.showMessageDialog(this, "The Sample Size of Col B must be less than 30",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

}else{

sam1 = Double.parseDouble(

this.insam1.getText());
}

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Size of Col B",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

mea = Double.parseDouble(

this.inmea.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

mea1 = Double.parseDouble(

this.inmea1.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col B",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

var = Double.parseDouble(
this.invar.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Standard Deviation of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

var1 = Double.parseDouble(

this.invar1.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Standard Deviation of Col B",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

if(sam>29){

this.indeg.setText("");

}else{

double out =
(Math.pow(((Math.pow(var,2)/sam)+(Math.pow(var1,2)/sam1)),2))/(Math.pow((Math.pow(var,2)/sam),
2)/(sam-1))+

(Math.pow((Math.pow(var1,2)/sam1),2)/(sam1-1));

this.indeg.setText(" "+out);

}//GEN-LAST:event_degActionPerformed
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-
FIRST:event_jButton3ActionPerformed

double sam = 0; double mea;

double var; double con;

try{

sam = Double.parseDouble(this.insam.getText());

if(sam < 30){

JOptionPane.showMessageDialog(this, "The Sample Size of Col A must be greater than\nor


equal to 30",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

else{

sam = Double.parseDouble(this.insam.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

mea = Double.parseDouble(
this.inmea.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

var = Double.parseDouble(

this.invar.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Standard Deviation of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

con = Double.parseDouble(

this.incon.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Confidence Interval",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

} if(sam<30){

this.inoout.setText("");

this.inoout1.setText("");

}else{
double out = (mea)-con*var/Math.sqrt(sam);

this.inoout.setText(" "+out);

double out2 = (mea)+con*var/Math.sqrt(sam);

this.inoout1.setText(" "+out2);

}//GEN-LAST:event_jButton3ActionPerformed

private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jButton4ActionPerformed

double sam = 0; double mea;

double var; double con;

try{

sam = Double.parseDouble(this.insam.getText());

if(sam > 29){

JOptionPane.showMessageDialog(this, "The Sample Size of Col A must be less than 30",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

else{

sam = Double.parseDouble(this.insam.getText());

} catch(Exception e){
JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

mea = Double.parseDouble(

this.inmea.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

var = Double.parseDouble(

this.invar.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Standard Deviation of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

con = Double.parseDouble(

this.incon.getText());

} catch(Exception e){
JOptionPane.showMessageDialog(this, "Re-enter Confidence Interval",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

} if(sam>29){

this.inoout.setText("");

this.inoout1.setText("");

}else{

double out = (mea)-con*var/Math.sqrt(sam);

this.inoout.setText(" "+out);

double out2 = (mea)+con*var/Math.sqrt(sam);

this.inoout1.setText(" "+out2);

}//GEN-LAST:event_jButton4ActionPerformed

private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jMenuItem1ActionPerformed

WhatTurbo al = new WhatTurbo();

al.setVisible(true);

}//GEN-LAST:event_jMenuItem1ActionPerformed

private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jMenuItem2ActionPerformed

WelAbout al = new WelAbout();

al.setVisible(true);

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

double sam = 0; double mea;

double var; double m;

double con;

try{

sam = Double.parseDouble(

this.insam.getText());

if(sam>29){

JOptionPane.showMessageDialog(this, "The Sample Size of Col A must be less than 30",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

}else{

sam = Double.parseDouble(

this.insam.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Size of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

mea = Double.parseDouble(

this.inmea.getText());
} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

var = Double.parseDouble(

this.invar.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Standard Deviation of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

m = Double.parseDouble(

this.inm.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter H0 and H1 Mean(u)",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

}if(sam>29){

this.outm.setText("");

}else{

double outmm = (mea - m)/(var/Math.sqrt(sam));

this.outm.setText(" "+outmm);
}

}//GEN-LAST:event_jButton1ActionPerformed

private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jButton6ActionPerformed

double sam; double sam1; double mea;

double mea1; double var; double var1;

double con; double outt;

try{

sam = Double.parseDouble(

this.insam.getText());

if(sam>29){

JOptionPane.showMessageDialog(this, "The Sample Size of Col A must be less than 30",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

}else{

sam = Double.parseDouble(

this.insam.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Size of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{
sam1 = Double.parseDouble(

this.insam1.getText());

if(sam1>29){

JOptionPane.showMessageDialog(this, "The Sample Size of Col B must be less than 30",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

}else{

sam1 = Double.parseDouble(

this.insam1.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Size of Col B",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

mea = Double.parseDouble(

this.inmea.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{
mea1 = Double.parseDouble(

this.inmea1.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col B",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

var = Double.parseDouble(

this.invar.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Standard Deviation of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

var1 = Double.parseDouble(

this.invar1.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Standard Deviation of Col B",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

outt = Double.parseDouble(
this.inoutt.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter H0 and H1 Mean(d)",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

}if(sam>29){

this.outtput.setText("");

}else if(sam1>29){

this.outtput.setText("");

}else if((sam>29) && (sam1>29)){

this.outtput.setText("");

}else{

double outputt = ((mea-mea1)-outt)/((((Math.sqrt(((sam-1)*Math.pow(var,2)+(sam1-


1)*Math.pow(var1,2))/(sam+sam1-2)))*Math.sqrt((1/sam)+(1/sam1)))));

this.outtput.setText(" "+outputt);

}//GEN-LAST:event_jButton6ActionPerformed

private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jButton7ActionPerformed

double sam; double sam1; double mea;

double mea1; double var; double var1;

double con; double outt;

try{

sam = Double.parseDouble(
this.insam.getText());

if(sam>29){

JOptionPane.showMessageDialog(this, "The Sample Size of Col A must be less than 30",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

}else{

sam = Double.parseDouble(

this.insam.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Size of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

sam1 = Double.parseDouble(

this.insam1.getText());

if(sam1>29){

JOptionPane.showMessageDialog(this, "The Sample Size of Col B must be less than 30",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

}else{

sam1 = Double.parseDouble(

this.insam1.getText());

}
} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Size of Col B",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

mea = Double.parseDouble(

this.inmea.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

mea1 = Double.parseDouble(

this.inmea1.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col B",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

var = Double.parseDouble(

this.invar.getText());
} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Standard Deviation of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

var1 = Double.parseDouble(

this.invar1.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Standard Deviation of Col B",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

outt = Double.parseDouble(

this.inoutt.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter H0 and H1 Mean(d)",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

}if(sam>29){

this.outtput.setText("");

}else if(sam1>29){

this.outtput.setText("");

}else if((sam>29) && (sam1>29)){


this.outtput.setText("");

}else{

double outputt = ((mea-mea1)-outt)/Math.sqrt((Math.pow(var,2)/sam)+(Math.pow(var1,2)/sam1));

this.outtput.setText(" "+outputt);

}//GEN-LAST:event_jButton7ActionPerformed

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jButton2ActionPerformed

double sam = 0; double mea;

double var; double m;

double con;

try{

sam = Double.parseDouble(

this.insam.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Sample Size of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

mea = Double.parseDouble(

this.inmea.getText());

} catch(Exception e){
JOptionPane.showMessageDialog(this, "Re-enter Sample Mean of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

var = Double.parseDouble(

this.invar.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter Standard Deviation of Col A",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

try{

m = Double.parseDouble(

this.inm.getText());

} catch(Exception e){

JOptionPane.showMessageDialog(this, "Re-enter H0 and H1 Mean(u)",

"Invalid Input", JOptionPane.ERROR_MESSAGE);

return;

double outmm = (mea - m)/(var/Math.sqrt(sam));

this.outm.setText(" "+outmm);

}//GEN-LAST:event_jButton2ActionPerformed
/**

* @param args the command line arguments

*/

public static void main(String args[]) {

java.awt.EventQueue.invokeLater(new Runnable() {

public void run() {

new TurboProg2().setVisible(true);

});

// Variables declaration - do not modify//GEN-BEGIN:variables

private javax.swing.JButton Clear;

private javax.swing.JButton deg;

private javax.swing.JButton equalvar;

private javax.swing.JTextField incon;

private javax.swing.JTextField indeg;

private javax.swing.JTextField inm;

private javax.swing.JTextField inmea;

private javax.swing.JTextField inmea1;

private javax.swing.JTextField inoout;

private javax.swing.JTextField inoout1;

private javax.swing.JTextField inout3;

private javax.swing.JTextField inout4;

private javax.swing.JTextField inoutt;


private javax.swing.JTextField insam;

private javax.swing.JTextField insam1;

private javax.swing.JTextField invar;

private javax.swing.JTextField invar1;

private javax.swing.JButton jButton1;

private javax.swing.JButton jButton2;

private javax.swing.JButton jButton3;

private javax.swing.JButton jButton4;

private javax.swing.JButton jButton5;

private javax.swing.JButton jButton6;

private javax.swing.JButton jButton7;

private javax.swing.JDialog jDialog1;

private javax.swing.JInternalFrame jInternalFrame1;

private javax.swing.JInternalFrame jInternalFrame2;

private javax.swing.JLabel jLabel1;

private javax.swing.JLabel jLabel10;

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 jLabel3;

private javax.swing.JLabel jLabel4;

private javax.swing.JLabel jLabel5;

private javax.swing.JLabel jLabel6;

private javax.swing.JLabel jLabel7;

private javax.swing.JLabel jLabel8;

private javax.swing.JLabel jLabel9;

private javax.swing.JMenu jMenu1;

private javax.swing.JMenuBar jMenuBar1;

private javax.swing.JMenuItem jMenuItem1;

private javax.swing.JMenuItem jMenuItem2;

private javax.swing.JPanel jPanel1;

private javax.swing.JPanel jPanel2;

private javax.swing.JPanel jPanel3;

private javax.swing.JPanel jPanel5;

private javax.swing.JPanel jPanel7;

private javax.swing.JPopupMenu jPopupMenu1;

private javax.swing.JTextField outm;

private javax.swing.JTextField outtput;

private javax.swing.JButton tsided;

private javax.swing.JButton unequalvar;

// End of variables declaration//GEN-END:variables

}
Part 11
of the
Program
Class Name: How.java
/*

* To change this template, choose Tools | Templates

* and open the template in the editor.

*/

/*

* How.java

* Created on 03 27, 11, 10:14:22 PM

*/

/**

* @author Al-Ahmadgaid B. Asaad

*/

public class How extends javax.swing.JFrame {

/** Creates new form How */

public How() {

initComponents();

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

jInternalFrame1 = new javax.swing.JInternalFrame();

jLabel1 = new javax.swing.JLabel();

jLabel2 = new javax.swing.JLabel();

jLabel3 = new javax.swing.JLabel();

jLabel4 = new javax.swing.JLabel();

jLabel5 = new javax.swing.JLabel();

jLabel6 = new javax.swing.JLabel();

jLabel7 = new javax.swing.JLabel();

setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

setTitle("Help");

setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

setResizable(false);

jInternalFrame1.setToolTipText("Read carefully");

jInternalFrame1.setFrameIcon(null);

jInternalFrame1.setVisible(true);

jLabel1.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N


jLabel1.setText("Entering a sample size will help the program determine what");

jLabel2.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N

jLabel2.setText("case you’ll use, if both sample sizes you entered is greater than ");

jLabel3.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N

jLabel3.setText("or equal to 30, then you’ll proceed to case 2. However, if it is");

jLabel4.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N

jLabel4.setText("less than 30 program will proceed you to either case 3 or");

jLabel5.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N

jLabel5.setText("case 4. Note that it is not valid entering a value that is greater");

jLabel6.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N

jLabel6.setText("than or equal to 30 on the first text field and less than 30 on the");

jLabel7.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N

jLabel7.setText("other and vice versa.");

javax.swing.GroupLayout jInternalFrame1Layout = new


javax.swing.GroupLayout(jInternalFrame1.getContentPane());

jInternalFrame1.getContentPane().setLayout(jInternalFrame1Layout);

jInternalFrame1Layout.setHorizontalGroup(

jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jInternalFrame1Layout.createSequentialGroup()
.addContainerGap()

.addGroup(jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel1)

.addComponent(jLabel2)

.addComponent(jLabel3)

.addComponent(jLabel4)

.addComponent(jLabel5)

.addComponent(jLabel6)

.addComponent(jLabel7))

.addContainerGap(13, Short.MAX_VALUE))

);

jInternalFrame1Layout.setVerticalGroup(

jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jInternalFrame1Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jLabel1)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jLabel2)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jLabel3)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jLabel4)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jLabel5)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel6)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jLabel7)

.addContainerGap(27, Short.MAX_VALUE))

);

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()

.addComponent(jInternalFrame1)

.addContainerGap())

);

layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addComponent(jInternalFrame1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap())

);

pack();

}// </editor-fold>//GEN-END:initComponents
/**

* @param args the command line arguments

*/

public static void main(String args[]) {

java.awt.EventQueue.invokeLater(new Runnable() {

public void run() {

new How().setVisible(true);

});

// Variables declaration - do not modify//GEN-BEGIN:variables

private javax.swing.JInternalFrame jInternalFrame1;

private javax.swing.JLabel jLabel1;

private javax.swing.JLabel jLabel2;

private javax.swing.JLabel jLabel3;

private javax.swing.JLabel jLabel4;

private javax.swing.JLabel jLabel5;

private javax.swing.JLabel jLabel6;

private javax.swing.JLabel jLabel7;

// End of variables declaration//GEN-END:variables

You might also like