如何从LCDUI表单启动LWUIT表单? [英] How to launch a LWUIT form from a LCDUI form?

查看:83
本文介绍了如何从LCDUI表单启动LWUIT表单?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在先前的一些问题中间接提到了这个问题,但是我还没有看到任何决定性的内容.

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