aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Should I select Swing or SWT ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Should I select Swing or SWT ?" Watch "Should I select Swing or SWT ?" New topic
Author

Should I select Swing or SWT ?

Ibn Saeed
Ranch Hand

Joined: Jun 17, 2009
Posts: 45
Hello

I am interested in developing a GUI Application for Windows (i.e. for using JDBC later on) and i am complete beginner. I would like to know which GUI programming would be viable in the long run.

I have read that there isnt much development going on at Swing ?

So I am a little concerned, if i start off with Swing and in the future, the development completely ceases, I would be stuck. So would anyone be kind to direct me on choosing the best possible GUI library to start off with.
Guru Sharma
Greenhorn

Joined: Jul 03, 2009
Posts: 4
Hi

you can very well go ahead with Java Swing. Complete Stand alone solution for GUI Development.

You can also try GWT (Google Web Tool kit)
GWT is an open source Java software development framework provided by Google that allows a developer to write an AJAX application in the Java language using the Java development tools of your choice (Eclipse). It provides Java-to-JavaScript compiler and a special web browser that helps you debug your GWT applications.

Note:
Your application is run as pure JavaScript and HTML, Compiled from your original Java source code with the GWT Java-to-JavaScript compiler. When you deploy your GWT applications to production, you deploy this JavaScript and HTML to your web servers, so end users will only see the web mode version of your application.


Guru
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61756
    
  67

GWT is for creating web apps, not desktop apps.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ibn Saeed
Ranch Hand

Joined: Jun 17, 2009
Posts: 45
Guru Sharma wrote:Hi

you can very well go ahead with Java Swing. Complete Stand alone solution for GUI Development.

You can also try GWT (Google Web Tool kit)
GWT is an open source Java software development framework provided by Google that allows a developer to write an AJAX application in the Java language using the Java development tools of your choice (Eclipse). It provides Java-to-JavaScript compiler and a special web browser that helps you debug your GWT applications.

Note:
Your application is run as pure JavaScript and HTML, Compiled from your original Java source code with the GWT Java-to-JavaScript compiler. When you deploy your GWT applications to production, you deploy this JavaScript and HTML to your web servers, so end users will only see the web mode version of your application.


I am only interested in Desktop Applications, not web applications.

Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Swing is part of the core Java APIs; it's not going anywhere.


[Jess in Action][AskingGoodQuestions]
Ibn Saeed
Ranch Hand

Joined: Jun 17, 2009
Posts: 45
Ernest Friedman-Hill wrote:Swing is part of the core Java APIs; it's not going anywhere.



I just read this blog entry:

The Swing Application Framework still in coma
http://www.jroller.com/agoubard/entry/the_swing_application_framework_still

My suspicion was confirmed by Karsten Lentzsch a well-known Swing developer and one of the member of the expert group in a dicussion in the mailing list:

"I doubt that it can be included in Java 7; and I'll vote against it."

"There's no activity in the expert group, and no visible progress
in the public code base. Anyway I hope that Sun will revive this JSR.
At least, it would help if someone from Sun could comment what's going
on."




Isn't this a little troubling ?

Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

None of that has anything to do with Swing; it's about a proposal for something completely separate called the "Swing Application Framework (SAF)," which looks like it's dying on the vine. That doesn't really mean anything.

Note that SWT was created as a part of Eclipse, an IDE and also an application platform. Sun's own "NetBeans" IDE, which is equivalent in many ways to Eclipse, is built with Swing. So to the extent that Eclipse is a "SWT Application Framework", Swing already has an application framework; SAF as described here is kind of redundant. perhaps that's why it lost steam and died.
Ibn Saeed
Ranch Hand

Joined: Jun 17, 2009
Posts: 45
Ernest Friedman-Hill wrote:None of that has anything to do with Swing; it's about a proposal for something completely separate called the "Swing Application Framework (SAF)," which looks like it's dying on the vine. That doesn't really mean anything.

Note that SWT was created as a part of Eclipse, an IDE and also an application platform. Sun's own "NetBeans" IDE, which is equivalent in many ways to Eclipse, is built with Swing. So to the extent that Eclipse is a "SWT Application Framework", Swing already has an application framework; SAF as described here is kind of redundant. perhaps that's why it lost steam and died.


