0

我是 LWUIT 的网络用户。我使用资源编辑器创建了一个主题并生成了一个代码。在表格中,用户选择县然后按下继续命令。如何获取用户使用命令选择的内容以及获取用户国家/地区后如何显示下一个表单?我之前没有使用过 StateMachine.java 和 StateMachineBase.Java 下面是我的命令代码,但我不知道该调用什么。

    package userclasses;

    import com.sun.lwuit.Container;
    import generated.StateMachineBase;


    public class StateMachine extends StateMachineBase {

        public StateMachine(String resFile) {
            super(resFile);
            // do not modify, write code in initVars and initialize class members there,
            // the constructor might be invoked too late due to race conditions that might occur       
        }

        /**
         * this method should be used to initialize variables instead of the
         * constructor/class scope to avoid race conditions
         */
        protected void initVars() {

            String username;
        }

        protected boolean onGetUserCountryFormContinue() {
            // If the resource file changes the names of components this call will break notifying you that you should fix the code
            boolean val = super.onGetUserCountryFormContinue();
//I should get the user selection here after the command has been selected.           

            return val;
        }
    }
4

1 回答 1

1

我建议迁移到更受支持的代号一。

使用类似的东西:

 int selectedIndex = findMyComboBoxName().getSelectedIndex();
 Object selectedValue = findMyComboBoxName().getSelectedItem();
于 2013-09-12T19:28:46.497 回答