使用WindowsBuilder进行可视化设计时不能预览界面

在使用WindowBuilder进行Java界面设计时遇到错误:'WindowBuilder was not able to show the GUI'。该问题可能由自定义布局管理器引起。通过创建一个简单的项目并复制FillLayout的代码,发现即使模仿了WB源码中的FillLayoutInfo,仍然无法按预期工作。附带的Eclipse项目展示了此问题,当尝试预览MainWindow.java的Design视图时,会收到错误提示。问题关键在于shell.setLayout(new SomeLayout(SWT.HORIZONTAL))这行代码。
摘要由CSDN通过智能技术生成
今天用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 (no
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值