0

对于下面显示的代码,当我按下选项按钮(由 optionsButton 变量给出)时,没有出现弹出屏幕。我究竟做错了什么 ?

    optionsButton.setChangeListener(new FieldChangeListener() {
        public void fieldChanged(Field arg0, int arg1) {
            PopupScreen popup = new PopupScreen(new VerticalFieldManager());
            popup.add(new LabelField("Hello!"));
            Border border = BorderFactory.createSimpleBorder(
            new XYEdges(), Border.STYLE_TRANSPARENT);
            popup.setBorder(border);
        }
    });
4

1 回答 1

8
optionsButton.setChangeListener(new FieldChangeListener() {
            public void fieldChanged(Field arg0, int arg1) {
                PopupScreen popup = new PopupScreen(new VerticalFieldManager());
                popup.add(new LabelField("Hello!"));
                Border border = BorderFactory.createSimpleBorder(
                new XYEdges(), Border.STYLE_TRANSPARENT);
                popup.setBorder(border);

                Uiapplication.getUIapplication.pushScreen(popup);
            }
        });
于 2012-10-19T15:04:28.133 回答