Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
可能重复: 有什么方法可以将 Swing JFrame 从 SWT_AWT 桥嵌入到 AWT 框架中?
我有一个有很多视图的 RCP 应用程序。我有一个扩展 JPanel 并绘制一些东西的类。有没有办法嵌入这个类以显示在视图中?
Composite swtAwtComponent = new Composite(parent, SWT.EMBEDDED); java.awt.Frame frame = SWT_AWT.new_Frame( swtAwtComponent ); javax.swing.JPanel panel = new javax.swing.JPanel( ); frame.add(panel); frame.add(jFrameClass)