void login() {
    try {
      logoutBtn.setEnabled(true);
      contactList.setEditable(false);
      loginBtn.setEnabled(false);
      loginId.setEnabled(false);
      password.setEnabled(false);

      //
      plugin.login(
          getMyLoginId(), password.getText(), getContactList(), MessagingNetwork.STATUS_ONLINE);
      logoutBtn.setEnabled(true);
    } catch (Throwable tr) {
      printException(tr);
      boolean loggedIn = false;
      try {
        loggedIn = plugin.getClientStatus(getMyLoginId()) != MessagingNetwork.STATUS_OFFLINE;
      } catch (Throwable tr2) {
        printException(tr2);
      }
      if (!loggedIn) {
        enableLoginUI();
      }
    }
  }
 String[] getContactList() {
   java.util.List cl = new java.util.LinkedList();
   StringTokenizer st = new StringTokenizer(contactList.getText());
   StringBuffer sb = new StringBuffer();
   StringBuffer dbg = new StringBuffer("test applet contactlist: ");
   while (st.hasMoreTokens()) {
     String loginId = st.nextToken().trim();
     if (loginId.length() == 0) continue;
     dbg.append("'" + loginId + "' ");
     cl.add(loginId);
     sb.append(loginId).append('\n');
   }
   CAT.info(dbg.toString());
   contactList.setText(sb.toString());
   return (String[]) cl.toArray(new String[cl.size()]);
 }
 {
   StringBuffer sb = new StringBuffer();
   StringTokenizer st = new StringTokenizer(cfg.REQPARAM_CONTACT_LIST_LOGIN_IDS, ",");
   while (st.hasMoreTokens()) {
     sb.append(st.nextToken());
     if (st.hasMoreTokens()) sb.append("\n");
   }
   contactList.setText(sb.toString());
 }
 void enableLoginUI() {
   try {
     logoutBtn.setEnabled(false);
     contactList.setEditable(true);
     loginBtn.setEnabled(true);
     loginId.setEnabled(true);
     password.setEnabled(true);
   } catch (Throwable tr) {
     CAT.error("exception", tr);
   }
 }
 {
   eventLog.setEditable(false);
 }
 public void log(String s) {
   synchronized (eventLogLock) {
     eventLog.append("[" + org.jcq2k.util.joe.Logger.formatCurrentDate() + "]\t" + s);
     eventLog.append("\n");
   }
 }
 public void clearEventLog() {
   synchronized (eventLogLock) {
     eventLog.setText("");
   }
 }