question: 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 ) ; }
target:  Initialize the effector Dialog Panel based upon the current effector type.