Is it possible to embed SWT widget in a Swing application?

Discussion in 'Java' started by Ryan, Dec 21, 2007.

  1. Ryan

    Ryan Guest

    I have seen tons of info on embedding Swing components in SWT apps,
    but not the other way around.
    Ryan, Dec 21, 2007
    #1
    1. Advertising

  2. Ryan

    Zig Guest

    On Fri, 21 Dec 2007 02:30:29 -0500, Ryan <> wrote:

    > I have seen tons of info on embedding Swing components in SWT apps,
    > but not the other way around.



    Take a look at

    org.eclipse.swt.awt.SWT_AWT.new_Shell(Display, Canvas)

    I've never tried it, but in theory that should allow you to use it. My
    experience with the SWT_AWT class (from eclipse 3.1) was that it was a bit
    flakey (spurious exceptions, some screen refreshes don't paint right, and
    the window manager occassionally shows windows open for each component).
    It's good for temporarily integrating modules from the two toolkits, but
    you will probably do yourself a big service in porting your code into one
    toolkit.

    HTH,

    -Zig
    Zig, Dec 22, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. corona
    Replies:
    0
    Views:
    396
    corona
    Oct 14, 2003
  2. Steve
    Replies:
    2
    Views:
    1,401
    Steve
    Feb 1, 2006
  3. Marcello
    Replies:
    16
    Views:
    6,803
    Jon Martin Solaas
    Apr 25, 2006
  4. Steve
    Replies:
    0
    Views:
    438
    Steve
    Oct 19, 2006
  5. Ramon F Herrera

    Where can I download SWT? (SWT homepage)

    Ramon F Herrera, Dec 5, 2007, in forum: Java
    Replies:
    11
    Views:
    4,031
    Ramon F Herrera
    Dec 6, 2007
Loading...

Share This Page