Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Should I select Swing or SWT ?

 
Ibn Saeed
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64833
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
GWT is for creating web apps, not desktop apps.
 
Ibn Saeed
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Swing is part of the core Java APIs; it's not going anywhere.
 
Ibn Saeed
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
Freddy Wong
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Rob Spoor
Sheriff
Pie
Posts: 20527
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ibn Saeed
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic