I've been a zone leader with DZone since 2008, and I'm crazy about community. Every day I get to work with the best that JavaScript, HTML5, Android and iOS has to offer, creating apps that truly make at difference, as principal front-end architect at Avego. James is a DZone Zone Leader and has posted 639 posts at DZone. You can read more from them at their website. View Full User Profile

The Swing Sacrifice

11.06.2008
| 10337 views |
  • submit to reddit

As someone who works primarily on desktop application development, I was disappointed to read Kirill's blog today, where he discusses how JavaFX is taking all the focus from new Swing development.

While I'll admit that getting JavaFX 1.0 released will be great, and that we should finally see Java UI's hitting more platforms and devices, I'm not sure it's a great move to have only bug fixing and support as the Swing activities at Sun.

Now Sun is no longer funding SwingX, it's plain to see that all the money is on JavaFX. Kirill summarises this nicely:

I don’t know what the future holds for JavaFX. Sun is heavily betting on it, and nobody wants to have their Nomad moment forever archived on the Internet. All i know is that JavaFX has effectively halted all core Swing development. Over the last 18 months, we have seen significant architectural initiatives (JSR 295 and JSR 296) changing leads and frozen. All client-facing improvements in Java2D, AWT and Swing in Java 6 Update 10 are completely driven by the requirements of JavaFX. In Richard’s own words (the same thread on SwingX funding):

Swing is part of the JDK. It isn’t going away any time soon. For a great many large enterprise applications Swing is the best cross platform toolkit available. We’ll continue to support and work on fixing bugs in the JDK.

Will SwingX development continue despite not having this funding?

While it's true that technologies come and go and we need to move with the times, something still bothers me about this phasing out of Swing. I guess it was inevitable, I just hope JavaFX will be worth it.

References
Reference: http://www.pushing-pixels.org/

Comments

Otengi Miloskov replied on Thu, 2008/11/06 - 7:57pm

JavaFX is not worth it and many people knows it. Swing was perfect for Multiplatform GUI development just need to evolve more thats all, It was mature and fast and took 10 years to get to the point where Swing is it.

 JavaFX will take another 10 years to get to the place Swing is it now so no thanks I better use already proven technologies as Flash/Flex or continue to contrubute to Swing development without Sun support.

 At this times technologies does not come and go, we need to keep the best of the best and try to improve, It is getting very very expensive everytime to reinvent the wheel, That doesnt work anymore.

 This is the stupiest ever move Sun made, period.

Alex Kalinovsky replied on Thu, 2008/11/06 - 8:50pm in response to: Otengi Miloskov

Swing is a well-designed UI framework but there two major problems that Sun hasn't been resolve in 10 years. The first one is that the applications do not look impressive to the end user. It's gotten a lot better but most of the Swing apps still look rather ugly.

 The second problem is delivery model. Requiring a JRE on each user's desktop to run Swing applications is a limitation for broadly distributed applications. JRE is much heavier then Flash and even Flash is not that popular for the same reasons. 

 So pure browser-based applications are the future and HTML-related technologies have improved a lot. Look at GWT and AjaxSwing as examples of what can be done in the browser in pure Java, without a requirement of JRE installed on the users's desktop. 

 I think this explains why, unfortunate as it is, Sun is taking the focus away from Swing.

Ning Sun replied on Thu, 2008/11/06 - 9:13pm

I have been a Swing and SwingX user ever since my first java program. I really appreciate the great functions provided by the swingx components such jxmapkit and so on. Now it's hard to accept that the project is no longer the surpported by Sun.I also have tried to adapt to the fashion of  JavaFX, but the style of code do not move me. And for rapid development, I even prefer Swing by Jython.

Sun has make a lot of mistakes on the desktop, I just hope this won't be another.

Zsolt Kúti replied on Fri, 2008/11/07 - 3:42am

It is worth keeping our cool and read real sources, too:

Excerpts (from Josh Marinacci from Sun):

