import javax.swing.JOptionPane;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * NewJFrame.java
 *
 * Created on Apr 14, 2010, 8:00:15 PM
 */

/**
 *
 * @author John Harley
 */
public class NewJFrame extends javax.swing.JFrame {
        public static String userName = "";
	    public static String Height = "";
	    public static String Age = "";
        public static String heartDisease = "";
        public static String Meal = "";
        public static String Weight = "";
        public static String Sex = "";
        public static String Diabetes = "";
        
        /** Creates new form NewJFrame */
        public NewJFrame() {
            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">
        private void initComponents() {

            buttonGroup1 = new javax.swing.ButtonGroup();
            buttonGroup2 = new javax.swing.ButtonGroup();
            buttonGroup3 = new javax.swing.ButtonGroup();
            buttonGroup4 = new javax.swing.ButtonGroup();
            submitButton = new javax.swing.JButton();
            jLabel1 = new javax.swing.JLabel();
            jLabel2 = new javax.swing.JLabel();
            jLabel4 = new javax.swing.JLabel();
            jLabel3 = new javax.swing.JLabel();
            HeightText = new javax.swing.JTextField();
            AgeText = new javax.swing.JTextField();
            userNameText = new javax.swing.JTextField();
            WeightText = new javax.swing.JTextField();
            jLabel5 = 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();
            bloodSug = new javax.swing.JLabel();
            jLabel11 = new javax.swing.JLabel();
            jLabel12 = new javax.swing.JLabel();
            jLabel13 = new javax.swing.JLabel();
            systolic = new javax.swing.JLabel();
            diastolic = new javax.swing.JLabel();
            pulse = new javax.swing.JLabel();
            spo2 = new javax.swing.JLabel();
            bloodSugar = new javax.swing.JLabel();
            jRadioButton1 = new javax.swing.JRadioButton();
            jRadioButton2 = new javax.swing.JRadioButton();
            jRadioButton3 = new javax.swing.JRadioButton();
            jRadioButton4 = new javax.swing.JRadioButton();
            jRadioButton5 = new javax.swing.JRadioButton();
            jRadioButton6 = new javax.swing.JRadioButton();
            jRadioButton7 = new javax.swing.JRadioButton();
            jRadioButton8 = new javax.swing.JRadioButton();
            jRadioButton9 = new javax.swing.JRadioButton();
            jRadioButton10 = new javax.swing.JRadioButton();
            jLabel14 = new javax.swing.JLabel();
            jLabel16 = new javax.swing.JLabel();

            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            setTitle("General Purpose Health Monitor");
            setBackground(new java.awt.Color(153, 153, 153));
            setForeground(java.awt.Color.white);

            submitButton.setFont(new java.awt.Font("Lucida Grande", 1, 13));
            submitButton.setForeground(new java.awt.Color(255, 0, 0));
            submitButton.setText("Submit");
            submitButton.setToolTipText("Submit Information");
            submitButton.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    submitButtonActionPerformed(evt);
                }
            });

            jLabel1.setText("Enter Your Username");

            jLabel2.setText("Enter Your Age (in years)");

            jLabel3.setText("Enter Your Height (in inches)");

            HeightText.setBackground(new java.awt.Color(204, 204, 204));

            AgeText.setBackground(new java.awt.Color(204, 204, 204));

            userNameText.setBackground(new java.awt.Color(204, 204, 204));

            WeightText.setBackground(new java.awt.Color(204, 204, 204));
            WeightText.setToolTipText("Enter a weight");

            jLabel5.setText("Enter Your Weight (in pounds)");
            jLabel5.setToolTipText("Enter your weight");

            jLabel6.setText("Enter your sex");
            jLabel6.setToolTipText("Enter sex");

            jLabel7.setText("Diabetes?");
            jLabel7.setToolTipText("High Blood Pressure?");

            jLabel8.setText("Heart Disease?");
            jLabel8.setToolTipText("Heart Disease?");

            jLabel9.setText("Meal");
            jLabel9.setToolTipText("Meal?");

            jLabel10.setFont(new java.awt.Font("Times New Roman", 1, 18));
            jLabel10.setText("SPO2 Reading");

            bloodSug.setFont(new java.awt.Font("Times New Roman", 1, 18));
            bloodSug.setText("Blood Sugar Reading");

            jLabel11.setFont(new java.awt.Font("Times New Roman", 1, 18));
            jLabel11.setText("Systolic");

            jLabel12.setFont(new java.awt.Font("Times New Roman", 1, 18));
            jLabel12.setText("Diastolic");

            jLabel13.setFont(new java.awt.Font("Times New Roman", 1, 18));
            jLabel13.setText("Pulse");

            systolic.setFont(new java.awt.Font("Synchro LET", 1, 36));
            systolic.setForeground(new java.awt.Color(204, 0, 0));
            systolic.setText(".");

            diastolic.setFont(new java.awt.Font("Synchro LET", 1, 36));
            diastolic.setForeground(new java.awt.Color(204, 0, 0));
            diastolic.setText(".");

            pulse.setFont(new java.awt.Font("Synchro LET", 1, 36));
            pulse.setForeground(new java.awt.Color(204, 0, 0));
            pulse.setText(".");

            spo2.setFont(new java.awt.Font("Synchro LET", 1, 36));
            spo2.setForeground(new java.awt.Color(204, 0, 0));
            spo2.setText(".");

            bloodSugar.setFont(new java.awt.Font("Synchro LET", 1, 36));
            bloodSugar.setForeground(new java.awt.Color(204, 0, 0));
            bloodSugar.setText(".");

            buttonGroup1.add(jRadioButton1);
            jRadioButton1.setText("Male");
            jRadioButton1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jRadioButton1ActionPerformed(evt);
                }
            });

            buttonGroup1.add(jRadioButton2);
            jRadioButton2.setText("Female");
            jRadioButton2.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jRadioButton2ActionPerformed(evt);
                }
            });

            buttonGroup2.add(jRadioButton3);
            jRadioButton3.setText("normal");
            jRadioButton3.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jRadioButton3ActionPerformed(evt);
                }
            });

            buttonGroup2.add(jRadioButton4);
            jRadioButton4.setText("prediabetic");
            jRadioButton4.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jRadioButton4ActionPerformed(evt);
                }
            });

            buttonGroup2.add(jRadioButton5);
            jRadioButton5.setText("diabetic");
            jRadioButton5.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jRadioButton5ActionPerformed(evt);
                }
            });

            buttonGroup3.add(jRadioButton6);
            jRadioButton6.setText("yes");
            jRadioButton6.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jRadioButton6ActionPerformed(evt);
                }
            });

            buttonGroup3.add(jRadioButton7);
            jRadioButton7.setText("no");
            jRadioButton7.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jRadioButton7ActionPerformed(evt);
                }
            });

            buttonGroup4.add(jRadioButton8);
            jRadioButton8.setText("fasting");
            jRadioButton8.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jRadioButton8ActionPerformed(evt);
                }
            });

            buttonGroup4.add(jRadioButton9);
            jRadioButton9.setText("before");
            jRadioButton9.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jRadioButton9ActionPerformed(evt);
                }
            });

            buttonGroup4.add(jRadioButton10);
            jRadioButton10.setText("after");
            jRadioButton10.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jRadioButton10ActionPerformed(evt);
                }
            });

            jLabel14.setFont(new java.awt.Font("Times New Roman", 2, 36));
            jLabel14.setForeground(new java.awt.Color(0, 0, 153));
            jLabel14.setText("General Purpose Health Monitor");

            jLabel16.setFont(new java.awt.Font("Lucida Grande", 2, 13));
            jLabel16.setText("© John Harley, Ryan Brashear 2010");

            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(layout.createSequentialGroup()
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(layout.createSequentialGroup()
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 196, Short.MAX_VALUE)
                                                .addComponent(jLabel2))
                                            .addComponent(jLabel3))
                                        .addComponent(jLabel5))
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addGroup(layout.createSequentialGroup()
                                            .addGap(102, 102, 102)
                                            .addComponent(jLabel4))
                                        .addGroup(layout.createSequentialGroup()
                                            .addGap(29, 29, 29)
                                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                                .addComponent(WeightText, javax.swing.GroupLayout.DEFAULT_SIZE, 168, Short.MAX_VALUE)
                                                .addComponent(AgeText)
                                                .addComponent(userNameText, javax.swing.GroupLayout.DEFAULT_SIZE, 165, Short.MAX_VALUE)
                                                .addComponent(HeightText))))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 191, Short.MAX_VALUE))
                                .addGroup(layout.createSequentialGroup()
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addGroup(layout.createSequentialGroup()
                                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jLabel7))
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                                .addComponent(jRadioButton3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                                .addComponent(jRadioButton2, javax.swing.GroupLayout.DEFAULT_SIZE, 76, Short.MAX_VALUE))
                                            .addGap(29, 29, 29)
                                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                .addComponent(jRadioButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jRadioButton5)))
                                        .addGroup(layout.createSequentialGroup()
                                            .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                .addComponent(jRadioButton8, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jRadioButton6)))
                                        .addGroup(layout.createSequentialGroup()
                                            .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(162, 162, 162)
                                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                .addComponent(jRadioButton7, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jRadioButton9))))
                                    .addGap(28, 28, 28)
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(jRadioButton4)
                                        .addComponent(jRadioButton10))
                                    .addGap(166, 166, 166)))
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(layout.createSequentialGroup()
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jLabel11))
                                            .addGap(103, 103, 103))
                                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                                            .addComponent(spo2, javax.swing.GroupLayout.PREFERRED_SIZE, 151, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))
                                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                .addComponent(jLabel12)
                                                .addComponent(systolic, javax.swing.GroupLayout.DEFAULT_SIZE, 296, Short.MAX_VALUE)
                                                .addComponent(diastolic, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                            .addComponent(bloodSugar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(pulse, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                        .addComponent(bloodSug, javax.swing.GroupLayout.PREFERRED_SIZE, 181, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGap(34, 34, 34))
                                .addGroup(layout.createSequentialGroup()
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, 499, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addContainerGap())))
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(jLabel16)
                                .addComponent(submitButton, javax.swing.GroupLayout.PREFERRED_SIZE, 222, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGap(87, 87, 87))))
            );
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(layout.createSequentialGroup()
                            .addContainerGap()
                            .addComponent(jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(layout.createSequentialGroup()
                                    .addGap(58, 58, 58)
                                    .addComponent(jLabel10, javax.swing.GroupLayout.DEFAULT_SIZE, 62, Short.MAX_VALUE))
                                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                    .addComponent(bloodSug)
                                    .addGap(3, 3, 3)))
                            .addGap(52, 52, 52)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel1)
                                .addComponent(userNameText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(layout.createSequentialGroup()
                                    .addGap(9, 9, 9)
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                        .addComponent(jLabel2)
                                        .addComponent(AgeText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                        .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(HeightText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                .addGroup(layout.createSequentialGroup()
                                    .addGap(18, 18, 18)
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                        .addComponent(jLabel11)
                                        .addComponent(jLabel13))))
                            .addGap(12, 12, 12)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel5)
                                .addComponent(WeightText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGap(18, 18, 18)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel6)
                                .addComponent(jRadioButton2)
                                .addComponent(jRadioButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGap(18, 18, 18)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel7)
                                .addComponent(jRadioButton3)
                                .addComponent(jLabel12)
                                .addComponent(jRadioButton5)
                                .addComponent(jRadioButton4)))
                        .addGroup(layout.createSequentialGroup()
                            .addGap(161, 161, 161)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(spo2)
                                .addComponent(bloodSugar))
                            .addGap(79, 79, 79)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(systolic)
                                .addComponent(pulse, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 89, Short.MAX_VALUE)))
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(layout.createSequentialGroup()
                            .addGap(18, 18, 18)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel8)
                                .addComponent(jRadioButton6)
                                .addComponent(jRadioButton7))
                            .addGap(18, 18, 18)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jRadioButton8)
                                .addComponent(jRadioButton9)
                                .addComponent(jRadioButton10)))
                        .addGroup(layout.createSequentialGroup()
                            .addGap(28, 28, 28)
                            .addComponent(diastolic, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(37, 37, 37)
                            .addComponent(jLabel4)))
                    .addGap(8, 8, 8)
                    .addComponent(submitButton)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jLabel16)
                    .addGap(22, 22, 22))
            );

            pack();
        }// </editor-fold>

        private void submitButtonActionPerformed(java.awt.event.ActionEvent evt) {                                             
           

            //username
            try
            {
                userName = this.userNameText.getText();
            }
            catch (Exception e)
            {
                JOptionPane.showMessageDialog(this,"Incorrect user name","Error", JOptionPane.ERROR_MESSAGE);

            return;
            }
            //ask for height
            try
            {
                Height = this.HeightText.getText();
            }
            catch (Exception e)
            {
                JOptionPane.showMessageDialog(this,"Incorrect height","Error", JOptionPane.ERROR_MESSAGE);

            return;
            //ask for age
            }
            try
            {
                Age = this.AgeText.getText();
            }
            catch (Exception e)
            {
                JOptionPane.showMessageDialog(this,"Incorrect age","Error", JOptionPane.ERROR_MESSAGE);

            return;
            }

             //Weight;
            try
            {
                Weight = this.WeightText.getText();
            }
            catch (Exception e)
            {
                JOptionPane.showMessageDialog(this,"Incorrect Weight","Error", JOptionPane.ERROR_MESSAGE);

            return;
            }
    /*
            //String Sex;
            try
            {
                Sex = this.SexText.getText();
            }
            catch (Exception e)
            {
                JOptionPane.showMessageDialog(this,"Incorrect Sex","Error", JOptionPane.ERROR_MESSAGE);

            return;
            }

            //String Diabetes;
            try
            {
               Diabetes = this.DiabetesText.getText();
            }
            catch (Exception e)
            {
                JOptionPane.showMessageDialog(this,"Incorrect diabetes","Error", JOptionPane.ERROR_MESSAGE);

            return;
            }

            //Meal;
            try
            {
                Meal = this.MealText.getText();
            }
            catch (Exception e)
            {
                JOptionPane.showMessageDialog(this,"Incorrect Meal","Error", JOptionPane.ERROR_MESSAGE);

            return;
            }

            //heartDisease;
            try
            {
                heartDisease = this.heartDiseaseText.getText();
            }
            catch (Exception e)
            {
                JOptionPane.showMessageDialog(this,"Incorrect heartDisease","Error", JOptionPane.ERROR_MESSAGE);

            return;
            }

           */

        }                                            

        private void jRadioButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                              
            Sex = "male";
        }                                             

        private void jRadioButton2ActionPerformed(java.awt.event.ActionEvent evt) {                                              
            Sex = "female";
        }                                             

        private void jRadioButton3ActionPerformed(java.awt.event.ActionEvent evt) {                                              
            Diabetes = "normal";
        }                                             

        private void jRadioButton4ActionPerformed(java.awt.event.ActionEvent evt) {                                              
            Diabetes = "prediabetic";
        }                                             

        private void jRadioButton5ActionPerformed(java.awt.event.ActionEvent evt) {                                              
            Diabetes = "diabetic";
        }                                             

        private void jRadioButton6ActionPerformed(java.awt.event.ActionEvent evt) {                                              
            heartDisease = "yes";
        }                                             

        private void jRadioButton7ActionPerformed(java.awt.event.ActionEvent evt) {                                              
            heartDisease = "no";
        }                                             

        private void jRadioButton8ActionPerformed(java.awt.event.ActionEvent evt) {                                              
            Meal = "fasting";
        }                                             

        private void jRadioButton9ActionPerformed(java.awt.event.ActionEvent evt) {                                              
            Meal = "before";
        }                                             

        private void jRadioButton10ActionPerformed(java.awt.event.ActionEvent evt) {                                               
            Meal = "after";
        }                                              

        /**
        * @param args the command line arguments
        */
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new NewJFrame().setVisible(true);
                }
            });
        }

        // Variables declaration - do not modify
        private javax.swing.JTextField AgeText;
        private javax.swing.JTextField HeightText;
        private javax.swing.JTextField WeightText;
        private javax.swing.JLabel bloodSug;
        public static javax.swing.JLabel bloodSugar;
        private javax.swing.ButtonGroup buttonGroup1;
        private javax.swing.ButtonGroup buttonGroup2;
        private javax.swing.ButtonGroup buttonGroup3;
        private javax.swing.ButtonGroup buttonGroup4;
        public static javax.swing.JLabel diastolic;
        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 jLabel16;
        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.JRadioButton jRadioButton1;
        private javax.swing.JRadioButton jRadioButton10;
        private javax.swing.JRadioButton jRadioButton2;
        private javax.swing.JRadioButton jRadioButton3;
        private javax.swing.JRadioButton jRadioButton4;
        private javax.swing.JRadioButton jRadioButton5;
        private javax.swing.JRadioButton jRadioButton6;
        private javax.swing.JRadioButton jRadioButton7;
        private javax.swing.JRadioButton jRadioButton8;
        private javax.swing.JRadioButton jRadioButton9;
        public static javax.swing.JLabel pulse;
        public static javax.swing.JLabel spo2;
        private javax.swing.JButton submitButton;
        public static javax.swing.JLabel systolic;
        private javax.swing.JTextField userNameText;
        // End of variables declaration

    }


