private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed
    // Enrollment :: Enroll Button Pressed
        
        int radio = -1;
        if (jRadioButton1.isSelected()){
            radio = 0;
        } else if (jRadioButton2.isSelected()){
            radio = 1;
        } else if (jRadioButton3.isSelected()){
            radio = 2;
        } else {
            JOptionPane.showMessageDialog(rootPane, "Please select a semester.", "No Semester Selected", JOptionPane.WARNING_MESSAGE);
            return;
        }
        
        if (jComboBox1.getSelectedIndex() == 0)
        {
            // No subject was chosen
            JOptionPane.showMessageDialog(rootPane, "Please select a course subject.", "No Subject Selected", JOptionPane.WARNING_MESSAGE);
            return;
        }
        
        JCheckBox cb = (JCheckBox)jPanel6.getComponent(0);
        JCheckBox cb1 = (JCheckBox)jPanel6.getComponent(1);
        int n;
        
        String cbTitle = cb.getText();
        String cb1Title = cb.getText();
        // Evaluate which item was picked
        String selected = jComboBox1.getSelectedItem().toString();
        
        // Evaluate which radiobutton was clicked
        
        if (radio == 0){ // Fall 2013
            //
            if (cb.isSelected() && cb1.isSelected()){ // Selected both classes
                n = JOptionPane.showConfirmDialog(rootPane, "You have elected to enroll in the following classes:\n" + cbTitle + "\n" + cb1Title + "\n\n\nAre you sure you want to do this?", "Confirmation", JOptionPane.YES_NO_OPTION);
                if (n == 0){ // Yes to the previous dialogue is "0"
                    
                    // No db mods necessary
                    
                    JOptionPane.showMessageDialog(rootPane, "Enrollment for this semester is closed.", "Unable to Enroll", JOptionPane.WARNING_MESSAGE);
                }
                System.out.println(n);
            } else if (cb.isSelected() && !cb1.isSelected()){ // cb !cb1
                n = JOptionPane.showConfirmDialog(rootPane, "You have elected to enroll in the following classes:\n" + cbTitle + "\n\n\nAre you sure you want to do this?", "Confirmation", JOptionPane.YES_NO_OPTION);
                if (n == 0){ // Yes to the previous dialogue is "0"
                    
                    // No db mods necessary
                    
                    JOptionPane.showMessageDialog(rootPane, "Enrollment for this semester is closed.", "Unable to Enroll", JOptionPane.WARNING_MESSAGE);
                }
            } else if (!cb.isSelected() && cb1.isSelected()){ // cb1 !cb
                n = JOptionPane.showConfirmDialog(rootPane, "You have elected to enroll in the following classes:\n" + cb1Title + "\n\n\nAre you sure you want to do this?", "Confirmation", JOptionPane.YES_NO_OPTION);
                if (n == 0){ // Yes to the previous dialogue is "0"
                    
                    // No db mods necessary
                    
                    JOptionPane.showMessageDialog(rootPane, "Enrollment for this semester is closed.", "Unable to Enroll", JOptionPane.WARNING_MESSAGE);
                }
            } else { // No class selected
                JOptionPane.showMessageDialog(rootPane, "Please select a class to enroll in.", "No Class Selected", JOptionPane.WARNING_MESSAGE);
                return;
            }
        } else if (radio == 1){ // Spring 2014
            if (cb.isSelected() && cb1.isSelected()){ // Selected both classes
                n = JOptionPane.showConfirmDialog(rootPane, "You have elected to enroll in the following classes:\n" + cbTitle + "\n" + cb1Title + "\n\n\nAre you sure you want to do this?", "Confirmation", JOptionPane.YES_NO_OPTION);
                if (n == 0){ // Yes to the previous dialogue is "0"
                    
                    // No db mods necessary
                    
                    JOptionPane.showMessageDialog(rootPane, "One of the selected classes is fully enrolled.", "Unable to Enroll", JOptionPane.WARNING_MESSAGE);
                }
                System.out.println(n);
            } else if (cb.isSelected() && !cb1.isSelected()){ // cb !cb1
                n = JOptionPane.showConfirmDialog(rootPane, "You have elected to enroll in the following classes:\n" + cbTitle + "\n\n\nAre you sure you want to do this?", "Confirmation", JOptionPane.YES_NO_OPTION);
                if (n == 0){ // Yes to the previous dialogue is "0"
                    
                    // No db mods necessary
                    
                    JOptionPane.showMessageDialog(rootPane, "One of the selected classes is fully enrolled.", "Unable to Enroll", JOptionPane.WARNING_MESSAGE);
                }
            } else if (!cb.isSelected() && cb1.isSelected()){ // cb1 !cb
                n = JOptionPane.showConfirmDialog(rootPane, "You have elected to enroll in the following classes:\n" + cb1Title + "\n\n\nAre you sure you want to do this?", "Confirmation", JOptionPane.YES_NO_OPTION);
                if (n == 0){ // Yes to the previous dialogue is "0"
                    
                    // Process enrollments in the db
                    
                    JOptionPane.showMessageDialog(rootPane, "Congratulations, you have successfully enrolled in: \n" + cb1Title);
                }
            } else { // No class selected
                JOptionPane.showMessageDialog(rootPane, "Please select a class to enroll in.", "No Class Selected", JOptionPane.WARNING_MESSAGE);
                return;
            }
        } else if (radio == 2){ // Summer 2014
            if (cb.isSelected() && cb1.isSelected()){ // Selected both classes
                n = JOptionPane.showConfirmDialog(rootPane, "You have elected to enroll in the following classes:\n" + cbTitle + "\n" + cb1Title + "\n\n\nAre you sure you want to do this?", "Confirmation", JOptionPane.YES_NO_OPTION);
                if (n == 0){ // Yes to the previous dialogue is "0"
                    
                    // Process enrollments in the db
                    
                    JOptionPane.showMessageDialog(rootPane, "Congratulations, you have successfully enrolled in: \n" + cbTitle + "\nand\n" + cb1Title);
                }
                System.out.println(n);
            } else if (cb.isSelected() && !cb1.isSelected()){ // cb !cb1
                n = JOptionPane.showConfirmDialog(rootPane, "You have elected to enroll in the following classes:\n" + cbTitle + "\n\n\nAre you sure you want to do this?", "Confirmation", JOptionPane.YES_NO_OPTION);
                if (n == 0){ // Yes to the previous dialogue is "0"
                    
                    // Process enrollments in the db
                    
                    JOptionPane.showMessageDialog(rootPane, "Congratulations, you have successfully enrolled in: \n" + cbTitle);
                }
            } else if (!cb.isSelected() && cb1.isSelected()){ // cb1 !cb
                n = JOptionPane.showConfirmDialog(rootPane, "You have elected to enroll in the following classes:\n" + cb1Title + "\n\n\nAre you sure you want to do this?", "Confirmation", JOptionPane.YES_NO_OPTION);
                if (n == 0){ // Yes to the previous dialogue is "0"
                    
                    // Process enrollments in the db
                    
                    JOptionPane.showMessageDialog(rootPane, "Congratulations, you have successfully enrolled in: \n" + cb1Title);
                }
            } else { // No class selected
                JOptionPane.showMessageDialog(rootPane, "Please select a class to enroll in.", "No Class Selected", JOptionPane.WARNING_MESSAGE);
                return;
            }
        } else {
            JOptionPane.showMessageDialog(rootPane, "Please select a semester to search.", "No Semester Selected", JOptionPane.WARNING_MESSAGE);
            return;
        }
        
    }