"As a life long client Java developer I have never been happier with the current state of the Java stack. Client Java applications are becoming faster, more reliable, and easier to develop. And this is true for both Swing and JavaFX applications. Stay tuned for the 1.0 release of JavaFX. I think you will be happy when you see what we've been working on. It's an exciting time to be a GUI app developer on the Java platform. "

Harald Krake replied on Fri, 2008/11/07 - 4:27am in response to: Alex Kalinovsky

You still need the JRE for JavaFX. So there's not much difference in deploying a JavaFX or Swing application. As bandwidth is getting better and better, downloading 5 megs (6u10) isn't such a big deal anymore and will become a piece of cake in the future.

Imho, the big failure of Sun was to neglect Swing for the enterprise! Every company I know that seriously develops enterprise desktop applications based on Swing (and there are a lot) went through really hard times getting Swing to satisfy professional requirements and ended up with their own framework on top of Swing (nobody really uses Swing beans directly, they're just a ridiculous least common denominator). What Java needs, is an "enterprise pack" that works out of the box for real-world business applications and that attracts new developers. As it is now, new Swing projects will only be started by companies that already managed to tweak Swing for their needs.

Funnily enough, Swing could be reanimated by JavaFX because FX can be used as a scripting language for Swing! So, it's probably not a question of Swing or FX, but how to make the best out of Swing and FX. I really hope that Sun doesn't forget the enterprise desktop this time. Java still is a great and rock-solid platform for business applications, and there are a lot of developers that don't want to replace it with all that weird Java Script browser hacking -- like me ;)

 

Otengi Miloskov replied on Fri, 2008/11/07 - 9:18am

Ok show me JavaFX but the real thing and I will think about it. it has been 2 JavaOne shows and nothing, Even Silverlight2 and Flash 10 are out, Where is JavaFX?, Have you seen the JavaFX.com site it just sucks!. Sun does not know how to do GUI that is the point so why bother more and more about it.

Better for enterprise GUI apps let Swing and improve it, and If you want fancy graphics use Flex or OpenGL/JOGL.

PS. The JavaFX syntax is messy why I need def just for constants and var for everything else?, Could use just var for type inferencing and constants.

 

 

Marcel Offermans replied on Fri, 2008/11/07 - 4:49pm

Sun is taking a big gamble here. So far all we've seen from Java FX are an endless stream of trivial technology demos that are no better than what Flash, Flex and Silverlight can do. Time will tell if enough people will adopt this technology.

Not developing Swing any further is a big mistake. Whilst there are definitely areas where the Swing API can and should be improved, the issues are not with the language (Java FX vs Java).

But if Sun is really serious about Java FX, let it port NetBeans to Java FX now. If they succeed in porting something as significant as that, perhaps I will be less skeptical. 

Jason Hatton replied on Fri, 2008/11/07 - 4:59pm

Personally I think JavaFX is a good idea just too late.  I have my doubts that it will break very far into the market share that Flex and Flash have gained already.  I could be wrong we will see on that.  My biggest beef is the Netbeans Tax you have pay to try it out.  I think most Java developers like choice on the platforms and tools they use and Netbeans is definitely not my preference and I think that holds true with most Java developer. IntelliJ is going full bore down the Flex route and hopefully will be competing against FlexBuilder in the next release.

 

Omar Palomino S... replied on Sat, 2008/11/08 - 1:49am

Come on guys, this post seem exactly like this one:

http://glaforge.free.fr/weblog/index.php?itemid=258
(look for the GeekyCoder comment)

I cannot stop insisting about this *DZONE != SLASHDOT*, what about the javalobby.org old days.What about the serious and assertive comments?

Before start throwing sensationalist comments, we need to start digging a little more. What about try to contact the Swing team? Go to the sources, presents both sides of the story, and then, let the people get a fair opinion about Swing and Java FX.

Just my 2 cents,
Omar

Catalin Strimbei replied on Sat, 2008/11/08 - 4:10am

Omar is right ...

Honestly I don't think Sun will ever abandon something significant as Swing (BTW I use everyday several Swing apps for my development work - just to mention the most trivial ones: like muCommander, jEdit, ThinkOffice - apart from NetBeans, SQLDeveloper, iReports or ArgoUML, MagicDraw .... - and I'm happy with them ....). Several years ago there where some rumours that Sun will abandon the entire desktop stack of Java, and now they are struggling to make JavaFx a viable option for fancy Rich Client desktop-based apps (inside and outside of the browser). My opinion is that the development community must remains circumspect about these kind of rumours ... I also think that the true behind this flame is the big bet of Sun on JavaFx, 'till now I didn't take JavaFx too seriously, but now I'm convinsed to give it a try ... I'm eager to try the final release of NB 6.5 with all the JavaFx tools bundled in it ....

