/** Invoked when an action occurs. */
  public void actionPerformed(java.awt.event.ActionEvent event) {
    // System.out.println("command=" + event.getActionCommand());

    if (event.getSource() == bCancel) {
      dispose();
      return;
    }

    if (event.getSource() == bAdd) actionAdd();
    else actionOK();
  }
 private void jFileChooser1ActionPerformed(
     java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jFileChooser1ActionPerformed
   if (!evt.getActionCommand().equals("CancelSelection")) {
     ysDir = jFileChooser1.getSelectedFile().toString();
     File file = null;
     try {
       file =
           new File(
               new URL("file:/" + System.getProperty("user.dir") + "/addonsearch.cfg").toURI());
       BufferedWriter output = new BufferedWriter(new FileWriter(file));
       jFrame1.setSize(580, 420);
       jFrame1.setVisible(true);
       try {
         output.write("YSDIR           =" + ysDir + "\nYSVERSION       =" + versionBox.getText());
       } finally {
         output.close();
       }
     } catch (Exception ex) {
       JOptionPane.showMessageDialog(
           this,
           "Cannot write to addonsearch config file!\n" + ex,
           "addonsearch",
           JOptionPane.ERROR_MESSAGE);
     }
     try {
       ys_cfg(file);
     } catch (Exception ex) {
     }
   }
   jFrame1.setVisible(false);
 } // GEN-LAST:event_jFileChooser1ActionPerformed
 public void actionPerformed(java.awt.event.ActionEvent e) {
   if (e.getSource() == AddressBookSelectionUI.this.getfindButton()) connEtoM1(e);
   if (e.getSource() == AddressBookSelectionUI.this.getaddButton()) connEtoM3(e);
   if (e.getSource() == AddressBookSelectionUI.this.getokButton()) connEtoM5(e);
 };