Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Converting Swing components to SWT

Reply
Thread Tools

Converting Swing components to SWT

 
 
Robert Dodier
Guest
Posts: n/a
 
      06-15-2007
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

 
Reply With Quote
 
 
 
 
Vitaly
Guest
Posts: n/a
 
      06-17-2007
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: ps.com...
> 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/


 
Reply With Quote
 
 
 
 
Robert Dodier
Guest
Posts: n/a
 
      06-18-2007
On Jun 17, 2:08 pm, "Vitaly" <ns_cy...@bezeqint.net> 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Where can I download SWT? (SWT homepage) Ramon F Herrera Java 11 12-06-2007 03:18 AM
Eclipse or NetBeans ,SWT or Swing. Marcello Java 16 04-25-2006 05:48 PM
Swing Model Classes Updating Swing Components on a Thread Other Than AWT mkrause Java 0 05-06-2005 04:32 PM
SWING components adjustment in different resolutions - Should show scrollbars less than 800X600 and expand components over this resolution Bluetears76 Java 1 07-01-2004 09:01 PM
[ANN] SWT vs Swing Opinion Poll corona Java 0 10-14-2003 01:10 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57