Omar Palomino S... replied on Sat, 2008/11/08 - 11:25am in response to: Catalin Strimbei

Exactly, these are exciting times for a desktop developer: JDK6u10, Netbeans 6.5, etc. So, here it is another reference to these discussion, i liked the title, "Guys, don't panic - Swing is here to stay", I couldn't say it better:
http://weblogs.java.net/blog/fabriziogiudici/archive/2008/11/guys_dont_panic.html

I'm still waiting to see the acceptance of Java FX, because I think that it has a tremendous delay before the Applet boom until today, in the meantime other platforms gain popularity, like flash and ajax.

JeffS replied on Sat, 2008/11/08 - 11:37am

The way I understand it, JavaFX uses Swing under the hood.

 So basically, JavaFX is offering a higher level framework and dynamic, declaritive language to make GUI development easier.  And Swing can be pretty complex (a common criticism).

So, being that JavaFX is built on top of Swing, it's ludicrous to claim that Sun is abandoning Swing, because it would be pulling the rug out from under JavaFX.

 Also, Java 6 u10 is pretty exciting - new Nimbus Lnf (default), new 3d acceleration, faster start times, Java kernel (for faster downloads/installs).

Then there is all the great work being done with the NetBeans platform, which also makes GUI development much more pleasant.  And, NetBeans is built on Swing.

So, Swing is not being abandoned, but it is being moved to being lower on the stack, and being a foundation upon which other exciting stuff is being built.

True, compared to Flex and Silverlight, JavaFX is a bit late to the party.  But it offers big improvements.

C'mon guys, don't get your boxers in a bunch!

Omar Palomino S... replied on Sat, 2008/11/08 - 12:02pm in response to: JeffS

Ok, I think I'm gonna give it a try with fresh eyes. ;)

Jason Hatton replied on Sat, 2008/11/08 - 5:22pm in response to: Omar Palomino Sandoval

I don't understand the kool-aid drinking that is occuring with Netbeans.  It is the crappiest IDE out there even for the free ones that are available.  I am not saying this without experience.  I gave 6.1 a try for about four months and it caused me endless frustration and wanton for real IDE features. 

 To top it off it seems Sun is starting to require you to use Netbeans for their new stuff including JavaFX.

 If Sun is starting down the propriety software route then good riddance to Sun if they fold especially since they have open sourced the JDK.

 

Guido Amabili replied on Sun, 2008/11/09 - 10:49am in response to: Jason Hatton

Why don't you ask the Eclipse foundation to give you some tools to play with JavaFx ? After all, there is a plugin for Flex and Silverlight for Eclipse, right ???

 

Regards, Guido

Jason Hatton replied on Sun, 2008/11/09 - 3:08pm in response to: Guido Amabili

I am sure they are working on it.  My point is why doesn't Sun release the JavaFX SDK without Netbeans bundled in.

My guess is there are two reasons why this hasn't happened already.  

1. The two are tightly coupled together and they need more time to remove the coupling.  This wouldn't surprised based on the internal issues Netbeans has with this already in some parts of the IDE.  This is also a main reason why I think Netbeans is crap.  If they can't put out a properly architected IDE why would I want to tie my development environment to it.

2. They don't ever intend on them being seperate and is a new strategy to drag people into a proprietary Sun solution.  I hope this doesn't happen and that they aren't thinking this way.

 Jas

