Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT_AWT Bridge for Applet?
SWT_AWT Bridge for Applet? [message #445348] Wed, 03 November 2004 16:21
Greg Roberts is currently offline Greg RobertsFriend
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());
}
}
);
}
Previous Topic:Sorting on a checkbox column in a Table
Next Topic:Event when widget becomes visible
Goto Forum:
  


Current Time: Thu Sep 26 00:38:46 GMT 2024

Powered by FUDForum. Page generated in 0.05711 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top