平台:J2SE + WTK 出错:java.lang.ClassNotFoundException
k4 2004-06-20 04:15:59 源代码:
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
public class ScreenTest extends MIDlet implements CommandListener
{
private Display aDisplay;
private Command aCommand;
private Ticker aTicker;
private TextBox aTextBox;
public ScreenTest()
{
aCommand=new Command("Exit",Command.EXIT,2);
aTextBox=new TextBox("Hello World","Today's NASDAQ Market",256,0);
aTextBox.addCommand(aCommand);
aTextBox.setCommandListener(this);
aTicker=new Ticker("IBM 123.09,SUN 600.00,MS 00.00");
}
public void startApp()
{
aDisplay=Display.getDisplay(this);
aDisplay.setCurrent(aTextBox);
aTextBox.setTitle("dd");
aTextBox.setTicker(aTicker);
}
public void pauseApp()
{
}
public void destroyApp(boolean b)
{
}
public void commandAction(Command c,Displayable s)
{
if(c==aCommand)
{
destroyApp(false);
notifyDestroyed();
}
}
}
-----------------------------------------------------------------
运行出错如图:
http://home.ripway.com/2004-6/124062/5.jpg