SWT_AWT Bridge for Applet? [message #445348] |
Wed, 03 November 2004 16:21 |
Greg Roberts Messages: 88 Registered: July 2009 |
Member |
|
|
I am using the SWT_AWT bridge so that I can embed an Applet inside of an
Eclipse view.
I have a class that creates an applet instance and inside of my
createPartControl method for the view I create the bridge and add this
applet instance, etc.
However, whenever I open the view the applet instance is created and runs
outside of the view. The view is empty and the applet is running on its
own in its own frame.
Any idea what might be happening here.
Here is code from my createPartControl where I create the bridge:
public void createPartControl(Composite parent) {
Composite appletComp = new Composite(parent, SWT.EMBEDDED);
appletFrame = SWT_AWT.new_Frame(appletComp);
java.awt.EventQueue.invokeLater(
new Runnable() {
public void run() {
WCIApplet appletInstance = new WCIApplet();
appletInstance.init();
Panel appPanel = new Panel(new BorderLayout());
appPanel.add(appletInstance);
appletFrame.add(appPanel);
appletFrame.paintAll(appletFrame.getGraphics());
}
}
);
}
|
|
|
Powered by
FUDForum. Page generated in 0.05711 seconds