Raging Infernoz replied on Sun, 2008/11/09 - 8:52pm

This editor really stinks in Opera!

Raging Infernoz replied on Sun, 2008/11/09 - 9:11pm in response to: Jason Hatton

[quote=jashatton]

I don't understand the kool-aid drinking that is occuring with Netbeans.  It is the crappiest IDE out there even for the free ones that are available.  I am not saying this without experience.  I gave 6.1 a try for about four months and it caused me endless frustration and wanton for real IDE features. 

 To top it off it seems Sun is starting to require you to use Netbeans for their new stuff including JavaFX.

 If Sun is starting down the propriety software route then good riddance to Sun if they fold especially since they have open sourced the JDK.

[/quote]

I agree, NetBeans 6.1 is damned slow (NB 6.5 Beta is pure torture), has pathetic code structure caching and poor code validation.  I tried NB 6.1 intensively for a month, but felt like tearing my hair out, so switched back to JBuilder 2006 (not Eclipse based), because it is so much better and faster than other IDEs, including Eclipse and IDEA.  I won't ever consider JBuilder 2007 and 2008, because they use the nasty GUI kludge called the Eclipse framework.

JavaFX is just hype, Swing need to be wrapped up in a separate GUI engine process, using asynchronous message passing, not another lame wrapper for the accursed, Runnable black hole, called the Event Thread.

 

Jason Hatton replied on Sun, 2008/11/09 - 9:50pm in response to: Raging Infernoz

I honestly haven't tried JBuilder.  That price point is way above my budget.  IDEA pushes that limit but after using it quite a bit I would be willing to buy a Personal Edition.  I agree that Eclipse's ui is less than desirable but, it is still better than Netbeans.  Personally I like IntelliJ but, I will use Eclipse in a pinch.

 Jas

Andres Almiray replied on Mon, 2008/11/10 - 1:32pm in response to: JeffS

JavaFX does not rely on Swing to draw all components (take a look at the code, its open anyways :-)) Some Swing components can be found in the JavaFX apis but not all, conversely there are some new components that are not Swing based. JavaFX can't be Swing based as the mobile profile imposes more restrictions than the desktop profile, some devices can't run Swing but they may be able to run JavaFX.

JeffS replied on Mon, 2008/11/10 - 7:34pm

From a strategic and financial standpoint (for Sun), JavaFX makes sense.

Right now, and pretty much for about 8 years now, Sun has been flayling around, trying to get it's old '90's mojo back, where it was selling big-iron servers for huge mark-ups by the boat load.  Back then, the fact that they didn't monetize Java (much - other than comptibility testing, and J2ME licensing) did not matter, because they were flush with cash on server sales.  True, Java helped them sell their wares, but it also helped sell their competitors wares (other than MS) - IBM, HP, and others, benefitted (and still do) from Sun's R&D in Java.

But then Linux on cheap x86 boxes, and the dot com bust, destroyed Sun's cash cow.  They've been trying to figure out how to get back to their old success, and have failed.

 Now move to 2008, and Sun is back to losing money (after briefly getting back in the black), their stock is falling like a rock, the big iron server market continues to shrink, they're still not getting much in services revenue, and they are still not getting much revenue from Java (again, from compatibility testing on WebSphere and the like, and cell phone JME licenses).

Now, more than ever, Sun needs to find as much monetization as possible.  Where does that come from?  Certainly not from traditional desktop with Swing.  It's all free, and nobody is paying for support on it, Sun get's no licensing from it, and it's not spurring on their server or services business. 

But, look at the exploding smart phone market.  Look at set top boxes.  Look at Blu-Ray, look at RIA.  That is where the action is - that is where the growth lies - it's not in traditional desktops.

