aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes For Eric and Dan: Swing -> SWT Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "For Eric and Dan: Swing -> SWT" Watch "For Eric and Dan: Swing -> SWT" New topic
Author

For Eric and Dan: Swing -> SWT

Mikalai Zaikin
Ranch Hand

Joined: Jun 04, 2002
Posts: 3231
    
    6
Hello,

Assuming I have some GUI Swing application (GUI JavaBean editor - some properties and some presentation of JavaBean), and I would like to convert this application to be an Eclipse plugin.

Is there any feasible way to do this (I mean to convert existing Swing app to Eclipse plugin)? Can be Eclipse plugin written with Swing library? Or is there any "adapter" library to utilize existing Swing applications in Eclipse ?

Sorry for maybe stupid question, this is new for me....

regards,
MZ


Free SCDJWS 5.0 Study Guide - SCDJWS 5.0 Quiz (How to get SCDJWS 5.0 Quiz)
Java Platform, Enterprise Edition 6 Web Services Developer Certified Expert Exam Study Guide and Quiz
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Yes, you can use Swing inside Eclipse plugins.


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Eric Clayberg
author
Ranch Hand

Joined: Sep 24, 2004
Posts: 63
Assuming I have some GUI Swing application (GUI JavaBean editor - some properties and some presentation of JavaBean), and I would like to convert this application to be an Eclipse plugin. Is there any feasible way to do this (I mean to convert existing Swing app to Eclipse plugin)? Can be Eclipse plugin written with Swing library? Or is there any "adapter" library to utilize existing Swing applications in Eclipse ?

Yes. You can use the Eclipse SWT_AWT bridge to run Swing widgets within an Eclipse view or editor.

Another alternative might be to use SwingWT which provides an implementation of Swing on top of SWT.

Yet another possibility would be to convert your Swing code into SWT code using the Swing to SWT (S2S) conversion tool (I have not used this tool).


Eric Clayberg
Software Engineering Manager
Google
Barry Andrews
Ranch Hand

Joined: Sep 05, 2000
Posts: 523

I would say that you would not want to use Swing inside SWT because it will not look good. You can use the appropriate look and feel for the platform to try and make it match SWT, but it's just not going to look quite the same.
Mikalai Zaikin
Ranch Hand

Joined: Jun 04, 2002
Posts: 3231
    
    6
Thank you for clarification !
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Originally posted by Eric Clayberg:

Yes. You can use the Eclipse SWT_AWT bridge to run Swing widgets within an Eclipse view or editor.

Another alternative might be to use SwingWT which provides an implementation of Swing on top of SWT.

Yet another possibility would be to convert your Swing code into SWT code using the Swing to SWT (S2S) conversion tool (I have not used this tool).


I'm not using that Swing to SWT (S2S) converstion tool... It's not open source and we need to pay for that... I am currently and gradually migrating my Swing appications to pure SWT, which is the best approach to take advantage of SWT performance, I guess...

Just my 2 cents...


Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
Alexandru Popescu
Ranch Hand

Joined: Jul 12, 2004
Posts: 995
Originally posted by Ko Ko Naing:


I'm not using that Swing to SWT (S2S) converstion tool... It's not open source and we need to pay for that... I am currently and gradually migrating my Swing appications to pure SWT, which is the best approach to take advantage of SWT performance, I guess...

Just my 2 cents...


It mostly depends on the volume/costs of work involved. I believe an automatic tool is not 100% guaranteed (keeping in mind that the 2 solutions are quiet different), but it may save a lot of hours. You can afterwards concentrate on the important migration stuff.

my 2cents come from 3 years of development in/with migration world ;-).

./pope


blog - InfoQ.com
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
Originally posted by Ilja Preuss:
Yes, you can use Swing inside Eclipse plugins.




Swing Designer


Vistual Editor Project
[ October 01, 2004: Message edited by: somkiat puisungnoen ]

SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: For Eric and Dan: Swing -> SWT