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 Mising name is currently offline Page Mising nameFriend
Messages: 31
Registered: July 2009
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 Mising name is currently offline Page Mising nameFriend
Messages: 31
Registered: July 2009
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: 50
Registered: August 2015
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:SWTBot install and use
Next Topic:Detetct Retina Display on MacOSX
Goto Forum:
  


Current Time: Thu Apr 18 01:26:31 GMT 2024

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

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

Back to the top