private void initPanel(){
  if (effectorType.getSelectedItem() == "StraightMovement") {
    cleareffectorPanel();
    setTitle("Add a straight movement effector");
    currentEffectorPanel=new StraightEffectorPanel(rotatingEntity);
    mainPanel.add(currentEffectorPanel);
  }
 else   if (effectorType.getSelectedItem() == "Turning") {
    cleareffectorPanel();
    setTitle("Add a turning effector");
    currentEffectorPanel=new TurningEffectorPanel(rotatingEntity);
    mainPanel.add(currentEffectorPanel);
  }
 else   if (effectorType.getSelectedItem() == "Speech") {
    cleareffectorPanel();
    setTitle("Add a speech effector");
    currentEffectorPanel=new SpeechEffectorPanel(rotatingEntity);
    mainPanel.add(currentEffectorPanel);
  }
  pack();
  setLocationRelativeTo(null);
}

private void initPanel ( ) { if ( effectorType . getSelectedItem ( ) == "StraightMovement" ) { cleareffectorPanel ( ) ; setTitle ( "Add a straight movement effector" ) ; currentEffectorPanel = new StraightEffectorPanel ( rotatingEntity ) ; mainPanel . add ( currentEffectorPanel ) ; } else if ( effectorType . getSelectedItem ( ) == "Turning" ) { cleareffectorPanel ( ) ; setTitle ( "Add a turning effector" ) ; currentEffectorPanel = new TurningEffectorPanel ( rotatingEntity ) ; mainPanel . add ( currentEffectorPanel ) ; } else if ( effectorType . getSelectedItem ( ) == "Speech" ) { cleareffectorPanel ( ) ; setTitle ( "Add a speech effector" ) ; currentEffectorPanel = new SpeechEffectorPanel ( rotatingEntity ) ; mainPanel . add ( currentEffectorPanel ) ; } pack ( ) ; setLocationRelativeTo ( null ) ; }
initialize the effector dialog panel based upon the current effector type .
