private void registerjButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_registerjButtonActionPerformed
        // TODO add your handling code here:
        if(companyNamejTextField.getText().length() == 0 ||
            cityjTextField.getText().length() == 0 ||
            
            adrLine1jTextField.getText().length() == 0 ||
            statejTextField.getText().length() == 0||
            zipjTextField .getText().length() == 0 ||
            userNamejTextField.getText().length() == 0 ||
            jPasswordField.getText().length()== 0)
        {
            JOptionPane.showMessageDialog(null, "Some of the feilds are null");
        }
        else
        {
            try {
                
                Integer.parseInt(zipjTextField.getText());

            } catch (NumberFormatException e) {

                JOptionPane.showMessageDialog(null, "Zip  Must be a Numeric");
                return;
            }
            Exchange selectedExchange = (Exchange)exchangejComboBox.getSelectedItem();
            SmallBusinessRole smallBusinessRole = new SmallBusinessRole();
            SmallBusiness smallBusiness = selectedExchange.getSmallBusinessDirectory().newSmallBusiness();
            UserAccount userAccount = selectedExchange.getUserAccountDirectory().newUserAccount();
            
            smallBusiness.setCompanyName(companyNamejTextField.getText());
            
            smallBusiness.getAddress().setAddressLine1(adrLine1jTextField.getText());
            smallBusiness.getAddress().setAddressLine2(adrLine2jTextField.getText());
            smallBusiness.getAddress().setCity("Boston");
            smallBusiness.getAddress().setState(statejTextField.getText());
            smallBusiness.getAddress().setZip(Integer.parseInt(zipjTextField.getText()));
            userAccount.setUserName(userNamejTextField.getText());
            userAccount.setPassword(jPasswordField.getText());
            userAccount.setStatus(true);
            userAccount.setPerson(null);
            userAccount.setRole(smallBusinessRole);
            userAccount.setExchangeEnterprise(selectedExchange);
            userAccount.setSmallBusiness(smallBusiness);
            JOptionPane.showMessageDialog(null,"Company Registered");
        }
    }//GEN-LAST:event_registerjButtonActionPerformed