anchor.diff:  
   [source,java]
   ----
  -
  -  nifty.addScreen("start", new ScreenBuilder("start") {{
  -      controller(new mygame.MyStartScreen())}});
  +nifty.addScreen("start", new ScreenBuilder("start") {{
  +  controller(new mygame.MyStartScreen());
  +}}.build(nifty));
   
   ----
   
   Now the Java class `MyStartScreen` and this +++<abbr title="Graphical User Interface">GUI</abbr>+++ screen (`start`) are connected. For this example you can also connect the `hud` screen to MyStartScreen.
   
  +See also: link:https://versaweb.dl.sourceforge.net/project/nifty-gui/nifty-gui/1.3.2/nifty-gui-the-manual-1.3.2.pdf[Nifty GUI - the Manual: Elements (Screen Controller)]
   
   == Make GUI and Java Interact
   
  
positive.code: .  <<jme3/advanced/nifty_gui_overlay#,Nifty GUI Overlay>> or <<jme3/advanced/nifty_gui_projection#,Nifty GUI Projection>>
  .  *Nifty +++<abbr title="Graphical User Interface">GUI</abbr>+++ Java Interaction*
  
  In the previous parts of the tutorial, you created a two-screen user interface. But it is still static, and when you click the buttons, nothing happens yet. The purpose of the +++<abbr title="Graphical User Interface">GUI</abbr>+++ is to communicate with your Java classes: Your game needs to know what the users clicked, which settings they chose, which values they entered into a field, etc. Similarly, the user needs to know what the currently game state is (score, health, etc). 
  
  
  == Connect GUI to Java Controller
  
  To let a Nifty screen communicate with the Java application, you register a `ScreenController` to every NiftyGUI screen. You create a ScreenController by creating a Java class that implements the `de.lessvoid.nifty.screen.ScreenController` interface and its abstract methods.
  
  Create an AppState *MyStartScreen*.java file in your package. ( Rightclick on your package → New → Other… → JME3 Classes → New AppState)
  
  *Pro Tip:* Since you are writing a jME3 application, you can additionally make the ScreenController class extend the <<jme3/advanced/application_states#,AbstractAppState>> class! This gives the ScreenController access to the application object and to the update loop!
  
  Now add *implements ScreenController* to _public class MyStartScreen extends AbstractAppState{_ and add *import de.lessvoid.nifty.screen.ScreenController;*
  
  Continue with adding:
  
  
negative.code: }
  
  ----
  .Complete BaseAppState file
  [source,java]
  ----
  package mygame;
  
  import com.jme3.app.Application;
  import com.jme3.app.state.BaseAppState;
  import de.lessvoid.nifty.Nifty;
  import de.lessvoid.nifty.screen.Screen;
  import de.lessvoid.nifty.screen.ScreenController;
  
  public class MyStartScreen extends BaseAppState implements ScreenController {
  
    @Override
    protected void initialize(Application app) {
        //It is technically safe to do all initialization and cleanup in the
        //onEnable()/onDisable() methods. Choosing to use initialize() and
        //cleanup() for this is a matter of performance specifics for the
        //implementor.
        //TODO: initialize your AppState, e.g. attach spatials to rootNode
    }
  
    @Override
    protected void cleanup(Application app) {
        //TODO: clean up what you initialized in the initialize method,
        //e.g. remove all spatials from rootNode
    }
  
    //onEnable()/onDisable() can be used for managing things that should
    //only exist while the state is enabled. Prime examples would be scene
    //graph attachment or input listener attachment.
    @Override
    protected void onEnable() {
        //Called when the state is fully enabled, ie: is attached and
        //isEnabled() is true or when the setEnabled() status changes after the
        //state is attached.
    }
  
    @Override
    protected void onDisable() {
        //Called when the state was previously enabled but is now disabled
        //either because setEnabled(false) was called or the state is being
        //cleaned up.
    }
  
    @Override
    public void update(float tpf) {
        //TODO: implement behavior during runtime
    }
  
    /**
     * Bind this ScreenController to a screen. This happens right before the
     * onStartScreen STARTED and only exactly once for a screen!
     * @param nifty nifty
     * @param screen screen
     */
    @Override
    public void bind(Nifty nifty, Screen screen) {
        throw new UnsupportedOperationException("Not supported yet.");
    }
  
    /**
     * called right after the onStartScreen event ENDED.
     */
    @Override
    public void onStartScreen() {
        throw new UnsupportedOperationException("Not supported yet.");
    }
  
    /**
     * called right after the onEndScreen event ENDED.
     */
    @Override
    public void onEndScreen() {
        throw new UnsupportedOperationException("Not supported yet.");
    }
  }
  
  ----
  