Change text via JAVA in nifty

I’m trying to change the text in a UI. I followed the tutorial but it’s not working. I was wondering what I am doing wrong.

My UI:

[java]<?xml version=“1.0” encoding=“UTF-8”?>
<nifty xmlns=“” xmlns:xsi=“
<useControls filename=“nifty-default-controls.xml” />
<useStyles filename=“nifty-default-styles.xml” />
<popup id=“feedback” controller=“dae.repest.gui.controllers.FeedbackScreenController” visibleToMouse=“true” childLayout=“center”>
<panel style=“repest” width=“400px” height=“300px” x=“100px” y=“600px” childLayout=“vertical” padding=“20px”>
<text id=“feedbacktext” name=“feedbacktext” text="${CALL.getFeedback()}" font=“fonts/comicbook_32.fnt” width=“95%” height=“100%” align=“left” wrap=“true” />
<control name=“button” label=“Ok” y=“100%” align=“right”>
<interact onClick=“ok()”/>

My controller:


  • To change this template, choose Tools | Templates
  • and open the template in the editor.
    package dae.repest.gui.controllers;

import de.lessvoid.nifty.Nifty;
import de.lessvoid.nifty.screen.Screen;
import de.lessvoid.nifty.screen.ScreenController;


  • @author odjansse
    public class FeedbackScreenController implements ScreenController {

    public String getFeedback(){

     return "test";


    public void bind(Nifty nifty, Screen screen) {


    public void onStartScreen() {


    public void onEndScreen() {



how do you initialise the screen with nifty? make sure you are passing the screen controller. Also check for any warnings in the console.