1 doja不支持command
2 doja创建图片
4 绘制,没有居中
字体:
font = Font.getDefaultFont();
font.getHeight();
font.stringWidth(s);
联网:
和J2ME类似,只是不要忘记了
conn.connect();
按键响应:
/**
* 按键处理
*/
public void processEvent(int type, int param)
{
switch( type )
{
case Display.KEY_PRESSED_EVENT:
{
keyPressed(param);
break;
}
case Display.KEY_RELEASED_EVENT:
{
keyReleased(param);
break;
}
case Display.RESUME_VM_EVENT:
{
System.gc();
break;
}
}
}
public static final int VK_UP = 1;
public static final int VK_DOWN = 1 << 1;
public static final int VK_LEFT = 1 << 2;
public static final int VK_RIGHT = 1 << 3;
public static final int VK_SELECT = 1 << 4;
public static final int VK_0 = 1 << 5;
public static final int VK_1 = 1 << 6;
public static final int VK_2 = 1 << 7;
public static final int VK_3 = 1 << 8;
public static final int VK_4 = 1 << 9;
public static final int VK_5 = 1 << 10;
public static final int VK_6 = 1 << 12;
public static final int VK_7 = 1 << 13;
public static final int VK_8 = 1 << 14;
public static final int VK_9 = 1 << 15;
public static final int VK_STAR = 1 << 15;
public static final int VK_POUND = 1 << 16;
public static final int VK_LEFT_SOFT = 1 << 17;
public static final int VK_RIGHT_SOFT = 1 << 18;
public static final int VK_CENTER_SOFT = 1 << 19;
protected static int keyCurrent;
protected void keyPressed(int keyCode)
{
keyCurrent = getKey(keyCode);
keyProc(keyCurrent);
}
protected void keyReleased(int keyCode)
{
//keyCurrent &= ~getKey(keyCode);
}
DOJA tips
原创
于 2008-06-24 18:24:00 发布
·
529 阅读
0
·
·
0
·
0
0
·
本内容遵循CC 4.0 BY-SA版权协议
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
·
收录于
当前文章被以下社区和专栏收录:


被折叠的 条评论
为什么被折叠?



