[java] Can I add a SWT widget in a swing JPanel?

Started by
3 comments, last by Son of Cain 17 years, 5 months ago
Hi folks, I need some advice from the folks here that use Eclipse as their IDE. My entire project is written in swing... I need to display an IE browser window as one of my requirements, and I was previously using JDIC for that. It was cool and working, but I know that the current version of SWT can do that as well (with the Browser component), and since I will need the OLE controls that it also provides, I decided to dump JDIC and use SWT for these few requirements. I am not going to change my entire GUI to use SWT... It is already done, in swing. My question is simple: can I render a SWT widget on a JPanel component (swing)? I know that the opposite is possible (i.e, render swing/awt within SWT components), but I would love to add that browser component to a JPanel that fits nicely to the rest of my GUI. Thanks in advance for any help, Rodrigo
a.k.a javabeats at yahoo.ca
Advertisement
How about this one ?
http://swingwt.sourceforge.net/
Sounds cool.

Does it has support for the SWT features I mentioned (native browser, Ole support)? If I could just render a SWT widget inside a JPanel, that would suffice.. Don't want to add yet another dependency, or swap my GUI code.

Anyway, I'm downloading it to evaluate it. Thanks for the tip. Rate++ ;D
a.k.a javabeats at yahoo.ca
Well, have you tried? Sometimes the easiest way to find out if something will work is to just try it once.

[Formerly "capn_midnight". See some of my projects. Find me on twitter tumblr G+ Github.]

Or asking about it on a forum, because the guy who suggested it might know about it or any pitfalls related to it :p

I downloaded the library, and I'm going to see how it fits on my code. It's about 1MB dependency, and it matters to my project. Plus, I feel uncomfortable having three UI APIs on the same classpath :p
a.k.a javabeats at yahoo.ca

This topic is closed to new replies.

Advertisement