站内搜索: 请输入搜索关键词

当前页面: 开发资料首页J2ME 专题Running with storage root DefaultColorPhone???

Running with storage root DefaultColorPhone???

摘要: Running with storage root DefaultColorPhone???



import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;

public class KeyAndPointerDemo extends MIDlet implements CommandListener
{

private Command exitCommand;
private DemoCanvas myCanvas;
public KeyAndPointerDemo()
{
exitCommand =new Command("Exit",Command.EXIT,1);
myCanvas =new DemoCanvas();
myCanvas.addCommand(exitCommand);
myCanvas.setCommandListener(this);
}
protected void startApp( ) throws MIDletStateChangeException
{
Display.getDisplay(this).setCurrent(myCanvas);
}

protected void pauseApp()
{
}

protected void destroyApp( boolean p1 )
{
}

public void commandAction(Command c,Displayable d)
{
if (c ==exitCommand)
{
destroyApp(false);
notifyDestroyed();
}
}

class DemoCanvas extends Canvas
{
protected void keyPressed(int keyCode)
{
System.out.println( "keyPressed");

}
protected void keyReleased(int keyCode)
{
System.out.println( "keyReleased ");

}
protected void keyRepeated(int keyCode)
{
System.out.println( "keyRepeated");

}
protected void pointerDragged(int x, int y)
{
System.out.println( "pointerDragged ");

}
protected void pointerPressed(int x, int y)
{
System.out.println( "pointerPressed ");

}
protected void pointerReleased(int x, int y)
{
System.out.println( "pointerReleased ");

}

protected void paint(Graphics g) {

}
}
}

出现以下错误:
Running with storage root DefaultColorPhone
java.io.IOException: storageOpen(): No such file or directory, D:/??hJAVA?????????????????/????????/Chapter5/Chapter5.jad
at com.sun.midp.io.j2me.storage.RandomAccessStream.connect(+30)
at com.sun.midp.dev.DevMIDletSuiteImpl.create(+141)
at com.sun.midp.dev.DevMIDletSuiteImpl.create(+62)
at com.sun.midp.main.Main.runLocalClass(+20)
at com.sun.midp.main.Main.main(+116)
Execution completed.
649644 bytecodes executed
0 thread switches
738 classes in the system (including system classes)
3171 dynamic objects allocated (83036 bytes)
1 garbage collections (0 bytes collected)



中文目录的原因.已在QQ上给你解答.
请楼主给分哈.
嘿嘿


怎么给分啊


↑返回目录
前一篇: 如何把图片反转???----大虾来帮忙啊~~~~~急
后一篇: 图层问题,怎么样只画部分区域