gpt4 book ai didi

java - 弹出屏幕不起作用

转载 作者:行者123 更新时间:2023-12-01 07:11:42 25 4
gpt4 key购买 nike

对于下面显示的代码,当我按下“选项”按钮(由 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);
}
});

最佳答案

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);
}
});

关于java - 弹出屏幕不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12977041/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com