有什么方法可以从 SWT_AWT 桥将 Swing JFrame 嵌入到 AWT 框架中吗?
我正在将 Swing 应用程序集成到 Bioclipse/Eclipse 插件中,并且由于 Eclipse 使用 SWT,因此我必须使用SWT_AWT 以某种方式桥接。
问题是我从 SWT_AWT 桥获得的起点是一个 AWT 框架,如下所示:
java.awt.Frame awtFrame = SWT_AWT.new_Frame(composite);
...(可以用 AWT 组件填充),但情况是 Swing 应用程序在其 main 中包含大部分功能JFrame 组件。现在,Swing JFrame 无法按原样集成到 AWT 框架中。
已与原始应用程序的开发人员讨论了原始 Swing 应用程序的重构。只是想确保我们没有错过任何明显的解决方法?
I'm integrating a Swing application into an Bioclipse/Eclipse plug-in, and since Eclipse uses SWT, I have to use the SWT_AWT bridge somehow.
The problem is that the starting point I get from the SWT_AWT bridge is an AWT Frame, like so:
java.awt.Frame awtFrame = SWT_AWT.new_Frame(composite);
... (which can be filled with AWT components), but the situation is that the Swing application contains much of it's functionality in it's main JFrame component. Now, a Swing JFrame can not be integrated as is into an AWT Frame.
Refactoring of the original Swing application has been discussed with the developer of the original application. Just wanted to make sure we didn't miss any obvious workaround for this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一篇很棒的文章关于如何在 SWT/RCP 应用程序中使用 Swing。这应该会有帮助。
This is an excellent article on how to use Swing inside your SWT/RCP apps. This should be helpful.