Enter JavaFX, which promises to deliver a rich experience across all of those things - smart phones, PDAs, set top boxes, Blu-Ray, RIAs, and even traditional desktops - all with one API and code base, and delivering rich multi-media.  That's true write once run anywhere. 

 And think of some of the licensing revenue Sun could get, from HD manufacturers (who make the smart phones, set top boxes, Blu-Rays, etc).  And JavaFX being used for RIAs will help spur that business.  And the fact that JavaFX will be deployable across all platforms and device types (again, smart phones, set top boxes, Blu Ray, etc), will make JavaFX more attractive to developers in the long run over Flex or Silverlight (which are pretty much for RIA, but not as deployable across devices).

 The writing is on the wall.  This is the direction client side Java has to take.  This is where there is opportunity for growth.  Traditional Swing can't get there.  Apparently, Sun is betting the farm that JavaFX can. 

And other than some corporate apps, and a handful of nice open source apps, and in spite of it's big recent improvements, Swing has missed the desktop party, and will forever play catch up. With JavaFX, Sun will be playing catch up to Flex and Silverlight in the RIA arena, but will be way ahead in terms of supported devices.  And it's those devices where the growth, and revenue, opportunities lie.

Considering all these things, JavaFX makes a lot of sense.  And, it makes sense for Sun to put Swing in maintenence mode, and let the open source community, or third party vendors, work on extending Swing.

Hopefully for Sun's sake, they can execute well on this grand plan.  It's questionable whether they can - they're hurting financially, and their history of execution on client side Java is not exactly stellar.  But alas, JavaFX does show tremendous potential.

 

Jason Hatton replied on Mon, 2008/11/10 - 11:27pm in response to: JeffS

I think you are right Sun is looking for new revenue streams however JavaFX isn't probably going to be enough to save them.  Flex and Flash rule the market and I don't see that changing in time. JavaFX could capture a chunk , maybe even like Firefox and capture over 25% but, in the end it will be mostly Flex and Flash because that is where the enterprise has already invested it's money and brain trust.

To get those revenue streams they are going to have to try to monetize through Consultancy Services, Indemnification Licensing, or something similar.  If they try to license JavaFX then they have lost their everloving minds. 

They would have been smarter to try to get Actionscript running on the VM with all the enhancement that came with Java6U10.  That provides an excellent transition path for companies who want to be pure Java.  That makes way more sense than some new language.

JeffS replied on Tue, 2008/11/11 - 3:24pm in response to: Andres Almiray

From the JavaFX FAQ:

 

Why did you create another scripting language?

JavaFX Script is specifically designed to optimize the creative process of building rich and compelling UIs leveraging Java Swing, Java 2D and Java 3D for developers and content authors.

 

... this implies that Swing is a major part of the JavaFX foundation.

 

Jason Hatton replied on Tue, 2008/11/11 - 3:36pm

Why create another why not adopt something already existing like JRuby or Groovy?  Groovy would be great especially if you consider their Builder classes.  The usage of SwingBuilder looks really similar to JavaFX scripts.  I think it is actually cleaner and easier to ready than JavaFX.  Not to mention the learner curve is lighter.

Hans Raber replied on Wed, 2008/11/12 - 7:15am

[Swing is dead... they say]

http://javadesktop.wordpress.com/2008/11/12/swing-is-dead/

Catalin Strimbei replied on Wed, 2008/11/12 - 11:00am in response to: Hans Raber

I already read that but it was wrapped in "Java is dead ". It was Java realy dying, it is Swing realy dying ?

Fuqiang Zhao replied on Wed, 2008/11/12 - 8:30pm

JavaFX is a great idea, I think all Java developers include swing funs can benefit it.

I worry about whether the talent engineer at SUN can make the great idea to great product, JavaFX include many cool features, some have not included in the Preview SDK, I hope the quality of JavaFX 1.0 like the Java 6.0 Update 10, all features included in JavaFX 1.0 should work perfectly 100%, if the developer try to use the media component, they just say "WOW, it works", they try another feature, it also works, the frustration thing is "if you need this feature or fix a bug, just file a bug or RFE", learn the user's requirement and fix the bugs is very important things for it, don't lost the next 10 years to fix the bugs.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.