public void disconnect(){
  if (reader != null) {
    reader.shutdown();
  }
  reader=null;
  if (serverPanel != null) {
    serverAddrField.setEnabled(true);
    serverPortField.setEnabled(true);
    viewChoice.setEnabled(false);
    controlButton.setText(GetViewsCmd);
    controlButton.setActionCommand(GetViewsCmd);
    connectedStatus.setText(STATUS_IDLE);
  }
}

public void disconnect ( ) { if ( reader != null ) { reader . shutdown ( ) ; } reader = null ; if ( serverPanel != null ) { serverAddrField . setEnabled ( true ) ; serverPortField . setEnabled ( true ) ; viewChoice . setEnabled ( false ) ; controlButton . setText ( GetViewsCmd ) ; controlButton . setActionCommand ( GetViewsCmd ) ; connectedStatus . setText ( STATUS_IDLE ) ; } }
resets the controls to the disconnected mode .
