Eclipse Juno- WindowBuilder提供解析错误(java.lang.IllegalArgumentException)

时间:2014-02-18 10:54:38

标签: java eclipse jframe windowbuilder

堆栈追踪:

    java.lang.IllegalArgumentException
at org.eclipse.jdt.core.dom.ASTNode.checkNewChild(ASTNode.java:1901)
at org.eclipse.jdt.core.dom.ASTNode$NodeList.add(ASTNode.java:1269)
at org.eclipse.wb.internal.core.utils.ast.AstEditor.addStatement(AstEditor.java:1626)
at org.eclipse.wb.internal.core.model.generation.statement.AbstractInsideStatementGenerator.add(AbstractInsideStatementGenerator.java:82)
at org.eclipse.wb.internal.core.model.generation.statement.flat.FlatStatementGenerator.add(FlatStatementGenerator.java:66)
at org.eclipse.wb.internal.core.model.JavaInfoUtils.add(JavaInfoUtils.java:1386)
at org.eclipse.wb.internal.core.model.JavaInfoUtils.add(JavaInfoUtils.java:1289)
at org.eclipse.wb.internal.core.model.JavaInfoUtils.add(JavaInfoUtils.java:1225)
at org.eclipse.wb.internal.swing.model.layout.LayoutInfo.add(LayoutInfo.java:319)
at org.eclipse.wb.internal.swing.MigLayout.model.MigLayoutInfo.command_CREATE(MigLayoutInfo.java:797)
at org.eclipse.wb.internal.swing.MigLayout.gef.MigLayoutEditPolicy$2.executeEdit(MigLayoutEditPolicy.java:223)
at org.eclipse.wb.core.gef.command.EditCommand$1.run(EditCommand.java:52)
at org.eclipse.wb.internal.core.utils.execution.ExecutionUtils.run(ExecutionUtils.java:324)
at org.eclipse.wb.core.gef.command.EditCommand.execute(EditCommand.java:50)
at org.eclipse.wb.internal.gef.core.EditDomain.executeCommand(EditDomain.java:59)
at org.eclipse.wb.gef.core.tools.Tool.executeCommand(Tool.java:209)
at org.eclipse.wb.gef.core.tools.AbstractCreationTool.handleButtonUp(AbstractCreationTool.java:62)
at org.eclipse.wb.gef.core.tools.Tool.mouseUp(Tool.java:395)
at org.eclipse.wb.internal.gef.core.EditDomain.mouseUp(EditDomain.java:255)
at org.eclipse.wb.internal.gef.graphical.EditEventManager.mouseUp(EditEventManager.java:149)
at sun.reflect.GeneratedMethodAccessor175.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.wb.internal.draw2d.EventManager$8.invoke(EventManager.java:325)
at com.sun.proxy.$Proxy14.mouseUp(Unknown Source)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:220)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)

我一直在使用WindowBuilder来创建JFrame的布局。我正在使用Eclipse Juno,我把JLabel和JTextField放进去,直到我试图放入另一个JTextField并得到这个错误。当我重新启动eclipse然后它适用于有时候又会出现同样的错误,如果有人有解决方案,那么请给我一些建议

问候。

1 个答案:

答案 0 :(得分:0)

在不知道代码的情况下,我只能告诉你看看这个良好的WindowsBuilder层次结构。这源于其他人和ContentPane结构良好。