Thanks for clearing the confusion.

I am still looking for answers to my question, should i start off with Swing or SWT ?
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15300
    
    6

Although core Swing doesn't have any significant work currently going on to speak of, there is plenty of technologies built with Swing that are highy active. As Ernest said, Netbeans. IntelliJ's IDEA is also built with Swing. Griffon is a groovy based framework for creating Swing applications. There's actually lots going on if you just bothered to hit the interwebs a bit.

Long story short, Swing isn't going anywhere so its a safe bet. That doesn't necessarily mean SWT is the wrong choice though. Kind of depends on your ultimate goal (get a job, get a promotion, learn something new, create your own product, etc).


GenRocket - Experts at Building Test Data
Freddy Wong
Ranch Hand

Joined: Sep 11, 2006
Posts: 959

I also don't think that Swing will die anytime soon. There are still a lot of number of applications written in Swing. I can't answer which one you should choose. It all depends on your needs. As far as I know, there are a lot of more books on Swing than SWT. You can probably learn Swing first, then learn SWT once you've become proficient with GUI framework. I believe learning SWT shouldn't be too difficult afterwards.


SCJP 5.0, SCWCD 1.4, SCBCD 1.3, SCDJWS 1.4
My Blog
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19781
    
  20

Also, even if Sun don't work on Swing development*, that doesn't mean Swing development is dead. There are lots of (open source) projects, like SwingX, that provide additional Swing libraries.

That said, there are only two reasons I can think of to not choose for SWT:
1) you'll need to provide the SWT libraries with your application (although the same can be said for any 3rd party Swing extensions)
2) I've noticed that the Swing community here on JavaRanch is bigger than the SWT community, so with Swing you'll probably get faster responses if you post a question around here.


* Although we did get some extra features in Java 6 like RowSorter / RowFilter.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Ibn Saeed
Ranch Hand

Joined: Jun 17, 2009
Posts: 45
Gregg Bolinger wrote:Although core Swing doesn't have any significant work currently going on to speak of, there is plenty of technologies built with Swing that are highy active. As Ernest said, Netbeans. IntelliJ's IDEA is also built with Swing. Griffon is a groovy based framework for creating Swing applications. There's actually lots going on if you just bothered to hit the interwebs a bit.

Long story short, Swing isn't going anywhere so its a safe bet. That doesn't necessarily mean SWT is the wrong choice though. Kind of depends on your ultimate goal (get a job, get a promotion, learn something new, create your own product, etc).


I didnt knew that IntelliJ was built in Swing. My goal would be to create my own product for my own use. Nothing related to Job.

Ibn Saeed
Ranch Hand

Joined: Jun 17, 2009
Posts: 45
Freddy Wong wrote:I also don't think that Swing will die anytime soon. There are still a lot of number of applications written in Swing. I can't answer which one you should choose. It all depends on your needs. As far as I know, there are a lot of more books on Swing than SWT. You can probably learn Swing first, then learn SWT once you've become proficient with GUI framework. I believe learning SWT shouldn't be too difficult afterwards.


I did a search on Amazon for both SWT and Swing, Swing did have a larger market share in books. So its a Plus for Swing.

Ibn Saeed
Ranch Hand

Joined: Jun 17, 2009
Posts: 45
What would you say about building an application on top of Netbean Platform ?

My application would be a ecommerce store manager for my existing website in php/mysql. Do you think that it would be a viable option to go with as Netbans is an editor
Freddy Wong
Ranch Hand

Joined: Sep 11, 2006
Posts: 959

It's definitely worth trying. But it's good to know some basic of Swing first before you delve into NetBeans Platform
Ibn Saeed
Ranch Hand

Joined: Jun 17, 2009
Posts: 45
Freddy Wong wrote:It's definitely worth trying. But it's good to know some basic of Swing first before you delve into NetBeans Platform


Most certainly, just wanted to know if the Netbeans path would be viable later on.

I have decided to go ahead with Swing, thanks to all of you who have responded.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Should I select Swing or SWT ?