浏览 4254 次
该帖已经被评为新手帖
|
|
---|---|
作者 | 正文 |
发表时间:2008-03-18
ERROR] Unable to load module entry point class com.ibm.register.client.Register (see associated exception for details) java.lang.NullPointerException: null at com.ibm.register.client.Register.onModuleLoad(Register.java:20) at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:342) at com.google.gwt.dev.shell.BrowserWidget.attachModuleSpace(BrowserWidget.java:326) at com.google.gwt.dev.shell.ie.BrowserWidgetIE6.access$200(BrowserWidgetIE6.java:36) at com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.gwtOnLoad(BrowserWidgetIE6.java:70) at com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.invoke(BrowserWidgetIE6.java:125) at com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke(IDispatchImpl.java:293) at com.google.gwt.dev.shell.ie.IDispatchImpl.method6(IDispatchImpl.java:196) at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:117) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1925) 我的java代码如下: package com.ibm.register.client; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.user.client.rpc.AsyncCallback; import com.google.gwt.user.client.ui.FocusListener; import com.google.gwt.user.client.ui.HorizontalPanel; import com.google.gwt.user.client.ui.Label; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.TextBox; import com.google.gwt.user.client.ui.Widget; public class Register implements EntryPoint { TextBox input; Label userdes,statedes,state; public void onModuleLoad() { input = new TextBox(); input.setVisibleLength(20); userdes.setText("User:");// 这个是20行 statedes.setText("State:"); state.setText("Ready."); input.addFocusListener(new FocusListener(){ public void onFocus(Widget sender){ } public void onLostFocus(Widget sender){ RegisterServiceAsync rsa = RegisterService.Util.getInstance(); rsa.isExist(input.getText(), new StringCallBack()); } }); HorizontalPanel panelUp,panelDown; panelUp = new HorizontalPanel(); panelDown = new HorizontalPanel(); panelUp.add(userdes); panelUp.add(input); panelDown.add(statedes); panelDown.add(state); RootPanel.get().add(panelUp); RootPanel.get().add(panelDown); } public class StringCallBack implements AsyncCallback{ public void onFailure(Throwable arg0) { state.setText("Error!"); } public void onSuccess(Object arg0) { int result = ((Integer)arg0).intValue(); if(result == 1) state.setText(input.getText()+" hava exist."); else state.setText("Valid user."); } } } 大家帮忙看看哪里错了呢…… 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |
发表时间:2009-02-13
userdes 没有创建 userdes = new Lable() ;
|
|
返回顶楼 | |