是否可以在无线工具包2.5.2中将lwuit.Dialog与javax.microedition.lcdui.Canvas一起使用? [英] Is this possible to use lwuit.Dialog with javax.microedition.lcdui.Canvas in wireless toolkit 2.5.2?

查看:79
本文介绍了是否可以在无线工具包2.5.2中将lwuit.Dialog与javax.microedition.lcdui.Canvas一起使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用javax.microedition.lcdui.Canvas在屏幕上绘制字符串.但出于某种目的,我还需要一个对话框窗口.所以我在按下键时使用lwuit包(com.sun.lwuit.Dialog)来显示对话框窗口.

I am using javax.microedition.lcdui.Canvas for drawing my string on the screen. But I also need one dialog window for some purpose. So I am using lwuit package (com.sun.lwuit.Dialog) for showing dialog window when key pressing.

因此,在我的程序中,我只包含了该程序包并创建了Dialog对象.在运行我的应用程序时,它意外终止.

So in my program I just included that package and create the object of the Dialog box. While running my application, it is terminated unexpectedly.

我只添加了以下几行...

I just included the following lines...

import javax.microedition.lcdui.Canvas;
import com.sun.lwuit.Dialog;

public class Mycanvas extends Canvas implements CommandListener
{
    Dialog dialog = new Dialog();
    //some other remaining codes for my canvas...
}

那么,是否可以使用lcdui画布显示lwuit对话框窗口?

So, is it possible to show lwuit dialog window with lcdui canvas?

推荐答案

我的想法是创建一个自定义项,该项从CustomItem扩展到对话框.但是很难对完整的实现进行编码.最好搜索任何第三个parr jar已实现对话框的文件.

My Idea is create an user defined Item which extends from CustomItem for dialog.But it is difficult to code the complete implementation.Better u search for any third pary jar file which already implemented dialog box.

这篇关于是否可以在无线工具包2.5.2中将lwuit.Dialog与javax.microedition.lcdui.Canvas一起使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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