private void profilesCB(){
  Profile profile;
  String host;
  profile=(Profile)profilesComboBox.getSelectedItem();
  if (profile != null) {
    host=profile.getHost();
    serverField.setText(host);
    serverPortField.setText(String.valueOf(profile.getPort()));
    usernameField.setText(profile.getUser());
    passwordField.setText(profile.getPassword());
  }
 else {
    serverPortField.setText(String.valueOf(Profile.DEFAULT_SERVER_PORT));
    usernameField.setText("");
    passwordField.setText("");
  }
}

private void profilesCB ( ) { Profile profile ; String host ; profile = ( Profile ) profilesComboBox . getSelectedItem ( ) ; if ( profile != null ) { host = profile . getHost ( ) ; serverField . setText ( host ) ; serverPortField . setText ( String . valueOf ( profile . getPort ( ) ) ) ; usernameField . setText ( profile . getUser ( ) ) ; passwordField . setText ( profile . getPassword ( ) ) ; } else { serverPortField . setText ( String . valueOf ( Profile . DEFAULT_SERVER_PORT ) ) ; usernameField . setText ( "" ) ; passwordField . setText ( "" ) ; } }
called when a profile selection is changed .
