gpt4 book ai didi

java - 如何从 LCDUI 表单启动 LWUIT 表单?

转载 作者:行者123 更新时间:2023-12-01 04:51:28 25 4
gpt4 key购买 nike

这个问题在之前的一些问题中已经间接谈到,但我还没有看到任何决定性的内容..

我目前正在使用这段代码在 CommandAction 实现中显示 LWUIT 表单。

public void commandAction(Command cmnd, Item item) {

if (item == LogIn && cmnd == maincommand) {
RechForm = new com.sun.lwuit.Form("Basefook");
HttpRequestHandler handler = new HttpRequestHandler();
HTMLComponent htmlc = new HTMLComponent(handler);
htmlc.setPage("http://facebook.com");
RechForm.addComponent(BorderLayout.CENTER, htmlc);
com.sun.lwuit.Display.init(this);
RechForm.show();

}

}

目前它不会调出表单,也不会崩溃。

如果那不可能,那么您能否建议一种解决方法,为基于 lcdui 的 MIDP 提供某种浏览器控件?

最佳答案

解决了。现在可以了。只需将 com.sun.lwuit.Display.init(this); 放入 startApp()并改变

RechForm.addComponent(BorderLayout.CENTER, htmlc);

RechForm.addComponent(htmlc);

关于java - 如何从 LCDUI 表单启动 LWUIT 表单?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14893318/

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