DOJA tips

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);     }
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值