如何从LCDUI表单启动LWUIT表单? [英] How to launch a LWUIT form from a LCDUI form?
问题描述
在先前的一些问题中间接提到了这个问题,但是我还没有看到任何决定性的内容.
The question has been indirectly spoken about in some of the earlier questions but i havent seen anything decisive about it..
我目前正在使用这段代码来展示CommandAction
实现中的LWUIT表单.
I am currently using this piece of code to show a LWUIT form inside CommandAction
implementation.
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();
}
}
当前它不显示表格,也不会崩溃.
Currently it doesnt bring up the form ,nor does it crash.
好吧,如果那不可能的话,那么您能为基于lcdui的MIDP的某种浏览器控件提出解决方法吗?
well if thats not possible then can you suggest a workaround to some sort of browser control for MIDP based of lcdui?
推荐答案
已解决.现在可以了.只需将com.sun.lwuit.Display.init(this);
放入startApp()
并改变
Solved it.It now works.Just put the com.sun.lwuit.Display.init(this);
into startApp()
and change
RechForm.addComponent(BorderLayout.CENTER, htmlc);
到
RechForm.addComponent(htmlc);
这篇关于如何从LCDUI表单启动LWUIT表单?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!