使用此代码:
protected void second_ButtonAction(Component c, ActionEvent event) {
ConnectionRequest cn = new ConnectionRequest();
cn.setUrl(theURLaddress);
cn.setPost(false);
cn.addArgument("name", "this");
NetworkManager.getInstance().addToQueueAndWait(cn);
cn.getResponseData();
}
我不断收到以下信息:
EDT violation detected!
com.codename1.impl.javase.JavaSEPort$EDTViolation: EDT Violation Stack!
at com.codename1.impl.javase.JavaSEPort.checkEDT(JavaSEPort.java:344)
EDT violation detected!
EDT violation detected!
EDT violation detected!
at com.codename1.impl.javase.JavaSEPort.isNativeInputSupported(JavaSEPort.java:2459)
at com.codename1.ui.Display.isNativeInputSupported(Display.java:2306)
at com.codename1.ui.TextArea.setText(TextArea.java:406)
at com.codename1.ui.TextArea.<init>(TextArea.java:328)
at com.codename1.ui.TextArea.<init>(TextArea.java:257)
at com.codename1.ui.Dialog.show(Dialog.java:771)
at com.codename1.ui.Dialog.show(Dialog.java:727)
at com.codename1.ui.Dialog.show(Dialog.java:692)
at com.codename1.ui.Dialog.show(Dialog.java:536)
at com.codename1.ui.Dialog.show(Dialog.java:788)
at com.codename1.io.ConnectionRequest.handleErrorResponseCode(ConnectionRequest.java:680)
at com.codename1.io.ConnectionRequest.performOperation(ConnectionRequest.java:379)
at com.codename1.io.NetworkManager$NetworkThread.run(NetworkManager.java:261)
at com.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:176)
com.codename1.impl.javase.JavaSEPort$EDTViolation: EDT Violation Stack!
at com.codename1.impl.javase.JavaSEPort.checkEDT(JavaSEPort.java:344)
at com.codename1.impl.javase.JavaSEPort.getImageWidth(JavaSEPort.java:3087)
at com.codename1.ui.Image.getWidth(Image.java:667)
at com.codename1.ui.EncodedImage.getWidth(EncodedImage.java:413)
at com.codename1.ui.plaf.Border.getMinimumWidth(Border.java:200)
at com.codename1.ui.Container.calcPreferredSize(Container.java:1431)
at com.codename1.ui.Component.calcScrollSize(Component.java:579)
at com.codename1.ui.Component.getScrollDimension(Component.java:566)
at com.codename1.ui.Container.isScrollableY(Container.java:1495)
at com.codename1.ui.Component.isScrollable(Component.java:1413)
at com.codename1.ui.Container.setLayout(Container.java:246)
at com.codename1.ui.Dialog.<init>(Dialog.java:205)
at com.codename1.ui.Dialog.<init>(Dialog.java:189)
at com.codename1.ui.Dialog.<init>(Dialog.java:180)
at com.codename1.ui.Dialog.show(Dialog.java:952)
EDT violation detected!
...
我错过了什么!!?