日期:2014-05-20  浏览次数:20665 次

j2me中TextBox问题、求助
在netbeans中运行j2me中textBox时无法向模拟器输入汉字、程序如下:
package testTextBox;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class testTextBox extends MIDlet
implements CommandListener
{
  public TextBox tb1;
  public Command c1;
  public Display d;
  public testTextBox()
  {// 标题 内容 长度 类型
  tb1=new TextBox("我的理想","One world One Dream",20,TextField.ANY); 
  c1=new Command("确定",Command.SCREEN,1);
  tb1.addCommand(c1);
  tb1.setCommandListener(this);
  d=Display.getDisplay(this);
  }
 public void startApp()
 {d.setCurrent(tb1);
 }
 public void pauseApp()
 {}
 public void destroyApp(boolean f)
 {}
 public void commandAction(Command c,Displayable d)
 {
 if(c==c1)
 {Form f=new Form("您的理想");
String s=tb1.getString();//获取用户输入的信息
f.append(s);
 Display.getDisplay(this).setCurrent(f);
 }
 }
}
报错如下:
Installing suite from: http://127.0.0.1:58854/testTextBox.jad
Processing UPDATE_CLASS
2413 - ERROR - JSR258 - 3 - Can't create MediaObject: media file (screen.image_bg.png) is not found
2544 - ERROR - JSR258 - 3 - Can't find theme element (feature=activeScreen, role=background)
2550 - ERROR - JSR258 - 3 - Can't find theme element (feature=inputMode, role=backgroundImage)
2555 - CRITICAL - JSR258 - 3 - Can't find Chameleon element (id=161)
2555 - CRITICAL - JSR258 - 3 - Can't find Chameleon element (id=163)
2556 - CRITICAL - JSR258 - 3 - Can't find Chameleon element (id=164)
2557 - CRITICAL - JSR258 - 3 - Can't find Chameleon element (id=165)
2560 - CRITICAL - JSR258 - 3 - Can't find Chameleon element (id=182)
2564 - ERROR - JSR258 - 3 - Can't find theme element (feature=systemMenu, role=selectedItemBackground)
2576 - ERROR - JSR258 - 3 - Can't find theme element (feature=virtualKeyboard, role=virtualKeyboardBGImage)
WARNING - MMA - C:/Builds/jme-sdk/javacall-javame-sdk-305/implementation/share/jsr135_mmapi/ju_mmconfig.c line 801: caps: optional settings missing: SuspendBehavior

------解决方案--------------------
这个是WTK的bug,真机可以输入的
------解决方案--------------------
好像WTK2.5.2可以