Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Swing/SWT Integration without using JApplet(Embed Swing in SWT without using JApplet)
Swing/SWT Integration without using JApplet [message #1790701] Thu, 14 June 2018 15:56 Go to next message
Page Wang is currently offline Page WangFriend
Messages: 24
Registered: July 2009
Junior Member
Hi,

I need to embed some Swing widgets into SWT. I found many examples showing how to do it using SWT_AWT along with JApplet. But since JApplet will be deprecated in future JDK, I am looking for a replacement.

Can someone suggest any other ways to do this?

I tried to use JRootPane instead of JApplet, but find some side effects. According to the article found [ http://www.eclipse.org/articles/article.php?file=Article-Swing-SWT-Integration/index.html ], I should use a heavyweight component (under section "Creating a Root Pane Container"). But I couldn't find any other heavyweight component to use other than JApplet.

Any help is greatly appreciated!

Thanks.
Re: Swing/SWT Integration without using JApplet [message #1790702 is a reply to message #1790701] Thu, 14 June 2018 16:04 Go to previous messageGo to next message
Page Wang is currently offline Page WangFriend
Messages: 24
Registered: July 2009
Junior Member
Sorry for the multiple posts... is there a way to delete the duplicated ones?

Re: Swing/SWT Integration without using JApplet [message #1791120 is a reply to message #1790702] Sun, 24 June 2018 05:50 Go to previous message
Martin J is currently offline Martin JFriend
Messages: 5
Registered: August 2015
Junior Member
Have you try to add your outer container directly to AWT bridge frame as the following codes. Mine works without JApplet. Both on Windows and Mac;

super(parent, style | SWT.NO_BACKGROUND | SWT.EMBEDDED);

java.awt.Frame frame = SWT_AWT.new_Frame(this);

JScrollPane outercontainer = new JScrollPane(pane);

frame.add(outercontainer);
Previous Topic:Swing/SWT Integration without using JApplet
Next Topic:Detect Retina Display on MacOSX
Goto Forum:
  


Current Time: Wed Nov 14 10:51:16 GMT 2018

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

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

Back to the top