今天用windowsBuilder设计界面,本来想自己写代码,然后再在可视化窗口中预览,看看效果,可是提示"
WindowBuilder was not able to show the GUI”的错误。google了一下,发现原来是布局不对造成的:
I tried creating a very simple project in which I created a layout manager named SomeLayout. I copied into it the exact code from FillLayout, and I also created a SomeLayoutInfo class with helper classes, which I modeled exactly after the FillLayoutInfo and associated from the WB source tree. It doesn't seem to be working the way I expected. I have attached a very simple sample Eclipse project that highlights the problem that I am seeing (note that the classpath will need to be massaged a bit to point to your local SWT version and WB installation directory).
In the sample project I have psoted, when I click on the Design tab for MainWindow.java, I get a "WindowBuilder was not able to show the GUI" message. If I comment out line 47:
I tried creating a very simple project in which I created a layout manager named SomeLayout. I copied into it the exact code from FillLayout, and I also created a SomeLayoutInfo class with helper classes, which I modeled exactly after the FillLayoutInfo and associated from the WB source tree. It doesn't seem to be working the way I expected. I have attached a very simple sample Eclipse project that highlights the problem that I am seeing (note that the classpath will need to be massaged a bit to point to your local SWT version and WB installation directory).
In the sample project I have psoted, when I click on the Design tab for MainWindow.java, I get a "WindowBuilder was not able to show the GUI" message. If I comment out line 47: