Connecting GUI to back end
<p>I am trying to connect my GUI to a back end but some pieces are not working and some other have errors.</p>

<p>1: This is for saving a new customer by pressing the save Button. cb.closeBroker(); is for release resources allocated to the broker and save all modified data.</p>

<pre><code>if( e.getSource() == saveButton ) {
   try {
      cb.persist(
         new Customer(
            idTextField.getText()+";"+firstNameTextField.getText()+ ";" +
            lastNameTextField.getText()+";"+ addressTextField.getText()+';'+
            postalCodeTextField.getText()+";"+phoneTextField.getText()+";"+
            searchTextField.getText()));
   } catch (InvalidPhoneNumberException e1) {
      JOptionPane.showMessageDialog(null, "Invalid phone number");
   } catch (InvalidPostalCodeException e1){
      JOptionPane.showConfirmDialog(null, "Invalid Postal Code");
   }
   cb.closeBroker();
}
</code></pre>

<p>2: I tried to do the same for another window that adds movies however is not working is said "The constructor Movie(String) is undefined"</p>

<p>And I need to add another exception but it gives me an error when I try catch;</p>

<pre><code>if( e.getSource() == saveButton ) {
   mb.persist(
      new Movie(
         movieIdTextField.getText()+";"+movieTitleTextField.getText()+ ";" +
         movieDirectorTextField.getText()+";"+movieLeadingTextField.getText()+';'+
         movieCategoryTextField.getText()+";"+movieRunningTextField.getText()+";"+
         movieRunningTextField.getText()+ ";"+movieRatingTextField.getText()+";"+
         movieReleaseTextField.getText()));
   mb.closeBroker();
}
</code></pre>

<p>NOTE: I just need to connect it to a back end.</p>
