final class HelloWorldScreen extends MainScreen implements FieldChangeListener
{
ObjectChoiceField choice=null;
public HelloWorldScreen()
{
super();
String choicestrs[] = {"Opt 1", "Opt 2", "Opt 3"};
choice = new ObjectChoiceField("Object Choice Field: ", choicestrs, 0);
choice.setChangeListener(this);
add(choice);
}
public void openAnotherForm(){
AnotherForm newScreen = new AnotherForm();
UiApplication.getUiApplication().pushScreen(newScreen);
}
public void fieldChanged(Field arg0, int arg1) {
openAnotherForm();
}
}
class AnotherForm extends MainScreen
{
public AnotherForm()
{
super();
add(new LabelField("Another Form"));
}
}