gpt4 book ai didi

java - 代号一中的代码主题如何?

转载 作者:行者123 更新时间:2023-11-30 07:16:39 26 4
gpt4 key购买 nike

我是一个真正的初学者,但我想使用代码创建我的移动应用程序的外观。我使用 Photoshop 图像创建背景,但我想对按钮和其他所有内容进行编码。这是我所拥有的(我添加的按钮未显示):

public void start() {
if(current != null){
current.show();
return;
}
new StateMachine("/theme");
}
Button customer = new Button("Customer");
Button gpsAntenna = new Button("Find An Antenna Near You");
Button learnMore = new Button("Learn More About NEN Now");
Button nenNow = new Button("NEN Now Webpage");
public void stop() {
current = Display.getInstance().getCurrent();
if(current instanceof Dialog) {
((Dialog)current).dispose();
current = Display.getInstance().getCurrent();
}
}

最佳答案

您需要将它们添加到表单或容器中。看看Form类和Container类,我认为它们都有一个addComponent()方法。然后您可能需要重新验证表单才能让它们显示。

如果将它们添加到容器中,则需要将其添加到表单中。

关于java - 代号一中的代码主题如何?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38274989/

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