Converting Swing components to SWT

Discussion in 'Java' started by Robert Dodier, Jun 15, 2007.

  1. Hi,

    I wonder if there is some straightforward way (automated or not)
    to convert Swing components to SWT. If there is a program to
    do it automatically, great, but if there are just some written
    instructions to follow by hand, that's great too.

    Searching around the web I found this: http://www.swtguibuilder.com
    Haven't tried it; didn't find anything else.

    Any light you can shed on this question is much appreciated.

    Robert Dodier
    Robert Dodier, Jun 15, 2007
    #1
    1. Advertising

  2. Robert Dodier

    Vitaly Guest

    Yes, such converter can be written. I did such tool for my prev. company.
    And now I plan to develop this tool in some language (Java, C#, C++,
    etc.),
    pieces of the code are ready. There are two approaches to AWT->SWING
    conversion:
    - convert Java sources, for this you should develop a Java source language
    parser;
    - substitute all references to AWT components with some classes that
    imitate
    behaviour AWT classes with SWING API. This should be a parser of bytecode
    that modifies all Java application binary files to be converted.



    "Robert Dodier" <> wrote in message
    news:...
    > Hi,
    >
    > I wonder if there is some straightforward way (automated or not)
    > to convert Swing components to SWT. If there is a program to
    > do it automatically, great, but if there are just some written
    > instructions to follow by hand, that's great too.
    >
    > Searching around the web I found this: http://www.swtguibuilder.com
    > Haven't tried it; didn't find anything else.
    >
    > Any light you can shed on this question is much appreciated.
    >
    > Robert Dodier
    >




    I'm protected by SpamBrave
    http://www.spambrave.com/
    Vitaly, Jun 17, 2007
    #2
    1. Advertising

  3. On Jun 17, 2:08 pm, "Vitaly" <> wrote:

    > Yes, such converter can be written. I did such tool for my prev. company.
    > And now I plan to develop this tool in some language (Java, C#, C++,
    > etc.), pieces of the code are ready. There are two approaches to
    > AWT->SWING conversion:
    > - convert Java sources, for this you should develop a Java source language
    > parser;
    > - substitute all references to AWT components with some classes that
    > imitate behaviour AWT classes with SWING API. This should be a parser
    > of bytecode that modifies all Java application binary files to be converted.


    Vitaly, thanks for your reply. Actually what I am looking for is
    something a little different. I have a Swing application and
    I would like for it to use SWT (Standard Widget Toolkit) instead.

    I am guessing that there is some kind of a correspondence
    between Swing and SWT classes. It would be perfectly fine by
    me to carry out the conversion by hand, if only there were
    some document which lays out the correspondence.

    All the best,
    Robert Dodier
    Robert Dodier, Jun 18, 2007
    #3
    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:
    386
    corona
    Oct 14, 2003
  2. mkrause
    Replies:
    0
    Views:
    658
    mkrause
    May 6, 2005
  3. Marcello
    Replies:
    16
    Views:
    6,788
    Jon Martin Solaas
    Apr 25, 2006
  4. Steve
    Replies:
    0
    Views:
    428
    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,007
    Ramon F Herrera
    Dec 6, 2007
Loading...

Share This Page