Create a Simple TextField

3 messages - 1110 views

Dear All,

I am new to Kuix so please forgive my basic question. I want to create a simple form that has three fields. My question is how do I create a TextField using xml file or a java method. I am using the demo helloworld.xml and HelloWorldFrame.java. I tried the following and it doest seem to work.

 

    public void onAdded() {

        // Load the content from the XML file with Kuix.loadScreen static method

        Screen screen = Kuix.loadScreen("helloworld.xml", null);

        TextField item = new TextField();

        screen.add(item);

        // Set the application current screen

        screen.setCurrent();

 

    }

 

Please Help.

Thank you.

No one has an answer to this?? I thout it would be straight foward to create a field using java code and not the kuix xml file.

Anybody??

 

Thanks.

Add some value to the textfield and then see....