public void disconnected() {
    isConnected = false;

    MainFrame.getInstance().setDisconnected();

    SwingUtilities.invokeLater(
        new Runnable() {
          public void run() {
            uploadModel.removeExternalUploads();
            downloadModel.removeExternalDownloads();
          }
        });
    logger.severe("disconnected!");
  }
 public void connected() {
   isConnected = true;
   MainFrame.getInstance().setConnected();
   logger.severe("now connected");
 }