semp.add(tol); semp.add(toAddress); semp.add(subl); semp.add(subject); semp.add(bodyl); semp.add(bodyScrollPane); semp.add(fnl); semp.add(attachmentName);
text.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent e) { setAttachmentName(); } });
   private JPanel setupMailPanel (String fileName) {      JPanel semp = new JPanel();      semp.setLayout(new AlignLayout(2,5,5));      JLabel tol = new JLabel(LangTool.getString("em.to"));      JLabel subl = new JLabel(LangTool.getString("em.subject"));      JLabel bodyl = new JLabel(LangTool.getString("em.body"));      JLabel fnl = new JLabel(LangTool.getString("em.fileName"));      toAddress = new JComboBox();      toAddress.setEditable(true);      subject = new JTextField(30);      bodyText = new JTextArea(6,30);      JScrollPane bodyScrollPane = new JScrollPane(bodyText);      bodyScrollPane.setHorizontalScrollBarPolicy(      JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);      bodyScrollPane.setVerticalScrollBarPolicy(      JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);      attachmentName = new JTextField(fileName,30);      config = null;      if (session != null) {         config = session.getConfiguration();         if (config.isPropertyExists("emailTo")) {            setToCombo(config.getStringProperty("emailTo"),toAddress);         }      }      semp.add(tol);      semp.add(toAddress);      semp.add(subl);      semp.add(subject);      semp.add(bodyl);      semp.add(bodyScrollPane);      semp.add(fnl);      semp.add(attachmentName);      return semp;   }