how to embed SWT browser in swing jframe

荒凉一梦 提交于 2019-11-27 15:45:26

Here is a working example on GIT showing how to embed SWT in a traditional Swing JPanel: https://gist.github.com/caprica/6890618 (Text version: here)

The trick is to create a java.awt.Canvas linked to an SWT shell. This canvas can be added to any tradionnal Swing component. The SWT shell loop is managed by a separate thread.

Here is a screenshot on my Windows 7 box with Java 7:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!