me.frame,
this.getParent(),
   private void sendScreenEMail() {         JPanel semp = new JPanel();         semp.setLayout(new AlignLayout(2,5,5));         JLabel tol = new JLabel(LangTool.getString("em.to"));         JTextField tot = new JTextField(30);         JLabel subl = new JLabel(LangTool.getString("em.subject"));         JTextField subt = new JTextField(30);         JLabel fnl = new JLabel(LangTool.getString("em.fileName"));         JTextField fnt = new JTextField("tn5250j.txt",30);         semp.add(tol);         semp.add(tot);         semp.add(subl);         semp.add(subt);         semp.add(fnl);         semp.add(fnt);         Object[]      message = new Object[1];         message[0] = semp;         String[] options = {LangTool.getString("em.optSendLabel"),                              LangTool.getString("em.optCancelLabel"),                              LangTool.getString("em.optConfigureLabel")};         int result = 0;            result = JOptionPane.showOptionDialog(                me.frame,                              // the parent that the dialog blocks                message,                           // the dialog message array                LangTool.getString("em.title"),    // the title of the dialog window                JOptionPane.DEFAULT_OPTION,        // option type                JOptionPane.QUESTION_MESSAGE,      // message type                null,                              // optional icon, use null to use the default icon                options,                           // options string array, will be made into buttons//                options[0]                         // option that should be made into a default button            );            switch(result) {               case 0: // Send it                  SendEMail sem = new SendEMail();                  sem.setConfigFile("SMTPProperties.cfg");                  sem.setTo(tot.getText());                  sem.setSubject(subt.getText());                  if (fnt.getText().length() > 0)                     sem.setFileName(fnt.getText());                  StringBuffer sb = new StringBuffer();                  char[] s = screen.getScreenAsChars();                  int c = screen.getCols();                  int l = screen.getRows() * c;                  int col = 0;                  for (int x = 0; x < l; x++,col++) {                     sb.append(s[x]);                     if (col == c) {                        sb.append('\n');                        col = 0;                     }                  }                  sem.setMessage(sb.toString());                  try {                     sem.send();                  }                  catch (IOException ioe) {                     System.out.println(ioe.getMessage());                  }                  sem.release();                  sem = null;                  System.out.println("Message sent");                  break;               case 1: // Cancel      //		      System.out.println("Cancel");                  break;               default:                  break;            }   }